NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1189 most downloaded on PyPI
Developer-friendly load testing framework
Last release today
04 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
1050 releases · first in 2020
One column per quarter.
Fix docker builds (2.0 final never got pushed to Docker Hub)
This release contains changes that could break/change the behaviour of some existing locust files (but probably not many).
This release contains changes that could break/change the behaviour of some existing locust files (but probably not many).
This has allowed us to fix some issues with incorrect/skewed User type selection and undesired stepping of ramp up. The issues were especially visible when running many workers and/or using LoadShape:s. This change also allows redistribution of Users if a worker disconnects during a test. This is a major change internally in Locust so please let us know if you encounter any problems (particularly regarding ramp up pace, User distribution, CPU usage on master, etc)
user_classes_count from heartbeat payload (2.0.0b4) https://github.com/locustio/locust/pull/1825Improve logging messages and clean up code after dispatch refactoring (2.0.0b4) https://github.com/locustio/locust/pull/1826
user_classes_count from heartbeat payload (2.0.0b4) https://github.com/locustio/locust/pull/1825Fire test_start and test_stop events on worker nodes \#1777 (nathan-beam)
Auto shrink request stats table to fit terminal https://github.com/locustio/locust/pull/1811
Check version of workers when they connect. Warn if there is a mismatch, refuse 1.x workers to connect https://github.com/locustio/locust/pull/1805 (2
Move User selection responsibility from worker to master in order to fix unbalanced distribution of users and uneven ramp-up https://github.com/locust
Allow cross process communication using custom messages https://github.com/locustio/locust/pull/1782
…(that event was deprecated 1.5.0, but will work again now)
Pin version of flask to 1.1.2, fixing "KeyError: 'extensions'" https://github.com/locustio/locust/issues/1759
Fixed a minor issue with 1.5.0 where an extra parameter (start_time) was passed to request event https://github.com/locustio/locust/pull/1754
Fixed an issue with 1.5.0 where an extra parameter (start_time) was passed to request event https://github.com/locustio/locust/pull/1754
Updated request event with context and deprecate request\_failure/success \#1750 Add response object to request event \#1752
Unify request_success/request_failure into a single event called request (the old ones are deprecated but still work) https://github.com/locustio/locust/issues/1724
Add the response object and context as parameters to the request event. context is used to forward information to the request event handler (can be used for things like username, tags etc)
Ensure runner.quit finishes even when users are broken https://github.com/locustio/locust/pull/1728
fix stats values for chart tooltips \#1691 (aek)
Multiple improvements for charting including tooltips etc
Fix 100% cpu usage when running in docker/non-tty terminal https://github.com/locustio/locust/issues/1629
You can now control user count from terminal while the test is running https://github.com/locustio/locust/pull/1612
Fix XSS vulnerability in the web UI (sounds important but really isn't, as Locust UI is not meant to be exposed to outside users)
(side note: I have also fixed the docker build process, so any tagged commit will push to locustio/locust:latest, this was broken in the past)
Bump minimum required gevent version to 20.9.0 (latest), as all the previous ones had sneaky binary incompatibilities with the latest version of green
Breaking change: Remove step-load feature (now that we have LoadTestShape it is no longer needed)
Bug fixes:
Various linting fixes that *should* have no functional impact
Bug fix (LoadTestShape in headless mode https://github.com/locustio/locust/pull/1539)
Bug fix (StatsEntry.use_response_times_cache must be set to True, https://github.com/locustio/locust/issues/1531)
Rename hatch rate to spawn rate (the –hatch-rate parameter is only deprecated, but the hatch_complete event has been renamed spawning_complete)
Fix for run not ending if there is an exception in a test_stop listener
--run-time flag is not respected if there is an exception in a test_stop listener
FastHttpUser: Handle stream ended at an unexpected time and UnicodeDecodeError. Show bad/error status codes on failures page.
Improve logging when locust master port is busy
The official Docker image is now based on the python:3.8 image instead of python:3.8-alpine. This should make it easier to install other python packag
python:3.8 image instead of python:3.8-alpine. This should
make it easier to install other python packages when extending the locust docker image. #1435The official Docker image is now based on the python:3.8 image instead of python:3.8-alpine. This should make it easier to install other python packages when extending the locust docker image.
Allow Users to stop the runner by calling self.environment.runner.quit() (without deadlocking sometimes)
Cut to only 5% free space on the top of the graphs
Use csv module to generate csv data (solves issues with sample names that need escaping in csv)
Various documentation improvements
Ability to control the exit code of the Locust process by setting environment.process_exit_code
'Module' object is not callable \#1387
Fixed bugs:
Closed issues:
Merged pull requests:
Check for low open files limit (ulimit) and try to automatically increase it from within the locust process.
Other various bug fixes as improvements
Add metadata for the locust PyPI package that marks the locustio package as obsolete \#1377 (heyman)
FastHttpUser doesn't use the SNI TLS extension \#1360
Fixed bugs:
Closed issues:
Merged pull requests:
This version contains some breaking changes.
We've renamed the Locust and HttpLocust classes to User and HttpUser. The locust attribute on TaskSet instances has been renamed to user.
The parameter for setting number of users has also been changed, from -c / --clients to -u / --users.
It's now possible to declare tasks directly under a User class like this:
class WebUser(User):
@task
def some_task(self):
pass
In tasks declared under a User class (e.g. some_task in the example above), self refers to the User instance, as one would expect. For tasks defined under a TaskSet class, self would refer to the TaskSet instance.
The task_set attribute on the User class (previously Locust class) has been removed. To declare a User class with a single TaskSet one would now use the tasks attribute instead:
class MyTaskSet(TaskSet):
...
class WebUser(User):
tasks = [MyTaskSet]
A new tag feature has been added that makes it possible to include/exclude tasks during a test run.
Tasks can be tagged using the @tag decorator:
class WebUser(User):
@task
@tag("tag1", "tag2")
def my_task(self):
...
And tasks can then be specified/excluded using the --tags/-T and --exclude-tags/-E command line arguments.
The following changes has been made to the configuration environment variables
LOCUST_MASTER has been renamed to LOCUST_MODE_MASTER (in order to make it less likely to get variable name collisions when running Locust in Kubernetes/K8s which automatically adds environment variables depending on service/pod names).
LOCUST_SLAVE has been renamed to LOCUST_MODE_WORKER.
LOCUST_MASTER_PORT has been renamed to LOCUST_MASTER_NODE_PORT.
LOCUST_MASTER_HOST has been renamed to LOCUST_MASTER_NODE_HOST.
CSVFILEBASE has been renamed to LOCUST_CSV.
See the configuration documentation for a full list of available environment variables.
The master/slave terminology has been changed to master/worker. Therefore the command line arguments --slave and --expect-slaves has been renamed to --worker and --expect-workers.
The option for running Locust without the Web UI has been renamed from --no-web to --headless.
Removed Locust.setup, Locust.teardown, TaskSet.setup and TaskSet.teardown hooks. If you want to run code at the start or end of a test, you should instead use the test_start and test_stop events:
from locust import events
@events.test_start.add_listener
def on_test_start(**kw):
print("test is starting")
@events.test_stop.add_listener
def on_test_start(**kw):
print("test is stopping")
TaskSequence and @seq_task has been replaced with SequentialTaskSet.
A User count column has been added to the history stats CSV file. The column order and column names has been changed.
The official docker image no longer uses a shell script with a bunch of special environment variables to configure how how locust is started. Instead, the locust command is now set as ENTRYPOINT of the docker image. See running-in-docker for more info.
Command line option --csv-base-name has been removed, since it was just an alias for --csv.
The way Locust handles logging has been changed. We no longer wrap stdout (and stderr) to automatically make print statements go into the log. print() statements now only goes to stdout. To add custom entries to the log, one should now use the Python logging module:
import logging
logging.info("custom logging message)
For more info see logging
It's now possible to protect the Web UI with Basic Auth using the --web-auth command line argument.
The Web UI can now be served over HTTPS by specifying a TLS certificate and key with the --tls-cert and --tls-key command line arguments.
If the number of users and hatch rate are specified on command line, it's now used to pre-populate the input fields in the Web UI.
Added --config command line option for specifying a configuration file path
The code base has been refactored to make it possible to run Locust as a python lib.
It's now possible to call response.failure() or response.success() multiple times when using the catch_response=True in the HTTP clients. Only the last call to success/failure will count.
The --help output has been improved by grouping related options together.
Your coding agent can read these notes before it upgrades. Set up the MCP server →