This is a quick template for creating load tests with Locust.
Either of the following:
docker
withdocker-compose
python3
-
Update the endpoints and parameters in src/main.py to the environment you'd like to test.
NOTE: Sample GET and POST endpoints are provided in the file.
-
Run locust through the startup script
- With
docker-compose
:docker-compose up
- With
python
(this creates a virtualenv and installs the requirements):./start.sh
- With
-
Access the Locust UI at http://localhost:8089
-
Use the host of your backend as the URL, and set the number of users and spawn rate to your desired load test.
This project uses the Locust library for load testing.
You can also install the dev dependencies for formatting and linting.
pip install -r requirements_dev.txt