Verify your website can handle expected traffic before launch by simulating thousands of concurrent users.
Identify slow pages and performance bottlenecks by running load tests and analyzing response times.
Automate load testing in CI/CD pipelines using headless mode without needing a GUI.
Test custom protocols and APIs by writing Python code to define realistic user behavior patterns.
Locust is an open-source load testing tool that lets you check how well your website or web service holds up under pressure. Load testing means simulating many users hitting your site at the same time to find bottlenecks, the breaking points where your server slows down or crashes. The name "locust" refers to a swarm, which is exactly what it simulates: many users descending on your service simultaneously. What makes Locust different from other tools is that you write your test scenarios in plain Python code rather than clicking through a GUI or writing in a special language. You define a "user" class that describes what a virtual user does, logging in, browsing pages, submitting forms, and Locust spawns thousands of these virtual users simultaneously. Because each user runs inside a lightweight concurrency mechanism, a single computer can simulate a massive number of concurrent users. Locust comes with a web-based dashboard you can open in your browser to watch the test run in real time, seeing stats like response times, throughput (requests per second), and error rates. You can even adjust the number of simulated users while the test is running. It also works headlessly (without the UI) for use in automated testing pipelines. You would use Locust when you are about to launch a product and want to verify it can handle expected traffic, or when you suspect a slow page and want to find the cause. It is written in Python and supports HTTP as well as other protocols with custom clients.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.