Locust is an open source load testing tool. Load testing is a type of software testing that is conducted to check the tolerance/behavior of the system under a specific expected load. The target of locust is load-testing web sites and checking number of concurrent users a system can handle.
During a locust test, a swarm of locusts will attack the target i.e website. The behavior of each locust is configurable and the swarming process is monitored from a web UI in real-time.
Speciality of locust:
- Test scenarios can be written in Python
- Distributed and scalable
- Web-based UI
- Any system can be tested using this tool
Locust can be installed with pip.
pip install locust
Once the locust is successfully installed, a locust command should be available in your shell.
To see more available options:
To run the above code, create a Python file named
locustfile.py, and open the terminal in the directory of the above created file. Then write the following command in the terminal.
Note: By default locust searches for
After the successful execution of the above command, you should open a browser and hit http://127.0.0.1:8089
The Locust UI will appear like below:
- Object Oriented Testing in Software Testing
- json.load() in Python
- How to dynamically load JS inside JS ?
- numpy.load() in Python
- Difference between DOMContentLoaded and load Events
- How to Dynamically Load Modules or Classes in Python
- Load CSV data into List and Dictionary using Python
- Testing with Jest
- Unit Testing in Python - Unittest
- Testing in Python using doctest module
- Automated software testing with Python
- Python | Testing Output to stdout
- Equivalence Class Testing- Next date problem
- Python | Exceptional Conditions Testing in Unit Tests
- PyQt5 QColorDialog - Testing Color Dialog Options
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.