https://github.com/showwin/hakari
Stress Test Tool for Web Application
https://github.com/showwin/hakari
stress-test
Last synced: 5 months ago
JSON representation
Stress Test Tool for Web Application
- Host: GitHub
- URL: https://github.com/showwin/hakari
- Owner: showwin
- License: mit
- Created: 2016-02-20T01:08:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-24T00:45:40.000Z (over 10 years ago)
- Last Synced: 2025-12-24T12:00:11.574Z (6 months ago)
- Topics: stress-test
- Language: Go
- Size: 39.1 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hakari
A Stress Test Tool for Web Application.
Easy to Install, Easy to Write Scenario.
## Installation
### OS X (homebrew)
```
$ brew tap showwin/hakari
$ brew install hakari
### How to Update ###
$ brew update
$ brew upgrade hakari
```
### Others (Linux, Windows.)
Please download the compatible package from [Releases](https://github.com/showwin/hakari/releases).
If there is no compatible package you want, please let me know by [issues](https://github.com/showwin/hakari/issues).
## Usage
```
$ hakari --help
Usage: hakari [option]
Options:
-w N Run with N workers. default: 2
-c FILE Config file. default: ./config.yml
-s FILE Scenario file. default: ./scenario.yml
-m N Run for N minutes. default: 1
```
### 1. Write Scenario
hakari uses YAML file to write request scenario, as follows:
```yaml
# scenario.yml
TopPage:
method: "GET"
url: "http://example.com/"
Login:
method: "POST"
url: "http://example.com/login"
parameter:
email: "user@example.com"
password: "secret_password"
BuyProduct:
method: "POST"
url: "http://example.com/products/buy/1234"
MyPage:
method: "GET"
url: "http://example.com/users/5555"
```
`method` and `url` are **required** for each request.
### 2. Run hakari
```bash
$ hakari
2016/02/21 18:12:47 hakari Start! Number of Workers: 2
2016/02/21 18:13:48 hakari Finish!
TopPage
200: 125 req, 238.66 ms/req
Login
200: 125 req, 255.11 ms/req
BuyProduct
200: 98 req, 247.68 ms/req
404: 1 req, 97.12 ms/req
500: 26 req, 143.82 ms/req
MyPage
200: 124 req, 233.42 ms/req
```
### (option) Customize HTTP Header
Require `Header` at top level. Write HTTP header fields freely.
```yaml
# config.yml
Header:
Accept: "*/*"
Accept-Encoding: "gzip, deflate, sdch"
Accept-Language: "ja,en-US;q=0.8,en;q=0.6"
Cache-Control: "max-age=0"
User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.39 Safari/537.36"
```
## LICENSE
[MIT](https://github.com/showwin/hakari/blob/master/LICENSE)