Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
brookshi committed Jun 15, 2018
1 parent db32b97 commit 7e5cb07
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Go to [http://www.hitchhiker-api.com](http://www.hitchhiker-api.com) for test,
* Easy to deploy (support docker, windows, linux), keep data in your control, never lose data
* All changed will be auto saved in local cache even if refresh page
* Support importing Postman v1 collections
* Distributed stress test
* Load test
* Sync collection data of team automatically
* Api Document (in future)

Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Api Mock | ✘ | ✔
只在Chrome(推荐)和Firefox下测试过,其他的暂不考虑。
这个工具的用户应该是Developer或QA,没理由没有Chrome和Firefox中的一个。

## 微信群
## 微信

<img src='https://raw.githubusercontent.com/brookshi/images/master/Hitchhiker/hitchhiker_wx.jpg' width='400'/>

Expand Down
2 changes: 1 addition & 1 deletion cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Hitchhiker 是一款开源的 Restful Api 测试工具,支持Schedule, 数据
* 易部署 (支持 docker, windows, linux), 数据都存在自己这里,不会上传及丢失
* 会记往任何修改,不用怕没保存时session失效或系统重启
* 支持导入Postman v1 collections
* 分布式压力测试
* 压力测试
* 自动同步Team成员的Collection数据
* Api文档 (计划中...)

Expand Down
2 changes: 1 addition & 1 deletion cn/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

[issues](https://github.com/brookshi/Hitchhiker/issues)

[task.todo](https://github.com/brookshi/Hitchhiker/blob/master/tasks.todo)
[milestones](https://github.com/brookshi/Hitchhiker/milestones)
16 changes: 16 additions & 0 deletions cn/change_log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#### 0.13 2018-06-15

**Features:**

* \#93 folder 级和 collection 级的通用设置 request 基本信息,支持header, pre request script, test
* \#112 增加Stress Test结果的细节展示功能,支持表格/图表
* \#107 Auto dump mysql database to prevent data loss
* \#194 volumn logs to host for docker
* \#118 加一个环境变量来控制是否对数据库的密码加密

**Bugs:**

* \#197 刷新时正在同步更新session会导致cookie失效
* \#117 轻微bug: header中收藏的key 取消收藏以后,还会提示


#### 0.12.1 2018-06-01

**Features:**
Expand Down
6 changes: 4 additions & 2 deletions cn/installation/StepByStep.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
系统的参数可以参考:[配置文件](configuration.md), 环境变量可以写到pm2.json里

### 重要:如果是升级,记得保留build目录下的pm2.json,这里有你所有的配置,如果覆盖了需要重新设置
### 重要:如果是升级,下载安装包覆盖掉现有目录,然后使用命令:pm2 restart hitchhiker 即可,不需要再次走安装流程。但要记得保留build目录下的pm2.json,这里有你所有的配置,如果覆盖了需要重新安装

### 另外,安装碰到问题,可以参考最下方的问答,一般可以解决。

```json
{
Expand All @@ -24,7 +26,7 @@
> 创建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.12.1/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.12.1/Hitchhiker.zip);
1. 下载安装包 [https://github.com/brookshi/Hitchhiker/releases/download/v0.13/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.13/Hitchhiker.zip);
下载速度慢的可以去阿里云下载 http://hitchhiker.oss-cn-hongkong.aliyuncs.com/Hitchhiker.zip

2. 解压并在build目录下(即setup.js的目录)执行命令`node setup.js`(windows), `sudo node setup.js`(linux);
Expand Down
3 changes: 2 additions & 1 deletion cn/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ Hitchhiker的很多设置可以在appconfig.json里设置,也有对应的环
"schedule": {
"duration": 60, // schedule 监测时间间隔(秒) HITCHHIKER_SCHEDULE_DURATION
"storeUnit": "count", //schedule 存储的单位,支持按个数存 count 和按天存: day HITCHHIKER_SCHEDULE_STORE_UNIT
"storeLimit": 50, // schedule 存储的大小 HITCHHIKER_SCHEDULE_COUNT
"storeLimit": 50, // schedule 存储的大小 HITCHHIKER_SCHEDULE_STORE_LIMIT
"storeContent": "forFail", // schedule record response 是否存储, all表示所有都存下来, forFail表示只存失败的, none表示都不存(这会很大影响数据库大小和性能) HITCHHIKER_SCHEDULE_STORE_CONTENT
"pageSize": 20, // schedule record 在浏览器端显示的一页的个数 HITCHHIKER_SCHEDULE_PAGESIZE
"mailOnlyForFail": true // 只在失败时发邮件 HITCHHIKER_SCHEDULE_MAILFORFAIL
},
"stress": {
"stressType": "node", // 压力测试的类型,默认为node,内置的,还有go,需要部署hitchhiker-node,设为none时禁用 HITCHHIKER_STRESS_TYPE
"storeMaxCount": 5, // 压力测试表最大长度 HITCHHIKER_STRESS_COUNT
"stressHost": "", // 压力测试的host,为空时默认使用去掉端口的app的host HITCHHIKER_STRESS_HOST
"stressPort": 11010, // 压力测试的端口 HITCHHIKER_STRESS_PORT
"stressUpdateInterval": 1000 // 压力测试实时更新时的间隔(毫秒) HITCHHIKER_STRESS_UPDATE_INTERVAL
},
Expand Down
16 changes: 11 additions & 5 deletions cn/installation/docker.md
Original file line number Diff line number Diff line change
@@ -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.12.1
国内用户请使用阿里云的镜像 hitchhiker-cn:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.13

#### 参考下面命令,一步一步部署 (基于ubuntu,其他系统类似):
``` bash
Expand All @@ -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.12.1, 以及写入环境变量配置hitchhiker以及mysql)
# 修改完成后,保存退出 (国内用户改image地址:registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.13, 以及写入环境变量配置hitchhiker以及mysql)
...

# 执行docker-compose up安装镜像
Expand All @@ -36,7 +36,7 @@ curl http://ip:8080/
version: '2'
services:
hitchhiker:
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12.1
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=hitchhiker-mysql
Expand All @@ -47,6 +47,8 @@ services:
- "11010:11010"
volumes:
- /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project
- /my/hitchhiker/backup:/usr/src/Hitchhiker/build/backup
- /my/hitchhiker/logs:/usr/src/Hitchhiker/build/logs
links:
- hitchhiker-mysql:hitchhiker-mysql
hitchhiker-mysql:
Expand All @@ -67,7 +69,7 @@ services:
version: '2'
services:
hitchhiker:
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12.1
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=hitchhiker-mysql
Expand All @@ -77,6 +79,8 @@ services:
- "11010:11010"
volumes:
- /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project
- /my/hitchhiker/backup:/usr/src/Hitchhiker/build/backup
- /my/hitchhiker/logs:/usr/src/Hitchhiker/build/logs
links:
- hitchhiker-mysql:hitchhiker-mysql
hitchhiker-mysql:
Expand All @@ -96,7 +100,7 @@ services:
version: '2'
services:
hitchhiker:
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.12.1
image: registry.cn-hangzhou.aliyuncs.com/brook/hitchhiker-cn:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=192.168.0.10
Expand All @@ -109,6 +113,8 @@ services:
- "11010:11010"
volumes:
- /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project
- /my/hitchhiker/backup:/usr/src/Hitchhiker/build/backup
- /my/hitchhiker/logs:/usr/src/Hitchhiker/build/logs
```
#### 使用nginx和域名
Expand Down
2 changes: 1 addition & 1 deletion cn/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Hitchhiker 是一款开源的 Restful Api 测试工具,支持Schedule, 数据
* 易部署 (支持 docker, windows, linux), 数据都存在自己这里,不会上传及丢失
* 会记往任何修改,不用怕没保存时session失效或系统重启
* 支持导入Postman v1 collections
* 分布式压力测试
* 压力测试
* 自动同步Team成员的Collection数据
* Api文档 (计划中...)

Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/hitchhiker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
hitchhiker:
image: brookshi/hitchhiker:v0.12.1
image: brookshi/hitchhiker:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=hitchhiker-mysql
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/hitchhiker_and_mysql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
hitchhiker:
image: brookshi/hitchhiker:v0.12.1
image: brookshi/hitchhiker:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=hitchhiker-mysql
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/push_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export HITCHHIKER_VERSION="v0.12.1"
export HITCHHIKER_VERSION="v0.13"
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
Expand Down
2 changes: 1 addition & 1 deletion en/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Refer to

[issues](https://github.com/brookshi/Hitchhiker/issues)

[task.todo](https://github.com/brookshi/Hitchhiker/blob/master/tasks.todo)
[milestones](https://github.com/brookshi/Hitchhiker/milestones)
16 changes: 16 additions & 0 deletions en/change_log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#### 0.13 2018-06-15

**Features:**

* \#93 Common header/pre request script/test for requests in folder and collection
* \#112 More detail information of stress test result
* \#107 Auto dump mysql database to prevent data loss
* \#194 Volumn logs to host for docker
* \#118 Support encrypt password of user account in db

**Bugs:**

* \#197 Cookie invalid sometimes while syncing data
* \#117 Remove header's favorite function


#### 0.12.1 2018-06-01

**Features:**
Expand Down
4 changes: 2 additions & 2 deletions en/installation/StepByStep.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Hitchhiker setting refer to: [Configuration](configuration.md), environment variable could be set in pm2.json

### IMPORTANT:If upgrade, please keep your pm2.json which keep all settings of hitchhiker in root folder.
### IMPORTANT:If upgrade, download zip package and overwrite all files except build/pm2.json which keep all settings of hitchhiker in root folder, then call: pm2 restart hitchhiker.

```json
{
Expand All @@ -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.12.1/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.12.1/Hitchhiker.zip);
1. Download app package from [https://github.com/brookshi/Hitchhiker/releases/download/v0.13/Hitchhiker.zip](https://github.com/brookshi/Hitchhiker/releases/download/v0.13/Hitchhiker.zip);

2. Unzip and run command `node setup.js`(windows), `sudo node setup.js`(linux) in `build` folder;

Expand Down
1 change: 1 addition & 0 deletions en/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ when type of variable is boolean, use 1 for true and 0 for false.
"stress": {
"type": "node", // stress type, support node and go, HITCHHIKER_STRESS_TYPE
"storeMaxCount": 5, // max length of stress test list, HITCHHIKER_STRESS_COUNT
"stressHost": "", // host of stress test,if empty, use host of app without port, HITCHHIKER_STRESS_HOST
"stressPort": 11010, // port of stres test, HITCHHIKER_STRESS_PORT
"stressUpdateInterval": 1000 // stress test update interval (second), HITCHHIKER_STRESS_UPDATE_INTERVAL
},
Expand Down
4 changes: 3 additions & 1 deletion en/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If you want to use another port, should replace all 8080.
version: '2'
services:
hitchhiker:
image: brookshi/hitchhiker:v0.12.1
image: brookshi/hitchhiker:v0.13
container_name: hitchhiker
environment:
- HITCHHIKER_DB_HOST=hitchhiker-mysql
Expand All @@ -18,6 +18,8 @@ services:
- "11010:11010"
volumes:
- /my/hitchhiker/data:/usr/src/Hitchhiker/build/global_data/project
- /my/hitchhiker/backup:/usr/src/Hitchhiker/build/backup
- /my/hitchhiker/logs:/usr/src/Hitchhiker/build/logs
links:
- hitchhiker-mysql:hitchhiker-mysql
hitchhiker-mysql:
Expand Down

0 comments on commit 7e5cb07

Please sign in to comment.