{"schemaVersion":"1.0","record":{"label":"Locust","description":"Python load-testing framework with programmable users, HTTP clients and distributed workers.","aliases":[],"kind":"software","website":"https://locust.io/","overview":"Locust is an MIT-licensed load-testing framework that expresses simulated users and their behavior in Python. It can run through a web interface or without one, and coordinate multiple worker processes for larger tests.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Python load scenarios","status":"supported","detail":"User classes and tasks execute ordinary Python logic.","useCase":"Scripted HTTP and custom-protocol load testing","platforms":["Windows","macOS","Linux"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.locust.io/en/stable/writing-a-locustfile.html","locator":"Python tasks and HttpUser browser limitation","retrievedAt":"2026-10-07T11:03:29Z","kind":"vendor"}]},{"name":"Distributed workers","status":"supported","detail":"Master coordinates user-generating workers; the processes shortcut does not work on Windows.","useCase":"Scripted HTTP and custom-protocol load testing","platforms":["Windows","macOS","Linux"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.locust.io/en/stable/running-distributed.html","locator":"Master/worker roles and process-platform limits","retrievedAt":"2026-10-07T11:04:35.494Z","kind":"vendor"}]},{"name":"Other protocols","status":"limited","detail":"May use provided experimental integrations or custom instrumented clients; gevent-compatible I/O remains required.","useCase":"Scripted HTTP and custom-protocol load testing","platforms":["Windows","macOS","Linux"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.locust.io/en/stable/testing-other-systems.html","locator":"Request events and gevent compatibility","retrievedAt":"2026-10-07T11:04:37.138Z","kind":"vendor"}]}],"alternatives":[],"slug":"locust","draftAlternatives":[{"targetSlug":"apache-jmeter","status":"limited","detail":"Replaces HTTP load-generation workflows with Python tasks; non-HTTP samplers may need custom wrappers and plans are not directly interchangeable.","useCase":"Scripted HTTP and custom-protocol load testing","platforms":["Windows","macOS","Linux"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.locust.io/en/stable/writing-a-locustfile.html","locator":"Python tasks and HttpUser browser limitation","retrievedAt":"2026-10-07T11:03:29Z","kind":"vendor"},{"url":"https://docs.locust.io/en/stable/testing-other-systems.html","locator":"Request events and gevent compatibility","retrievedAt":"2026-10-07T11:04:37.138Z","kind":"vendor"},{"url":"https://jmeter.apache.org/","locator":"Features and browser limitations","retrievedAt":"2026-10-07T11:00:02Z","kind":"vendor"}]}],"evidence":[{"url":"https://docs.locust.io/en/stable/what-is-locust.html","locator":"Python, interfaces and MIT licensing","retrievedAt":"2026-10-07T11:00:02Z","kind":"vendor"},{"url":"https://docs.locust.io/en/stable/testing-other-systems.html","locator":"Request events and gevent compatibility","retrievedAt":"2026-10-07T11:04:37.138Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://docs.locust.io/en/stable/what-is-locust.html","locator":"Python, interfaces and MIT licensing","retrievedAt":"2026-10-07T11:00:02Z","id":"locust-home","title":"What is Locust?","kind":"vendor"},{"url":"https://docs.locust.io/en/stable/writing-a-locustfile.html","locator":"Python tasks and HttpUser browser limitation","retrievedAt":"2026-10-07T11:03:29Z","id":"locust-code","title":"Writing a Locust file","kind":"vendor"},{"url":"https://docs.locust.io/en/stable/running-distributed.html","locator":"Master/worker roles and process-platform limits","retrievedAt":"2026-10-07T11:04:35.494Z","id":"locust-dist","title":"Locust distributed tests","kind":"vendor"},{"url":"https://docs.locust.io/en/stable/testing-other-systems.html","locator":"Request events and gevent compatibility","retrievedAt":"2026-10-07T11:04:37.138Z","id":"locust-other","title":"Locust other protocols","kind":"vendor"},{"url":"https://jmeter.apache.org/","locator":"Features and browser limitations","retrievedAt":"2026-10-07T11:00:02Z","id":"jmeter-home","title":"Apache JMeter overview","kind":"vendor"}],"overviewCitations":["locust-home"],"licenseCitations":["locust-home"],"sections":[{"id":"tasks","heading":"Python user behavior","paragraphs":[{"id":"tasks-detail","content":[{"text":"A test is a Python module containing user classes and tasks. Each simulated user executes its task code sequentially inside a gevent greenlet, while many users run concurrently. Ordinary Python functions and packages can supply application-specific logic, data preparation and reusable helpers. This favors teams that want to review tests as code rather than maintain a separate graphical test-plan format."}],"citations":["locust-code"]}]},{"id":"http","heading":"HTTP requests rather than browser sessions","paragraphs":[{"id":"http-detail","content":[{"text":"The built-in HttpUser provides an HTTP client and preserves cookies, but it is not a browser. It does not interpret an HTML response to fetch every referenced asset or render the page. A workflow that depends on client-side JavaScript therefore needs a different testing approach or explicit request modeling. HTTP latency measurements should not be presented as evidence of visual page-load performance."}],"citations":["locust-code"]}]},{"id":"workers","heading":"Coordinating load generators","paragraphs":[{"id":"workers-detail","content":[{"text":"In distributed mode, a master supplies the web interface and instructs workers to start or stop users; the master does not generate those users itself. Workers send statistics back for aggregation. The convenient processes option relies on process forking and is unavailable on Windows, which is a limitation of that launcher rather than evidence that all Locust usage is unsupported there. CPU capacity remains a practical constraint on traffic generation."}],"citations":["locust-dist"]}]},{"id":"extensions","heading":"Other protocols and licensing","paragraphs":[{"id":"extensions-detail","content":[{"text":"HTTP/HTTPS is Locust’s primary built-in workflow. Other protocols may use supplied integrations, including the documented experimental SocketIOUser and MqttUser, or a custom client that reports request events. Client I/O must cooperate with gevent: blocking I/O inside compiled libraries can stall an entire worker process unless a suitable workaround exists. Provided experimental integrations can change without notice. The framework’s MIT license permits reuse under its terms, but does not guarantee compatibility with every Python networking package."}],"citations":["locust-other","locust-home"]}]},{"id":"fit","heading":"Substitution scope","paragraphs":[{"id":"fit-detail","content":[{"text":"Locust can substitute for "},{"text":"Apache JMeter","targetSlug":"apache-jmeter"},{"text":" for scripted HTTP load generation where Python is the preferred authoring language. The tradeoff is moving from JMeter's plan editor and built-in sampler selection to Python tasks and, for non-HTTP systems, potentially custom instrumentation. Existing JMeter plans are not established as directly importable. A migration should preserve user pacing, request sequences and test-data isolation rather than merely matching a virtual-user count."}],"citations":["locust-code","locust-other","jmeter-home"]}]}]},"id":"Q1663","revision":1776,"updatedAt":"2026-10-25T22:13:37Z","sourceUrl":"https://substitutefor.net/entities/Q1663?revision=1776"}}