-
Installation
-
Docker
- sudo apt-get install docker
- sudo apt install docker.io
-
Midnight Commander
- sudo apt install mc
-
Pull an Yandex-tank image
- sudo docker pull direvius/yandex-tank
-
Create work directory with:
1) token-file (.txt)
2) test-file (.yaml)
3) ammo-file (.txt)
-
Create token-file
- use https://overload.yandex.net/ to receive your token
-
create empty token.txt file
- sudo touch token.txt
- fill it with your token
-
Create loadtest.yaml file with test scenario
- overload:
enabled: true
package: yandextank.plugins.DataUploader
token_file: "token.txt"
phantom:
address: [your address: port]
ssl: true //for https
load_profile:
load_type: rps
schedule: line(1, 1, 10s)
ammofile: ammo.txt
ammo_type: uripost
console:
enabled: true
telegraf:
enabled: true
-
Create ammo.txt file with your post-method
- [Host: [your address: port]]
[Connection: keep-alive]
[X-Real-Ip: 111.111.111.111]
[Authorization:[your token]]
[Content-Type: application/json-patch+json]
[size] /api/[your api]
{"[body of your request]"}
-
Run Docker container, change entrypoint
- docker run \
-v $(pwd):/var/loadtest \
-v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent \
--net host \
-it \
--entrypoint /bin/bash \
direvius/yandex-tank
-
In my case: sudo docker run -v $(pwd):/var/loadtest -v $SSH_AUTH_SOCK:/ssh-agent -v ~/yandex-tank/:/var/dasha/ -e SSH_AUTH_SOCK=/ssh-agent --net host -it --entrypoint /bin/bash direvius/yandex-tank
- my directory ~/yandex-tank
-
Start your test Within container with yandex-tank command
- sudo yandex-tank -c /var/dasha/loadtest.yaml -i
-
Results
- using your console
-
using https://overload.yandex.net
-
Public tests
- show my tests only