On this page you find all important commands for the CLI tool locust. If the
command you are looking for is missing please ask our AI.
locust
Locust is a command-line tool and open-source distributed load testing tool for web applications. Developed in Python, it allows users to simulate thousands of concurrent users to test the performance, scalability, and reliability of web applications.
- Locust allows developers and testers to create and execute customizable load tests by defining user behavior through Python code.
- It offers an intuitive user interface that displays real-time statistics and allows for easy debugging and monitoring during the test.
- Users can define different scenarios and spawn virtual users, known as "locusts," that perform the defined tasks on the target web application.
- Locust consists of a master and multiple worker nodes, enabling distributed load testing across multiple machines, thus increasing the load capacity.
- Users can define the number of concurrent users, user spawn rate, and the tasks to be executed during the test.
- It supports different protocols such as HTTP, HTTPS, WebSockets, and more, making it suitable for various types of web applications.
- Locust provides detailed statistics on request/response times, response codes, failure rates, and other metrics, helping identify performance bottlenecks and areas for improvement in the application.
- Its scalability allows users to increase or decrease the number of virtual users dynamically during a test to mimic real-world usage patterns.
- Locust also supports running tests with heavy spikes of user load, simulating sudden traffic surges to assess how the application handles such situations.
- As an open-source tool, Locust has an active community of contributors, ensuring continuous development, bug fixes, and the availability of new features.
List of commands for locust:
-
locust:tldr:4c299 locust: Run test without web interface, spawning 1 user a second until there are 100 users.$ locust --no-web --clients=${100} --hatch-rate=${1} --host=${http:--example-com}try on your machineexplain this command
-
locust:tldr:56143 locust: Connect locust slave to master on a different machine.$ locust --slave --master-host=${master_hostname} --host=${http:--example-com}try on your machineexplain this command
-
locust:tldr:a1ba3 locust: Start locust in master mode.$ locust --master --host=${http:--example-com}try on your machineexplain this command
-
locust:tldr:bc818 locust: Connect locust slave to master.$ locust --slave --host=${http:--example-com}try on your machineexplain this command
-
locust:tldr:d7a40 locust: Use a different test file.$ locust --locustfile=${test_file-py} --host=${http:--example-com}try on your machineexplain this command
-
locust:tldr:f2808 locust: Load-test "example.com" with web interface using locustfile.py.$ locust --host=${http:--example-com}try on your machineexplain this command