This repository has some examples of load tests focused on the locust and jmeter tools, being a complement to the learn experience presentation.
To execute the instructions below, you need a unix environment and have the Makefile, python and the venv library to configure the virtual environment.
(.xvenv) adrianolaselva@DESKTOP-OU8K4PD:/mnt/d/dados/workspaces/stress-tests/locust$ make
β help Help List All Commandsβ
β locust-configure Stack Configure Stack π
β locust-version Infra Infrastructure DOWN π
β locust-run Locust Locust Run Without specify Script π
β locust-run-script Locust Locust is run by specifying script π
Example output make command
make locust-configure
Configure Locust stack
make locust-run
Example command to start locust application without specify script, by default locust expects a "locustfile.py" file from the execution directory.
make locust-run-script ./src/scenary_test_one.py
Example command to start locust by specifying a test script.
locust --headless -u 1 -t 2s --processes 1 -f ./src/scenary_test_one.py
Example of locust execution informing some of the possible additional parameters, including users, execution time and number of processes.
When running locust, by default it will be available at the address "localhost:8089" if it is not run only for the command line
Locust page when running it as default
Example of terminal output when running locust via command line only
make jmeter-configure
Configure jMeter stack
make jmeter-run
Example command to start jMeter application without specify script.
make jmeter-run-script ./jmeter-scripts/http-request-example-one.jmx
Example command to start jMeter application without specify script.
./jmeter/bin/jmeter -Jthreads=1 -n -t ./src/scenary_test_one.py
Example of jMeter execution informing some of the possible additional parameters, including number of threads.
When running jMeter, by default a desktop application will open where it is possible to configure test settings, and it will also be possible to save it to run via the command line, for example in a pipeline.
JMeter page when running it as default