From 3493ac24e0fabc6287eb6299fef43f442f05393e Mon Sep 17 00:00:00 2001 From: brookshi Date: Wed, 23 May 2018 21:51:57 +0800 Subject: [PATCH] v0.12 --- cn/Simple_Tutorial/Assert_Base_On_UI.md | 2 ++ cn/Simple_Tutorial/Use_Param.md | 6 +++++- cn/change_log.md | 19 ++++++++++++++++++- cn/installation/StepByStep.md | 4 ++-- cn/installation/configuration.md | 2 +- cn/installation/docker.md | 16 +++++++++++----- deploy/docker/hitchhiker/docker-compose.yml | 6 ++++-- .../hitchhiker_and_mysql/docker-compose.yml | 4 ++-- deploy/docker/private/docker-compose.yml | 1 + deploy/docker/push_docker.sh | 2 +- deploy/linux_deploy.sh | 2 ++ deploy/win_deploy.bat | 2 ++ en/change_log.md | 16 ++++++++++++++++ en/installation/StepByStep.md | 2 +- en/installation/docker.md | 4 +++- 15 files changed, 71 insertions(+), 17 deletions(-) diff --git a/cn/Simple_Tutorial/Assert_Base_On_UI.md b/cn/Simple_Tutorial/Assert_Base_On_UI.md index 0da4839..ae7b766 100644 --- a/cn/Simple_Tutorial/Assert_Base_On_UI.md +++ b/cn/Simple_Tutorial/Assert_Base_On_UI.md @@ -4,6 +4,8 @@ 针对这种情况推出了基于UI的断言,只需要用鼠标点点,写写目标值就可以了。 +里面也可以有一些稍复杂些的函数,比如custom,这个可以根据当前校验的对象来使用不同的函数,使用的是js语法,比如string类型的,可以使用contains, match之类,如果是数组,则可以使用find(v=>v==='a') != null之类。 + ![](https://raw.githubusercontent.com/brookshi/images/master/Hitchhiker/assert.PNG) #### 如何创建 diff --git a/cn/Simple_Tutorial/Use_Param.md b/cn/Simple_Tutorial/Use_Param.md index 789aed1..b278b03 100644 --- a/cn/Simple_Tutorial/Use_Param.md +++ b/cn/Simple_Tutorial/Use_Param.md @@ -56,4 +56,8 @@ Parameters 本质上是一个JSON格式的对象,你需要以下面这种格 ![](https://raw.githubusercontent.com/brookshi/images/master/Hitchhiker/simple_tutorial/param_send_all.png) -![](https://raw.githubusercontent.com/brookshi/images/master/Hitchhiker/simple_tutorial/param_send_one.png) \ No newline at end of file +![](https://raw.githubusercontent.com/brookshi/images/master/Hitchhiker/simple_tutorial/param_send_one.png) + +#### 使用Pairwise算法 + +Pairwise算法可以在做到不太降低覆盖率的情况(大概覆盖70%-80%)下大量减少case,因为在Many to Many时,如果参数过多,生成的case数量很大,写assert就很不容易,而Pairwise算法可以解决这块。 \ No newline at end of file diff --git a/cn/change_log.md b/cn/change_log.md index 7db9a53..888075f 100644 --- a/cn/change_log.md +++ b/cn/change_log.md @@ -1,3 +1,20 @@ +#### 0.12 2018-05-23 + +**Features:** + +* \#119 增加几个批量关闭标签的功能(全部关闭,关闭保存,关闭当前标签外的所有) +* \#147 response增加一个Console(日志)用于显示请求执行过程及脚本里调用的console,这样方便调试脚本和变量 +* \#123 对Parameters里的many to many增加算法选项:pairwise,用于减少用例 +* \#174 压缩请求返回的数据 +* \#128 对于docker,给global_data下面的project做持久化(破坏性改动,之前上传的在新版本需要再上传一次) +* \#133 在Test里获取hitchhiker.request +* \#121 给新用户增加更多例子 + +**Bugs:** + +* \#152 修复上传的project libs对于自动化测试无效 + + #### 0.11 2018-04-28 **Features:** @@ -6,7 +23,7 @@ * \#110 支持Common Pre Request Script里用getEnvVariable拿环境变量 * \#124 以Key-value形式展示和编辑以及描述url的 Query 字符串 * \#12 body里支持key-value形式展示和编辑以及描述form数据 -* \#122 parameters里面增加一个Beautify功能吗 +* \#122 parameters里面增加一个Beautify功能 * \#127 Schedules 页面样式优化 * 增加request描述编辑 diff --git a/cn/installation/StepByStep.md b/cn/installation/StepByStep.md index 3b9ebb2..64641ac 100644 --- a/cn/installation/StepByStep.md +++ b/cn/installation/StepByStep.md @@ -18,13 +18,13 @@ #### 一步一步部署: -先确保机器有安装: nodejs 7.60+, 推荐用最新LTS版本(8.9) 以及数据库 `mysql 5.7+` (支持json列); +先确保机器有安装: nodejs 7.60+, 推荐用最新LTS版本以及数据库 `mysql 5.7+` (支持json列); > 进入mysql, 创建db: `hitchhiker-prod`或其他名字(注意编码用utf8),修改变量`max_allowed_packet=200M` > 创建DB的脚本: CREATE DATABASE IF NOT EXISTS \`hitchhiker-prod\` default charset utf8 COLLATE utf8_general_ci; > 修改变量需要把`max_allowed_packet=200M`加到 my.ini 文件[mysqld] Section下,具体参考:[change max_allowed_packet](https://stackoverflow.com/questions/8062496/how-to-change-max-allowed-packet-size) -1. 下载安装包 [https://github.com/brookshi/Hitchhiker/releases/download/v0.11/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.11/Hitchhiker.zip); +1. 下载安装包 [https://github.com/brookshi/Hitchhiker/releases/download/v0.12/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.12/Hitchhiker.zip); 下载速度慢的可以去阿里云下载 http://hitchhiker.oss-cn-hongkong.aliyuncs.com/Hitchhiker.zip 2. 解压并在build目录下(即setup.js的目录)执行命令`node setup.js`(windows), `sudo node setup.js`(linux); diff --git a/cn/installation/configuration.md b/cn/installation/configuration.md index 3bf6aa5..fe47d7c 100644 --- a/cn/installation/configuration.md +++ b/cn/installation/configuration.md @@ -41,7 +41,7 @@ Hitchhiker的很多设置可以在appconfig.json里设置,也有对应的环 "mailOnlyForFail": true // 只在失败时发邮件 HITCHHIKER_SCHEDULE_MAILFORFAIL }, "stress": { - "stressType": "node", // 压力测试的类型,默认为node,内置的,还有go,需要部署hitchhiker-node,设为none时禁用 + "stressType": "node", // 压力测试的类型,默认为node,内置的,还有go,需要部署hitchhiker-node,设为none时禁用 HITCHHIKER_STRESS_TYPE "storeMaxCount": 5, // 压力测试表最大长度 HITCHHIKER_STRESS_COUNT "stressPort": 11010, // 压力测试的端口 HITCHHIKER_STRESS_PORT "stressUpdateInterval": 1000 // 压力测试实时更新时的间隔(毫秒) HITCHHIKER_STRESS_UPDATE_INTERVAL diff --git a/cn/installation/docker.md b/cn/installation/docker.md index 64c9c13..6cc873f 100644 --- a/cn/installation/docker.md +++ b/cn/installation/docker.md @@ -1,6 +1,6 @@ docker使用的是docker-compose来安装,会自动下载两个image:hitchhiker和mysql,基本上按命令执行即可,如果需要配置,可以参考:[配置文件](configuration.md), 环境变量可以写到docker-compose.yml里 -国内用户请使用阿里云的镜像 hitchhiker-cn:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.11 +国内用户请使用阿里云的镜像 hitchhiker-cn:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12 #### 参考下面命令,一步一步部署 (基于ubuntu,其他系统类似): ``` bash @@ -21,7 +21,7 @@ curl -O https://raw.githubusercontent.com/brookshi/Hitchhiker/release/deploy/doc # 编辑 docker-compose.yml, 把localhost换成你机器的局域网ip,如果是只有本机一个人用那就localhost也可以 sudo vim docker-compose.yml -# 修改完成后,保存退出 (国内用户改image地址:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.11, 以及写入环境变量配置hitchhiker以及mysql) +# 修改完成后,保存退出 (国内用户改image地址:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12, 以及写入环境变量配置hitchhiker以及mysql) ... # 执行docker-compose up安装镜像 @@ -36,7 +36,7 @@ curl http://ip:8080/ version: '2' services: hitchhiker: - image: brookshi/hitchhiker:v0.11 + image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=hitchhiker-mysql @@ -45,6 +45,8 @@ services: ports: - "8080:8080" - "11010:11010" + volumes: + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project links: - hitchhiker-mysql:hitchhiker-mysql hitchhiker-mysql: @@ -65,7 +67,7 @@ services: version: '2' services: hitchhiker: - image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.11 + image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=hitchhiker-mysql @@ -73,6 +75,8 @@ services: ports: - "6666:6666" - "11010:11010" + volumes: + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project links: - hitchhiker-mysql:hitchhiker-mysql hitchhiker-mysql: @@ -92,7 +96,7 @@ services: version: '2' services: hitchhiker: - image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.11 + image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=192.168.0.10 @@ -103,6 +107,8 @@ services: ports: - "8080:8080" - "11010:11010" + volumes: + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project ``` #### 使用nginx和域名 diff --git a/deploy/docker/hitchhiker/docker-compose.yml b/deploy/docker/hitchhiker/docker-compose.yml index 128b03d..204988f 100644 --- a/deploy/docker/hitchhiker/docker-compose.yml +++ b/deploy/docker/hitchhiker/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: hitchhiker: - image: brookshi/hitchhiker:v0.11 + image: brookshi/hitchhiker:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=hitchhiker-mysql @@ -10,4 +10,6 @@ services: - "8080:8080" - "11010:11010" external_links: - - hitchhiker-mysql:hitchhiker-mysql \ No newline at end of file + - hitchhiker-mysql:hitchhiker-mysql + volumes: + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project \ No newline at end of file diff --git a/deploy/docker/hitchhiker_and_mysql/docker-compose.yml b/deploy/docker/hitchhiker_and_mysql/docker-compose.yml index edc1a29..bb06dff 100644 --- a/deploy/docker/hitchhiker_and_mysql/docker-compose.yml +++ b/deploy/docker/hitchhiker_and_mysql/docker-compose.yml @@ -1,12 +1,12 @@ version: '2' services: hitchhiker: - image: brookshi/hitchhiker:v0.11 + image: brookshi/hitchhiker:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=hitchhiker-mysql - HITCHHIKER_APP_HOST=http://localhost:8080/ # should change before deploying. - # add environment variable + # add environment variable to config ports: - "8080:8080" - "11010:11010" diff --git a/deploy/docker/private/docker-compose.yml b/deploy/docker/private/docker-compose.yml index aa1dcda..ca6df18 100644 --- a/deploy/docker/private/docker-compose.yml +++ b/deploy/docker/private/docker-compose.yml @@ -10,6 +10,7 @@ services: - "11010:11010" volumes: - /my/hitchhiker/public:/usr/src/Hitchhiker/build/public + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project links: - hitchhiker-mysql hitchhiker-mysql: diff --git a/deploy/docker/push_docker.sh b/deploy/docker/push_docker.sh index f17caec..b0d2dfd 100644 --- a/deploy/docker/push_docker.sh +++ b/deploy/docker/push_docker.sh @@ -1,4 +1,4 @@ -export HITCHHIKER_VERSION="v0.11" +export HITCHHIKER_VERSION="v0.12" sudo docker pull registry.us-east-1.aliyuncs.com/brook/hitchhiker:$HITCHHIKER_VERSION sudo docker login --username=brookshi --password=$DOCKER_ID_PWD sudo docker tag registry.us-east-1.aliyuncs.com/brook/hitchhiker:$HITCHHIKER_VERSION brookshi/hitchhiker:$HITCHHIKER_VERSION diff --git a/deploy/linux_deploy.sh b/deploy/linux_deploy.sh index 56b1bbf..ecb5bd7 100644 --- a/deploy/linux_deploy.sh +++ b/deploy/linux_deploy.sh @@ -1,3 +1,5 @@ +# ** 如果您打算部署Hitchhiker,请忽略这个脚本,部署请参考:http://doc.hitchhiker-api.com/cn/installation/ 如果是开发,可以参考脚本搭开发环境 +# ** if you try to deploy Hitchhiker, please ignore this file, reference to: http://doc.hitchhiker-api.com/cn/installation/ # ensure mysql is installed with user:'root' password: 'hitchhiker888' and create database 'hitchhiker-prod' # replace myhost with your ip, keep 8080 port diff --git a/deploy/win_deploy.bat b/deploy/win_deploy.bat index 8cd1245..143cce1 100644 --- a/deploy/win_deploy.bat +++ b/deploy/win_deploy.bat @@ -1,3 +1,5 @@ +REM ** 如果您打算部署Hitchhiker,请忽略这个脚本,部署请参考:http://doc.hitchhiker-api.com/cn/installation/ 如果是开发,可以参考脚本搭开发环境 +REM ** if you try to deploy Hitchhiker, please ignore this file, reference to: http://doc.hitchhiker-api.com/cn/installation/ REM ensure mysql is installed with user:'root' password: 'hitchhiker888' and create database 'hitchhiker-prod' REM replace myhost with your ip diff --git a/en/change_log.md b/en/change_log.md index 1d52ac4..0441e3f 100644 --- a/en/change_log.md +++ b/en/change_log.md @@ -1,3 +1,19 @@ +#### 0.12 2018-05-23 + +**Features:** + +* \#119 Add tab function: close all, close all but actived, close all saved +* \#147 Add Console tab for response to display request execution process information, it make debug script and variable earier +* \#123 Add Pairwise algorithm for many to many of parameters to reduce case +* \#174 Compress response +* \#128 Add volumn for project lib & data for docker +* \#133 Could get hitchhiker.request in Test script +* \#121 More samples for new user + +**Bugs:** + +* \#152 fixed new uploaded project libs invalid for scheduler + #### 0.11 2018-04-28 **Features:** diff --git a/en/installation/StepByStep.md b/en/installation/StepByStep.md index f7467cb..65125be 100644 --- a/en/installation/StepByStep.md +++ b/en/installation/StepByStep.md @@ -24,7 +24,7 @@ Dependence: nodejs 7.60+, recommend use LTS (8.9) and `mysql 5.7+` with json col > create DB: CREATE DATABASE IF NOT EXISTS \`hitchhiker-prod\` default charset utf8 COLLATE utf8_general_ci; > change variable: add `max_allowed_packet=200M` under [mysqld] section in /my.conf file, refer to:[change max_allowed_packet](https://stackoverflow.com/questions/8062496/how-to-change-max-allowed-packet-size) -1. Download app package from [https://github.com/brookshi/Hitchhiker/releases/download/v0.11/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.11/Hitchhiker.zip); +1. Download app package from [https://github.com/brookshi/Hitchhiker/releases/download/v0.12/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.12/Hitchhiker.zip); 2. Unzip and run command `node setup.js`(windows), `sudo node setup.js`(linux) in `build` folder; diff --git a/en/installation/docker.md b/en/installation/docker.md index 025cc14..184b200 100644 --- a/en/installation/docker.md +++ b/en/installation/docker.md @@ -7,7 +7,7 @@ If you want to use another port, should replace all 8080. version: '2' services: hitchhiker: - image: brookshi/hitchhiker:v0.11 + image: brookshi/hitchhiker:v0.12 container_name: hitchhiker environment: - HITCHHIKER_DB_HOST=hitchhiker-mysql @@ -16,6 +16,8 @@ services: ports: - "8080:8080" - "11010:11010" + volumes: + - /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project links: - hitchhiker-mysql:hitchhiker-mysql hitchhiker-mysql: