Locust is a performance and load testing tool for HTTP and other protocols. You define scenarios in Python and run them from the command line or a built-in web UI.
Overview
Locust targets teams who want load tests expressed as ordinary Python instead of proprietary GUIs or DSLs. Each simulated user runs in its own greenlet, so scenarios can use loops, conditionals, and calculations with standard language features.
Tests report throughput, response times, and errors in real time through a browser dashboard where you can adjust load while a run is in progress. The same workloads can run headless for automated pipelines without the UI.
The design scales horizontally across machines and relies on gevent so one process can drive many concurrent users. Community plugins extend coverage beyond HTTP to other protocols via custom clients.
Locust is intentionally minimal at the core so teams adapt behavior with plain Python imports and hooks rather than fixed built-in workflows.
Key features
- User scenarios written in Python
- Real-time web dashboard
- Headless CLI and CI-friendly runs
- Distributed multi-machine execution
- Pluggable clients for other protocols
- Greenlet-based concurrent virtual users
- Exportable metrics and error stats
- VS Code extension with Copilot support
Use cases
- HTTP API load testing
- Concurrent workload benchmarking
- CI/CD performance gates
- Multi-machine distributed load runs