castelislogice/tsung
Tsung - Stress test tool - Docker Image (Multiarch)
1.4K
docker run -d --name tsung -v /path/to/local/folder/for/scenario:/root/.tsung/ -p 8090:8090 -p 8091:8091 castelislogice/tsung
This will create a container with a running Tsung instance. You can then call docker stop tsung
to stop it.
Launch this command to start router to listen to your scenario
docker exec tsung tsung-recorder start
This will create a new scenario in your /path/to/local/folder/for/scenario
defined in initialization.
In your browser, configure proxy for all your calls (usually : Settings > Network > Proxy) with these values :
To write your scenario, just navigate though your website. Each action will be grabbed by the Tsung router and added to the scenario. Once finished, stop the record
Important note : Tsung cannot handle HTTPS request through HTTPS protocol. Replace it to http://- instead.
E.g. https://www.google.com -> http://-www.google.com
docker exec tsung tsung-recorder stop
Your scenario is now written in your folder!
Just run this command
docker exec tsung tsung start
By default, it reads tsung.xml
but you can use :
docker exec tsung tsung start -f <scenario>
with <scenario>
the file of your scenario to test.
When running, you can check the dashboard right here http://localhost:8091
When everything went fine for your tests, You'll probably want to see graph report on your stats.
Just run this command to generate a report:
docker exec tsung tsung-report <log_file>
With <log_file>
optional parameter to your log folder session. By default, it reads the latest folder in you log directory.
For example, for log ./log/20170609-1623
, just precise 20170609-1623
docker pull castelislogice/tsung