Locustfile Debugging


If you have errors in your locustfile your test will fail. These could be simple python parse errors, or actual issues with the definition of your test.

Test locally

You can ensure your script parses by writing it to a file locally, e.g. and parsing it:

python -m py_compile

Run a local locust test

You can also install locust as shown and then test file locally, in our example it's

sudo pip3 install locust
/usr/local/bin/locust -f --host https://YOUR_HOST_HERE -u 10 -r 10 --run-time 1m