Skip to content

Locust

Open-source load testing tool where you write test scenarios as plain Python code.

Stars
28.3k
Forks
3.3k
Licence
MIT
Language
Python
Last update
4 days ago
Type
App

What it is

Locust is a free, open-source tool for load testing, which means simulating many users at once to see how a web service or other system behaves under pressure. You describe user behavior in ordinary Python code, then run the test from the command line or a web UI that shows throughput, response times, and errors in real time. Its README says it works mainly with HTTP but can be extended to other protocols.

  • Simulate a login flow followed by repeated API requests, with weighted task selection
  • Run the same test headless in a CI pipeline and fail the build on errors
  • Change the number of simulated users while a test is running through the web UI
  • Distribute a test across multiple machines using its worker mode
  • Export test results for later analysis

Great for

  • Backend or QA engineers who want load tests kept in version control as normal code
  • Python teams who want to reuse existing libraries inside their tests
  • Teams running load tests in CI/CD pipelines without a GUI
  • Anyone who needs to test highly concurrent workloads from several machines

Not ideal for

  • People who want a no-code tool, since tests are written in Python
  • Teams testing non-HTTP systems who are unwilling to write a custom client, since the README says other protocols need one
  • Users looking for a hosted service, since the README points to Locust Cloud and Azure options separately rather than describing a built-in hosted offering
Step-by-step guide: how to use LocustInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python

    Install from PyPI

    pip install locust
  2. 2

    Run it

    • Install Locust with pip
    • Write a test file that defines a user class with tasks, such as the QuickstartUser example in the README
    • Start Locust and open the web UI, or run it headless from the command line
    • Set the number of users and target host, then start the test and watch the charts
  3. 3

    Get the most out of it

    • Use custom load shapes to control how user counts change over time, as covered in the docs
    • Send real-time reporting data to TimescaleDB and Grafana using community plugins listed in the README
    • Scale out by running worker machines for distributed tests
    • Explore the community extensions listed on the project wiki
    • Use the VS Code extension from Microsoft if you want Copilot-assisted test creation

Downloads

Strengths

  • Tests are plain Python, so they work with IDEs, version control, and existing libraries
  • Each simulated user is lightweight, so one process can handle many concurrent users according to the README
  • Offers both a web UI and a headless mode for automation

Trade-offs

  • Requires Python knowledge to write tests, and the README describes it as primarily aimed at web services
  • Performance per machine depends on hardware; the README acknowledges other tools may handle more requests per second on the same hardware
  • Testing non-HTTP systems requires writing your own client code

How it compares

ProjectStarsTypeLevelUpdatedBest for
locust (this)28.3kAppintermediate4 days agoBackend or QA engineers who want load tests kept in version control as normal code
vegeta25.2kCLIintermediate1 months agoBackend developers checking how an HTTP API behaves under a fixed request rate
oha10.7kCLIbeginner4 days agoDevelopers checking how an API or website handles many simultaneous requests
systeminformer16.4kAppintermediate4 days agoWindows users who want more detail than Task Manager provides
BenchmarkDotNet11.5kLibraryintermediate5 days ago.NET developers who want to compare two or more implementations of a method
nginx-admins-handbook14.3kLearning resourcebeginner2.0 years agoSystem administrators who already run NGINX and want practical tips

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.