Locust is a load testing tool that lets you write performance tests in plain Python code.
Locust addresses the problem of defining load tests without being constrained by graphical interfaces or domain-specific languages. It works by letting developers write test scenarios as regular Python code, with each simulated user running inside its own greenletβa lightweight coroutine that allows blocking code to execute concurrently. This approach means you can use standard Python control flow, import libraries, and leverage your normal development environment and version control systems instead of working with XML, binary formats, or GUI-based test builders.
Locust suits teams that want to version control their tests as code and avoid vendor lock-in to proprietary test definition formats. It works well for testing HTTP and other protocols at scale, supporting hundreds of thousands of concurrent users across distributed machines. The tool offers both a web-based UI for real-time monitoring and command-line operation for CI/CD integration, with the ability to adjust load during a running test. The event-based architecture using gevent keeps per-user overhead low, making it particularly effective for highly concurrent workloads where you need many simultaneous connections on modest hardware.
The project maintains steady activity with regular commits addressing bug fixes, feature additions, and documentation improvements. Development includes ongoing work to expand protocol support beyond HTTP and to enhance the distributed testing capabilities. The maintainers actively respond to issues and pull requests, indicating sustained engagement with the user base. The codebase receives updates that refine the core greenlet-based execution model and improve the web UI's real-time reporting features.