Locust is a load testing framework.
Setup the endpoints you want to test on the locustfile.py.
You will need docker and docker-compose installed in your system, in order to run this infrastructure.
Type:
docker compose up
Or, if you want to run it in the background
docker compose up -d
If you want to scale the number of workers:
docker-compose up --scale worker=4
Access the UI at http://localhost:8089/ and run your tests.
Some result tests can be found here. You can preview them here.
URL="/collections/srup_arvores_point" SAFE_NAME=$(echo "$URL" | sed 's|/||g; s|^||') CSV_PREFIX="/mnt/locust/reports/report_${SAFE_NAME}"
docker compose run
-e "LOCUST_URL=$URL"
--rm
master
-f /mnt/locust/locustfile.py
-H "https://ogcapi.dgterritorio.gov.pt"
--headless
--users 100
--spawn-rate 1
--run-time 180s
--csv "${CSV_PREFIX}"
--html "/mnt/locust/reports/report_${SAFE_NAME}.html"
This project is released under an MIT License