Yandex.Tank For Load Testing How To Send Request Body In Post-Method
6
A mind map about Yandex.Tank For Load Testing
Tags:
Similar Mind Maps
Outline


Docker
sudo apt-get install docker
sudo apt install docker.io
Midnight Commander
sudo apt install mc

sudo docker pull direvius/yandex-tank

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: uripostconsole: enabled: truetelegraf: 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]"}

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

sudo yandex-tank -c /var/dasha/loadtest.yaml -i

using your console
using https://overload.yandex.net
Public tests
show my tests only