- Download and install Python 3.x
- If it is already installed, check in terminal:
python --version
- Make sure to have the latest pip version installed
python.exe -m pip install --upgrade pip
- Install locust
pip3 install locust
Locust files from this repository use the following domains:
locust file | base URL |
---|---|
BookCartAPI | https://bookcart.azurewebsites.net/api |
LibraryAPI | https://postman-library-api.glitch.me |
ShopDemoQA | https://shop.demoqa.com |
- Start locust
locust -f <path>/locustfile.py
- Access http://localhost:8089/ and set:
- number of users
- spawn rate
- base URL*
*only if host is not set in locust file.
locust --headless --users 1 --spawn-rate 1 -H <base_url>
This is and example of Response time (ms) diagram. It was generated using locust in UI mode and generating html report.
Generated using locust in UI mode, then saved a html report which contains these types of diagrams and statistics:
Generated using locust in UI mode, then saved a html report which contains these types of diagrams and statistics: