Scalable user load testing tool written in Python

Overview

Locust

Build Status codecov license PyPI PyPI GitHub contributors

Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, instead of using a clunky UI or domain specific language. This makes Locust infinitely expandable and very developer friendly.

Features

Write user test scenarios in plain-old Python

If you want your users to loop, perform some conditional behaviour or do some calculations, you just use the regular programming constructs provided by Python. Locust runs every user inside its own greenlet (a lightweight process/coroutine). This enables you to write your tests like normal (blocking) Python code instead of having to use callbacks or some other mechanism. Because your scenarios are “just python” you can use your regular IDE, and version control your tests as regular code (as opposed to some other tools that use XML or binary formats)

from locust import HttpUser, task, between

class QuickstartUser(HttpUser):
    wait_time = between(1, 2)

    def on_start(self):
        self.client.post("/login", json={"username":"foo", "password":"bar"})

    @task
    def hello_world(self):
        self.client.get("/hello")
        self.client.get("/world")

    @task(3)
    def view_item(self):
        for item_id in range(10):
            self.client.get(f"/item?id={item_id}", name="/item")

Distributed & Scalable - supports hundreds of thousands of users

Locust makes it easy to run load tests distributed over multiple machines. It is event-based (using gevent), which makes it possible for a single process to handle many thousands concurrent users. While there may be other tools that are capable of doing more requests per second on a given hardware, the low overhead of each Locust user makes it very suitable for testing highly concurrent workloads.

Web-based UI

Locust has a user friendly web interface that shows the progress of your test in real-time. You can even change the load while the test is running. It can also be run without the UI, making it easy to use for CI/CD testing.

Locust UI charts Locust UI stats Locust UI workers Locust UI start test

Can test any system

Even though Locust primarily works with web sites/services, it can be used to test almost any system or protocol. Just write a client for what you want to test, or explore some created by the community.

Hackable

Locust is small and very flexible and we intend to keep it that way. If you want to send reporting data to that database & graphing system you like, wrap calls to a REST API to handle the particulars of your system or run a totally custom load pattern, there is nothing stopping you!

Links

Authors

License

Open source licensed under the MIT license (see LICENSE file for details).

Comments
  • Move User selection responsibility from worker to master in order to fix unbalanced distribution of users and uneven ramp-up

    Move User selection responsibility from worker to master in order to fix unbalanced distribution of users and uneven ramp-up

    Fixes #1618 Fixes #896 Fixes #1635

    There's quite a lot of changes in this PR, but it was required to solve these two issues.

    Changes

    • New logic for computing the distribution of users (locust/distribution.py).
    • New logic for dispatching the users (locust/dispatch.py). The master is now responsible to compute the distribution of users and then dispatching a portion of this distribution to each worker. The spawn rate is also respected in distributed mode.
    • Possible breaking change: signature of spawning_complete event now takes user_class_occurrences instead of user_count.
    • Behaviour change: users are no longer stopped at a rate of spawn_rate. See the docstring of locust.dispatch.dispatch_users for the rationale behind this decision. The correct way to have a ramp down is to use the load test shape feature.

    Demo

    Example of a real distributed load test shape with 5 workers and a stop timeout of 30s: image image

    Load test shape profile for this run: | duration | users | spawn rate | | ------------- | ------------- | ------------- | | 2m | 5 | 1 | | 2m | 10 | 1 | | 2m | 15 | 1 | | 2m | 20 | 1 | | 5m | 25 | 1 | | 2m | 20 | 1 | | 2m | 15 | 1 | | 2m | 10 | 1 | | 2m | 1 | 1 | | 5m | 25 | 5 | | 2m | 1 | 1 | | 5m | 25 | 5 | | 2m | 1 | 1 |

    The ramp-up of each stage takes around 4-5s which correlates with the spawn rate of 1. Also, we can see that the users are gracefully stopped (or killed after the stop timeout of 30s). That's why the ramp-down have the small staircases instead of one single drop.

    Other

    I hope I did not break anything. All the tests are passing, but while running some real load tests (such as the one above), it seems like the users are not always properly stopped. I added an integration test in test_runners.TestMasterWorkerRunners.test_distributed_shape_with_stop_timeout and I can't seem to reproduce the issue, so I don't think this problem is caused by my changes. Let me know if you think it might be because of my changes. Otherwise, I will open a new issue with some idea I have that might help with this.

    opened by mboutet 108
  • Reviewing PRs

    Reviewing PRs

    what is the process for reviewing and accepting a PR with locust? I see a number of open PRs (including mine) that have been open for some time. I just trying to get an idea of when PRs will be merged or rejected into master or if the project is considered stable and not accepting PRs.

    opened by normanb 57
  • Allow a fixed RPS rate

    Allow a fixed RPS rate

    Description of issue / feature request

    Please allow specifying a fixed RPS rate.

    While the current model is nice for modelling users, it is not very useful for modelling more complex modern web applications which often will exhibit an exact known waiting behavior rather than something controlled by a more unpredictable distribution.

    Currently, I see no good way modelling this with locust and we are having huge trouble in our current project working around by guessing settings needlessly to roughly get to the actual RPS the web app knowingly sets off.

    Expected behavior

    RPS setting is available as alternative (including a way to guarantee e.g. exactly 1 request per second even if the actual request itself has a varying duration, e.g. a 200ms request response and a 500ms request response won't lead to strong variations of the interval)

    Actual behavior

    I can't find an RPS setting, and requests taking longer seems to make users wait more instead of allowing to have some sort of predictable fixed interval behavior (as is unrealistic for real users of course, but not unrealistic for many automated web clients).

    feature request 
    opened by ghost 56
  • error: argument --master-port: invalid int value bug

    error: argument --master-port: invalid int value bug

    Describe the bug

    locust: error: argument --master-port: invalid int value: 'tcp://172.30.44.4:8089'

    Expected behavior

    Locust runs correctly without producing this error. As --master-port wasn't even supplied.

    Actual behavior

    When invoking locust in master mode using the following: locust -f /scripts/locust-script.py --master the following error occurs locust: error: argument --master-port: invalid int value: 'tcp://172.30.44.4:8089'

    Steps to reproduce

    Start locust in the container using the command: locust -f /scripts/locust-script.py --master Error occurs.

    Environment settings

    • OS: RHEL
    • Python version: Python 3.6 from image registry.redhat.io/rhel8/python-36
    • Locust version: Using latest.
    opened by dbrennand 53
  • Re-introduce -n option to specify the number of requests

    Re-introduce -n option to specify the number of requests

    Description of issue

    Until locust v0.8, there was an option of -n to specify the number of requests. However, this was replaced by -t option in v0.9. We have a use case where we need to run a bunch of requests for a certain number of times and then take the median. To achieve this, we would want to limit the number of request to a certain value (using -n option). The time taken for each task would vary, so we cannot depend on time (-t option). Hence, requesting to re-introduce -n option back.

    Expected behavior

    TBD

    Actual behavior

    TBD

    Environment settings

    • OS:
    • Python version:
    • Locust version:

    Steps to reproduce (for bug reports)

    TBD - please provide example code

    feature request invalid 
    opened by gmhegde86 41
  • Provide an official Docker image

    Provide an official Docker image

    It'd be great if Locust provided an official Docker image on Dockerhub. Right now the most used image is hakobera/locust but it hasn't been updated in 3 years.

    feature request 
    opened by JDiPierro 40
  • Python 3 support

    Python 3 support

    Added support for Python 3 and running tests against all supported versions of Python with tox.

    Borrowed heavily from https://github.com/locustio/locust/pull/328 but cleaned things up & simplified some changes in the hopes that it will be more likely to be merged.

    opened by pmdarrow 40
  • OOM error with master/slaves setup (zeromq, windows)

    OOM error with master/slaves setup (zeromq, windows)

    Hi !

    Describe the bug

    An out of memory error occurs with ZeroMQ trying to allocate a crazy amount of memory in decoded_allocator, sometime up to several petabytes. This might very well be a ZeroMQ bug : OUT OF MEMORY (bundled\zeromq\src\decoder_allocators.cpp:89)

    I added some logs and recompiled pyzmq to check what's going on. Upon further investigation, _max_counters seems to take a crazy value at some point. See zmq_logs.txt As you can see, allocator instance 0x0000016A9270F700 is constructed with _max_counters=249, but before crash its value has changed to 1557249601288, which causes a malloc of several terabytes.

    Steps to reproduce

    Sorry, I couldn't find a surefire way to reproduce this one. It seems kind of random. It sometime happens before the test is even started, sometime when the test is stopped. Sometime it doesn't happen at all. It does seem to happen more often when stopping a test in the web UI. Simply run the ps1 attached and do some stuff in the web UI.

    Environment

    • OS: Windows 10.0.18362.778
    • Python version: 3.6
    • Locust version: 0.14.6
    • Locust files : test_locust.zip

    I managed to repro the bug on two computers : my work computer and my personal computer. Both are on Windows 10/Python 3.6 that comes with VS2017, but my personal computer has a pristine python environent, just ran pip install locustio.

    Am I doing something I'm not supposed to ?

    bug 
    opened by mparent 30
  • Locust Helm Chart update

    Locust Helm Chart update

    Hello guys. Thanx for developing great tools. Locust can be leveraged by Helm over Kubernetes with easy install. Unfortunately official helm chart for Locust is using Locust 0.9.0 image. I simply changed the image version to 0.13.5 but it didn't work. I suppose that there were some changes and the Helm chart needs to be updated followed by locust version up. Could you please update the helm chart for recent version of locust? Locust 0.9.0 seems to have different taskSet grammer etc

    waiting on contributor invalid stale 
    opened by bwcho75 29
  • Specify host in web ui

    Specify host in web ui

    Add support for specifying the hostname to test in the web ui, as opposed to in the command line.

    • Tests pass (had to make some changes there)
    • Hostname is now displayed in the UI (similar to https://github.com/locustio/locust/pull/295)
    • Updated docs to reflect that you no longer need to specify host in the command line
    priority 
    opened by PayscaleNateW 28
  • ft: LoadTestShapes with custom user classes

    ft: LoadTestShapes with custom user classes

    Hey Locust Team,

    I've been using locust for a while now, and really like to work with it. Still we achieved to run into some shortcomings for the project I am currently working on.

    With this PR I would like to propose a new feature:

    The possibility to create custom LoadTestShapes, where a step / tick only creates a specified set of users.

    Why I need this feature / other maybe also need it:

    In our Testscenario we need to make sure that a certain amount of locust users is definitely present upfront. Trying to achieve this with weighting or fixed_users is possible but from my experience also mixed with a bit of luck. As we are already using LoadTestShapes I asked myself, whether it is possible to include the users in the stages for example.

    How to use it:

    Using this would look like this for example:

    stages = [
            {"duration": 60, "users": 10, "spawn_rate": 10, "user_classes": [WebsiteUserA]},
            {"duration": 100, "users": 50, "spawn_rate": 10, "user_classes": [WebsiteUserB]},
            {"duration": 180, "users": 100, "spawn_rate": 10, "user_classes": [WebsiteUserA, WebsiteUserB]},
            {"duration": 220, "users": 30, "spawn_rate": 10},
        ]
    

    In this case the first step would only create users of the class WebsiteUserA, the second step WebsiteUserB and so on. I also included a new example called staging_user_classes.py.

    Is it backwards compatible:

    Yeah, it should be. If the "user_classes"-entry is missing, it will use all the existing user classes as input, as it was before.

    How it was achieved:

    I needed to adjust three files:

    • shape.py
    • runners.py
    • dispatch.py

    The maybe most important change (and maybe there's an even better solution for that) was, that in every new_dispatch() call (this happens for each tick / step once), also a new user_generator is being created. But in the end there were only a few minimal changes to the code done.

    I really am looking forward hearing your thought.

    Thanks a lot in advance.

    opened by samuelspagl 27
  • PyPI Link on Locust Homepage Points to Old Version

    PyPI Link on Locust Homepage Points to Old Version

    Describe the bug

    Locust.io homepage PyPI link is incorrect/outdated

    Expected behavior

    Link should point to https://pypi.org/project/locust/ and old listing should be removed from PyPI

    Actual behavior

    Link points to https://pypi.python.org/pypi/locustio and shows that locustio 0.999 is the latest version

    Steps to reproduce

    1. Browse to https://locust.io
    2. Scroll to bottom of page (Installation section) and click the PyPI link

    Environment

    n/a

    bug 
    opened by egauk 0
  • when I put a directory in the LOCUST_LOCUSTFILE environment variable, the shape class is read in duplicate.

    when I put a directory in the LOCUST_LOCUSTFILE environment variable, the shape class is read in duplicate.

    Describe the bug

    When I put a directory in the LOCUST_LOCUSTFILE environment variable, the shape class is read in duplicate.

    Expected behavior

    Read Shape Class properly.

    Actual behavior

    outputs "Duplicate shape classes: xxx" log. https://github.com/locustio/locust/blob/7591ed233a25687c3e7b1d386da86f0334cff90a/locust/main.py#L74

    Steps to reproduce

    I don't know why but There is nothing wrong with listing the files.(Like LOCUST_LOCUSTFILE: test1.py, test2.py..)

    Environment

    • OS: Linux
    • Python version: locustio/locust latest docker version
    • Locust version: 2.14.0
    bug 
    opened by lgs6813 1
  • Fix: Enhance typing of the tasks attribute in the User class

    Fix: Enhance typing of the tasks attribute in the User class

    Description

    This PR fixes a minor typing issue in the User class, it is related to the issue #2256.

    The change

    The code is changed from:

    from
        tasks: List[TaskSet | Callable]  = []
    to
        tasks: List[TaskSet | Callable | Tuple]  | dict[Callable, int] = []
    
    opened by samuelspagl 3
  • Extend typing of

    Extend typing of "task" property of a locust user

    Describe the bug

    Creating a dictionary of Callable,int for the tasks attribute of a locust user is failing common python linters. (for example "mypy")

    Expected behavior

    The type hinting should be inline with the comment:

        Collection of python callables and/or TaskSet classes that the Locust user(s) will run.
    
        If tasks is a list, the task to be performed will be picked randomly.
    
        If tasks is a *(callable,int)* list of two-tuples, or a {callable:int} dict,
        the task to be performed will be picked randomly, but each task will be weighted
        according to its corresponding int value. So in the following case, *ThreadPage* will
        be fifteen times more likely to be picked than *write_post*::
    

    Actual behavior

    Resulting mypy error:

    Mypy: Incompatible types in assignment (expression has type "Dict[Callable[..., None], Any]", base class "User" defined the type as "List[Union[TaskSet, Callable[..., Any]]]") [assignment]
    

    Steps to reproduce

    I'm using as IDE and also have the mypy plugin active, therefore this error is shown in the IDE itself. But it should also be possible to just start the linting process for these lines.

    class SomeUser(FastHttpUser):
        tasks = {
            some_task_1: 12,
            some_task_2: 4,
            some_task_3: 6
        }
    ...
    

    Solution

    Extend the typing in the user class with the following:

    from
        tasks: List[TaskSet | Callable]  = []
    to
        tasks: List[TaskSet | Callable]  | dict[Callable, int] | Tuple = []
    

    Environment

    • OS: MacOS
    • Python version: 3.10
    • Locust version: 2.13.0

    Looking forward to your comments. :)

    bug 
    opened by samuelspagl 2
  • locust k8s operator

    locust k8s operator

    Is your feature request related to a problem? Please describe.

    Need for flexible, secure and easy to use distributed performance testing solution while enabling keeping in mind points like; cloud governance, k8s resource management, CI compatibility.

    Describe the solution you'd like

    A k8s operator

    Describe alternatives you've considered

    HELM. However, this is not optimal as it requires a lot of manipulation and dealing with a lot of different k8s resource types not to mention lack of governance when deployed in an organisation.

    Additional context

    In my company, we were interested in cloud based distributed performance testing. We ended up choosing “locust” as a tool and I wrote a kubernetes operator for it. As far as I know and searched, this simply doesn’t exist for locust today.The operator have been running on AWS EKS for months now and it is very stable and performant.

    The project was created to provide:

    • A friendly user interface "A simple k8s custom resource based on a CRD"
    • Ability to run a distributed performance testing
    • Only ask for needed cluster permissions (security)
    • Exposing a Prometheus endpoint for test metrics
    • Maintain cloud infrastructure governance i.e. when used in an organisation, it is possible to maintain the governance over the allocated / created resources.
    • Cloud native by design
    • Enablement of performance testing in CI / CD pipelines

    The project was inspired after doing an industry study / survey. The project was influenced in functionality by the k6 k8s operator.

    As the code really doesn't include anything exclusive to the company, Open sourcing it is not a problem and it is something that I would happily do.

    What is the "catch"? The only "catch" is that the project is written in Java. That being said, from a user perspective, the interface purely through k8s and users are not exposed to any java code. This is similar to how k8s and most operators are written in Go but non of k8s users need to know anything about Go.

    Looking forward to your feedback.

    feature request 
    opened by AbdelrhmanHamouda 15
Releases(2.14.2)
  • 2.14.2(Jan 4, 2023)

    Re-add py.typed marker file to package (it was missing in 2.14.1) #2282

    Full Changelog: https://github.com/locustio/locust/compare/2.14.1...2.14.2

    Source code(tar.gz)
    Source code(zip)
  • 2.14.1(Jan 3, 2023)

    What's Changed

    • remove typo in running cloud integration docs by @WordsofDefiance in https://github.com/locustio/locust/pull/2275
    • Fix exception grouping for requests with both catch_response and name arguments by @ianmetcalf in https://github.com/locustio/locust/pull/2276
    • Improve documentation structure by @THUzxj in https://github.com/locustio/locust/pull/2278
    • Fix setuptools deprecation warnings by @heyman in https://github.com/locustio/locust/pull/2281
    • Stats in json to stdout (new command line option --json) by @AndersSpringborg in https://github.com/locustio/locust/pull/2269

    New Contributors

    • @WordsofDefiance made their first contribution in https://github.com/locustio/locust/pull/2275
    • @ianmetcalf made their first contribution in https://github.com/locustio/locust/pull/2276
    • @THUzxj made their first contribution in https://github.com/locustio/locust/pull/2278
    • @AndersSpringborg made their first contribution in https://github.com/locustio/locust/pull/2269

    Full Changelog: https://github.com/locustio/locust/compare/2.14.0...2.14.1

    Source code(tar.gz)
    Source code(zip)
  • 2.14.0(Dec 13, 2022)

    Add rest method to FastHttpUser to facilitate easy REST/JSON API testing (https://docs.locust.io/en/stable/increase-performance.html#rest)

    What's Changed

    • GRPC example - rewrite using interceptor by @zifter in https://github.com/locustio/locust/pull/2272
    • Add RestUser by @cyberw in https://github.com/locustio/locust/pull/2273
    • Move the rest method into FastHttpUser instead of RestUser. by @cyberw in https://github.com/locustio/locust/pull/2274

    New Contributors

    • @zifter made their first contribution in https://github.com/locustio/locust/pull/2272

    Full Changelog: https://github.com/locustio/locust/compare/2.13.2...2.14.0

    Source code(tar.gz)
    Source code(zip)
  • 2.13.2(Dec 9, 2022)

    What's Changed

    • Fix: Ask worker to reconnect if master gets a broken RPC message by @marcinh in https://github.com/locustio/locust/pull/2271

    Full Changelog: https://github.com/locustio/locust/compare/2.13.1...2.13.2

    Source code(tar.gz)
    Source code(zip)
  • 2.13.1(Dec 1, 2022)

    Convert browser recordings into locustfiles automatically using har2locust! (documentation)

    What's Changed

    • Tiny performance enhancements by @cyberw in https://github.com/locustio/locust/pull/2240
    • Replace datetime.utcnow() with datetime.now(tz=timezone.utc), as it is kind of an antipattern by @cyberw in https://github.com/locustio/locust/pull/2244
    • Use C-style (percent) string formatting for all debug logging statements (improves performance) by @cyberw in https://github.com/locustio/locust/pull/2245
    • Update documentation for Environment.parsed_options by @klazuka in https://github.com/locustio/locust/pull/2247
    • Added a better working docker command for Windows users by @MagnusNordboe in https://github.com/locustio/locust/pull/2248
    • Small fixes to documentation by @jscanlannyc in https://github.com/locustio/locust/pull/2254
    • auto generated locustfiles from browser recordings using har2locust (documentation) by @cyberw in https://github.com/locustio/locust/pull/2259
    • Dont reset connection to worker if master receives a corrupted zmq message by @marcinh in https://github.com/locustio/locust/pull/2266

    New Contributors

    • @klazuka made their first contribution in https://github.com/locustio/locust/pull/2247
    • @MagnusNordboe made their first contribution in https://github.com/locustio/locust/pull/2248
    • @jscanlannyc made their first contribution in https://github.com/locustio/locust/pull/2254

    Full Changelog: https://github.com/locustio/locust/compare/2.13.0...2.13.1

    Source code(tar.gz)
    Source code(zip)
  • 2.13.0(Oct 28, 2022)

    What's Changed

    • Add the ability to set default_headers on FastHttpUser by @cyberw in https://github.com/locustio/locust/pull/2231
    • Make LoadTestShape a proper abstract class by @cyberw in https://github.com/locustio/locust/pull/2233
    • Web UI: URL link on the host name for fast navigation to the API by @JonanOribe in https://github.com/locustio/locust/pull/2228
    • Add support for time strings for --stop timeout (e.g. "5m30s") @cyberw in https://github.com/locustio/locust/pull/2239

    New Contributors

    • @JonanOribe made their first contribution in https://github.com/locustio/locust/pull/2228

    Full Changelog: https://github.com/locustio/locust/compare/2.12.2...2.13.0

    Source code(tar.gz)
    Source code(zip)
  • 2.12.2(Oct 15, 2022)

    What's Changed

    • Output install location and version info when called with -V by @cyberw in https://github.com/locustio/locust/pull/2213
    • Delete the CustomMessageListener class for type consistency by @samuelspagl in https://github.com/locustio/locust/pull/2221
    • Fix exception when someone sets both --headless and --autostart by @cyberw in https://github.com/locustio/locust/pull/2224
    • Run unit tests on Python 3.11 (and explicitly support it) by @cyberw in https://github.com/locustio/locust/pull/2225

    Full Changelog: https://github.com/locustio/locust/compare/2.12.1...2.12.2

    Source code(tar.gz)
    Source code(zip)
  • 2.12.1(Sep 21, 2022)

    What's Changed

    • fix: when run from web with -f a_file_folder/ caused page title is None as locustfile argument is None by @alterhu2020 in https://github.com/locustio/locust/pull/2175
    • Bump docker base image to Python 3.10 by @cyberw in https://github.com/locustio/locust/pull/2197
    • Fix parsed options user classes when using class picker by @mikenester in https://github.com/locustio/locust/pull/2201
    • Modernize type hints by @cyberw in https://github.com/locustio/locust/pull/2205
    • Bug Fix for User Class Count reset when editing a running test and using --class-picker by @mikenester in https://github.com/locustio/locust/pull/2207
    • Allow setting run time from the web UI / http api by @ajt89 in https://github.com/locustio/locust/pull/2202
    • stats summary refactoring by @SamPosh in https://github.com/locustio/locust/pull/2193
    • Second fix for --class-picker resetting user_count on edits by @mikenester in https://github.com/locustio/locust/pull/2210
    • black format info is added by @SamPosh in https://github.com/locustio/locust/pull/2212

    Full Changelog: https://github.com/locustio/locust/compare/2.12.0...2.12.1

    Source code(tar.gz)
    Source code(zip)
  • 2.12.0(Sep 7, 2022)

    What's Changed

    • Web UI style fixes: about dialog cannot be opened in the startup page by @alterhu2020 in https://github.com/locustio/locust/pull/2173
    • Bump default concurrency for fast http user to 10 by @cyberw in https://github.com/locustio/locust/pull/2177
    • Allow more recent versions of pyzmq (it was only 23.0.0 that was broken) by @cyberw in https://github.com/locustio/locust/pull/2179
    • Bump FastHttpUser/geventhttpclient dependency to 2.0.2 by @cyberw in https://github.com/locustio/locust/pull/2180
    • GitHub Workflows security hardening by @sashashura in https://github.com/locustio/locust/pull/2184
    • ft: LoadTestShapes with custom user classes by @samuelspagl in https://github.com/locustio/locust/pull/2181
    • Log warning if tag filtering gets rid of all tasks by @cyberw in https://github.com/locustio/locust/pull/2186

    New Contributors

    • @sashashura made their first contribution in https://github.com/locustio/locust/pull/2184
    • @samuelspagl made their first contribution in https://github.com/locustio/locust/pull/2181

    Full Changelog: https://github.com/locustio/locust/compare/2.11.1...2.12.0

    Source code(tar.gz)
    Source code(zip)
  • 2.11.1(Aug 25, 2022)

    What's Changed

    • Fix typo by @cclauss in https://github.com/locustio/locust/pull/2157
    • Upgrade GitHub Actions by @cclauss in https://github.com/locustio/locust/pull/2158
    • Include worker_index in worker connection logging, and stop using the word "client" for what is actually a worker by @cyberw in https://github.com/locustio/locust/pull/2159
    • Allow multiple definitions of same user class name if they come from the same place by @cyberw in https://github.com/locustio/locust/pull/2160
    • Fix broken link in cpu warning message. by @conghuiw in https://github.com/locustio/locust/pull/2164
    • Fix custom message example in documentation by @aathan in https://github.com/locustio/locust/pull/2165
    • fix: edit load test missing the userclasses data by @alterhu2020 in https://github.com/locustio/locust/pull/2171
    • Use more clear wording in --run-time reached stopping log message. by @cyberw in https://github.com/locustio/locust/pull/2172

    New Contributors

    • @conghuiw made their first contribution in https://github.com/locustio/locust/pull/2164
    • @aathan made their first contribution in https://github.com/locustio/locust/pull/2165
    • @alterhu2020 made their first contribution in https://github.com/locustio/locust/pull/2171

    Full Changelog: https://github.com/locustio/locust/compare/2.11.0...2.11.1

    Source code(tar.gz)
    Source code(zip)
  • 2.11.0(Aug 12, 2022)

    What's Changed

    • fix: Ensure new test starts with specified number of users after previous test has been stopped by @mboutet in https://github.com/locustio/locust/pull/2152
    • Pass multiple Locustfiles and allow selecting User and Shape class from the WebUI by @mikenester in https://github.com/locustio/locust/pull/2137
    • feat: add 'worker_index' to WorkerRunner by @gdm85 in https://github.com/locustio/locust/pull/2155

    New Contributors

    • @SamPosh made their first contribution in https://github.com/locustio/locust/pull/2156

    Full Changelog: https://github.com/locustio/locust/compare/2.10.2...2.11.0

    Source code(tar.gz)
    Source code(zip)
  • 2.10.2(Aug 3, 2022)

    What's Changed

    • Escape user supplied data in html report (#2126) by @herrmanntom in https://github.com/locustio/locust/pull/2127
    • Replace the MD5 usage by SHA256 by @RenanGBarreto in https://github.com/locustio/locust/pull/2130
    • Fix escaping for exceptions in normal web ui (related to #2126) by @herrmanntom in https://github.com/locustio/locust/pull/2131
    • fix: Fix typo at user/wait_time.py by @DmytroLitvinov in https://github.com/locustio/locust/pull/2133
    • Test Report: Implement table sorting by @Likqez in https://github.com/locustio/locust/pull/2134
    • Small documentation correction by @andybyrne in https://github.com/locustio/locust/pull/2138
    • Log a warning for failed attempts to connect to master by @gdm85 in https://github.com/locustio/locust/pull/2136
    • Minor edits to the documentation by @sosna in https://github.com/locustio/locust/pull/2140
    • Better error message when User.task is set instead of User.tasks by @cyberw in https://github.com/locustio/locust/pull/2142
    • style: add a report favicon by @Pactortester in https://github.com/locustio/locust/pull/2145
    • Fix for Flask 2.2.0 breaking changes by @mikenester in https://github.com/locustio/locust/pull/2148

    New Contributors

    • @herrmanntom made their first contribution in https://github.com/locustio/locust/pull/2127
    • @RenanGBarreto made their first contribution in https://github.com/locustio/locust/pull/2130
    • @DmytroLitvinov made their first contribution in https://github.com/locustio/locust/pull/2133
    • @Likqez made their first contribution in https://github.com/locustio/locust/pull/2134
    • @andybyrne made their first contribution in https://github.com/locustio/locust/pull/2138
    • @gdm85 made their first contribution in https://github.com/locustio/locust/pull/2136
    • @sosna made their first contribution in https://github.com/locustio/locust/pull/2140
    • @Pactortester made their first contribution in https://github.com/locustio/locust/pull/2145
    • @mikenester made their first contribution in https://github.com/locustio/locust/pull/2148

    Full Changelog: https://github.com/locustio/locust/compare/2.10.1...2.10.2

    Source code(tar.gz)
    Source code(zip)
  • 2.10.1(Jun 28, 2022)

    What's Changed

    • Increase CONNECT_RETRY_COUNT to avoid workers giving up too soon if master is not up yet by @cyberw in https://github.com/locustio/locust/pull/2125

    Full Changelog: https://github.com/locustio/locust/compare/2.10.0...2.10.1

    Source code(tar.gz)
    Source code(zip)
  • 2.10.0(Jun 27, 2022)

    What's Changed

    • Fix multiple resetting connection after RPCError by @Nosibb in https://github.com/locustio/locust/pull/2096
    • Stop client_listener from raising a KeyError when receiving a client_stopped message from unknown worker by @BirdLearn in https://github.com/locustio/locust/pull/2102
    • additional typing improvements by @mgor in https://github.com/locustio/locust/pull/2106
    • chore: Set permissions for GitHub actions by @naveensrinivasan in https://github.com/locustio/locust/pull/2107
    • Add ack for worker connection by @Nosibb in https://github.com/locustio/locust/pull/2077
    • fix: stopping state when running more than one worker node. by @renato-farias in https://github.com/locustio/locust/pull/2116
    • add support for custom SSLContext when using FastHttpUser by @renato-farias in https://github.com/locustio/locust/pull/2113
    • Update the link for reporting data to a database by @AlexMooney in https://github.com/locustio/locust/pull/2119
    • Convert url for getting tasks to relative by @5imun in https://github.com/locustio/locust/pull/2121
    • More robust handling of ZMQ/RPC errors by @solowalker27 in https://github.com/locustio/locust/pull/2120
    • Remove timeout parameter from FastHttpUser unit tests by @cyberw in https://github.com/locustio/locust/pull/2123

    New Contributors

    • @Nosibb made their first contribution in https://github.com/locustio/locust/pull/2096
    • @BirdLearn made their first contribution in https://github.com/locustio/locust/pull/2102
    • @naveensrinivasan made their first contribution in https://github.com/locustio/locust/pull/2107
    • @renato-farias made their first contribution in https://github.com/locustio/locust/pull/2116
    • @AlexMooney made their first contribution in https://github.com/locustio/locust/pull/2119
    • @5imun made their first contribution in https://github.com/locustio/locust/pull/2121

    Full Changelog: https://github.com/locustio/locust/compare/2.9.0...2.10.0

    Source code(tar.gz)
    Source code(zip)
  • 2.9.0(May 19, 2022)

    What's Changed

    • Ensure test_start is run to completion on worker by @mboutet in https://github.com/locustio/locust/pull/2072
    • modernized build by @mgor in https://github.com/locustio/locust/pull/2070
    • Drop support for Python 3.6 by @cyberw in https://github.com/locustio/locust/pull/2080
    • Add table linkage, you can see the data of the three tables at the sa… by @helloNice in https://github.com/locustio/locust/pull/2082
    • uniform style of stats/report ascii tables by @mgor in https://github.com/locustio/locust/pull/2084
    • Move CSV stats printer gevent spawn up a few lines by @max-rocket-internet in https://github.com/locustio/locust/pull/2085
    • FastHttpUser improvements (including a rename of parameter "url" to "path") by @mgor in https://github.com/locustio/locust/pull/2083
    • print_stats table width fix for #2084 by @mgor in https://github.com/locustio/locust/pull/2088
    • Remove explicit version requirement for jinja2 by @cyberw in https://github.com/locustio/locust/pull/2090
    • dispatch: rebalance users with a fixed count by @andydunstall in https://github.com/locustio/locust/pull/2093
    • avoid using pyzmq 23. Fixes #2099 by @cyberw in https://github.com/locustio/locust/pull/2100

    New Contributors

    • @helloNice made their first contribution in https://github.com/locustio/locust/pull/2082
    • @andydunstall made their first contribution in https://github.com/locustio/locust/pull/2093

    Full Changelog: https://github.com/locustio/locust/compare/2.8.6...2.9.0

    Source code(tar.gz)
    Source code(zip)
  • 2.8.6(Apr 7, 2022)

    What's Changed

    • Support sharing connection pools between users by @miedzinski in https://github.com/locustio/locust/pull/2059
    • Add cpu_warning event, so listeners can do some action when CPU usage is too high by @cyberw in https://github.com/locustio/locust/pull/2067

    New Contributors

    • @miedzinski made their first contribution in https://github.com/locustio/locust/pull/2060
    • @kurtmckee made their first contribution in https://github.com/locustio/locust/pull/2062
    • @chalex2k made their first contribution in https://github.com/locustio/locust/pull/2064

    Full Changelog: https://github.com/locustio/locust/compare/2.8.5...2.8.6

    Source code(tar.gz)
    Source code(zip)
  • 2.8.5(Mar 28, 2022)

    • Fix dependency: Dont use latest Jinja2 because it has breaking changes

    What's Changed

    • fix some typos by @cuishuang in https://github.com/locustio/locust/pull/2052

    New Contributors

    • @cuishuang made their first contribution in https://github.com/locustio/locust/pull/2052

    Full Changelog: https://github.com/locustio/locust/compare/2.8.4...2.8.5

    Source code(tar.gz)
    Source code(zip)
  • 2.8.4(Mar 15, 2022)

    What's Changed

    • Add test_stopping event by @marcinh in https://github.com/locustio/locust/pull/2033
    • fixed load/users getting distributed to missing worker by @radhakrishnaakamat in https://github.com/locustio/locust/pull/2010
    • Bugfix/1947 locust does not stop all users by @marcinh in https://github.com/locustio/locust/pull/2041
    • fixing mypy errors with loosest rules by @mgor in https://github.com/locustio/locust/pull/2040
    • Add quit event, used for getting locust's exit code just before exit by @DennisKrone in https://github.com/locustio/locust/pull/2049

    New Contributors

    • @marcinh made their first contribution in https://github.com/locustio/locust/pull/2033
    • @radhakrishnaakamat made their first contribution in https://github.com/locustio/locust/pull/2010
    • @mgor made their first contribution in https://github.com/locustio/locust/pull/2040

    Full Changelog: https://github.com/locustio/locust/compare/2.8.3...2.8.4

    Source code(tar.gz)
    Source code(zip)
  • 2.8.3(Feb 25, 2022)

    What's Changed

    • Bump minimum required gevent version to 20.12.1 by @cyberw in https://github.com/locustio/locust/pull/2023
    • Fix typos by @kianmeng in https://github.com/locustio/locust/pull/2022
    • Ensure users are distributed evently across hosts during ramp up by @cyberw in https://github.com/locustio/locust/pull/2025
    • Ran pyupgrade on the code base, removing various "Python2-isms". by @cyberw in https://github.com/locustio/locust/pull/2032

    Full Changelog: https://github.com/locustio/locust/compare/2.8.2...2.8.3

    Source code(tar.gz)
    Source code(zip)
  • 2.8.2(Feb 14, 2022)

    What's Changed

    • Fix locust version in docker image (lose the .dev0) by @cyberw in https://github.com/locustio/locust/pull/2014
    • Dockerfile: Fix permissions in venv to allow installing packages in derived images by @cyberw in https://github.com/locustio/locust/pull/2016

    Full Changelog: https://github.com/locustio/locust/compare/2.8.1...2.8.2

    Source code(tar.gz)
    Source code(zip)
  • 2.8.1(Feb 13, 2022)

    What's Changed

    • Dockerfile: use a builder image to further optimize image size by @cyberw in https://github.com/locustio/locust/pull/2013

    Full Changelog: https://github.com/locustio/locust/compare/2.8.0...2.8.1

    Source code(tar.gz)
    Source code(zip)
  • 2.8.0(Feb 13, 2022)

    Shrink Locust's docker image from 358MB to 95MB. Mainly by basing it on python3.9-slim instead of python3.9.

    What's Changed

    • Fix empty tasks section in UI and static report bug by @EzR1d3r in https://github.com/locustio/locust/pull/2001
    • Mark package as being typed and add some missing type hints by @RobertCraigie in https://github.com/locustio/locust/pull/2003
    • Fix link to distributed load generation documentation in CPU log warning by @mayaCostantini in https://github.com/locustio/locust/pull/2007
    • Shrink docker image, mainly by switching base image to python3.9-slim by @cyberw in https://github.com/locustio/locust/pull/2009
    • Dockerfile: only install build dependencies on arm64 (everyone else has pre-built wheels) by @cyberw in https://github.com/locustio/locust/pull/2011

    New Contributors

    • @RobertCraigie made their first contribution in https://github.com/locustio/locust/pull/2003
    • @mayaCostantini made their first contribution in https://github.com/locustio/locust/pull/2007

    Full Changelog: https://github.com/locustio/locust/compare/2.7.3...2.8.0

    Source code(tar.gz)
    Source code(zip)
  • 2.7.3(Feb 6, 2022)

    What's Changed

    • Fix 'Tasks' section remains empty in web ui @tyge68 in https://github.com/locustio/locust/pull/1997
    • Support locust-plugin's Playwright User: Import trio before gevent patching if LOCUST_PLAYWRIGHT is set by @cyberw in https://github.com/locustio/locust/pull/1999

    Full Changelog: https://github.com/locustio/locust/compare/2.7.2...2.7.3

    Source code(tar.gz)
    Source code(zip)
  • 2.7.2(Feb 3, 2022)

    Fix issue with Locust completely shutting down on stop clicked in the web UI (a bug introduced in 2.7.1)

    What's Changed

    • Reverse parts of PR #1992 by @cyberw in https://github.com/locustio/locust/pull/1996

    Full Changelog: https://github.com/locustio/locust/compare/2.7.1...2.7.2

    Source code(tar.gz)
    Source code(zip)
  • 2.7.1(Feb 2, 2022)

    What's Changed

    • fix --html report in web mode by @uddmorningsun in https://github.com/locustio/locust/pull/1992
    • Allow repeated runs of run_single_user by @cyberw in https://github.com/locustio/locust/pull/1993
    • Send a tweet whenever there is a new release (testing this is actually the main purpose of this release :)

    Full Changelog: https://github.com/locustio/locust/compare/2.7.0...2.7.1

    Source code(tar.gz)
    Source code(zip)
  • 2.7.0(Jan 29, 2022)

    What's Changed

    • Add run_single_user and documentation on how to debug Users/locustfiles by @cyberw in https://github.com/locustio/locust/pull/1985
    • Fix "socket operation on non-socket" at shutdown, by reverting #1935 by @cyberw in https://github.com/locustio/locust/pull/1991

    Small fixes/improvements:

    • Fixing issue #1961 with incorrect "All users spawned" log messages wh… by @EzR1d3r in https://github.com/locustio/locust/pull/1977
    • unit tests: add extra validations in integration tests by @cyberw in https://github.com/locustio/locust/pull/1990
    • Add 99%ile for Web UI by @FooQoo in https://github.com/locustio/locust/pull/1989
    • hardening Environment.shape_class for distinct usage by @uddmorningsun in https://github.com/locustio/locust/pull/1983

    Full Changelog: https://github.com/locustio/locust/compare/2.6.1...2.7.0

    Source code(tar.gz)
    Source code(zip)
  • 2.6.1(Jan 26, 2022)

  • 2.6.0(Jan 23, 2022)

    • fixed_count: ability to spawn a specific number of users (as opposed to just using weights) #1964
    • Pass tags and exclude-tags to workers. #1976
    • WorkerRunner: read --expect-workers from job parameters #1975
    • Clean up some logging messages #1973
    • Ensure heartbeat_worker doesnt try to re-establish connection to workers when quit has been called #1972
    Source code(tar.gz)
    Source code(zip)
  • 2.5.1(Dec 9, 2021)

    • Ignore empty host field in web ui (Fix running the web UI with class defined hosts) (https://github.com/locustio/locust/pull/1956)
    • Throw exception when calling response.success()/.failure() if with-block has not been entered (https://github.com/locustio/locust/pull/1955)
    • Stop declaring "fake" class level variables in Environment, User and StatsEntry (https://github.com/locustio/locust/pull/1948)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(Nov 5, 2021)

    • Change request event 'url' parameter to contain full URL (technically a breaking change, but very few users will have had time to start using this) (https://github.com/locustio/locust/issues/1927)
    • Suppress warnings for patch version mismatch between master and worker (https://github.com/locustio/locust/issues/1926)
    Source code(tar.gz)
    Source code(zip)
Generates realistic traffic for load testing tile servers

Generates realistic traffic for load testing tile servers. Useful for: Measuring throughput, latency and concurrency of your tile serving stack. Ident

Brandon Liu 23 Dec 5, 2022
Load Testing ML Microservices for Robustness and Scalability

The demo is aimed at getting started with load testing a microservice before taking it to production. We use FastAPI microservice (to predict weather) and Locust to load test the service (locally or on cloud). You can find detailed instructions in the Engineering MLOps book.

Emmanuel Raj 13 Jul 5, 2022
PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interactive.

penbud - Penetration Tester Buddy PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interac

Himanshu Shukla 15 Feb 1, 2022
pytest plugin for distributed testing and loop-on-failures testing modes.

xdist: pytest distributed testing plugin The pytest-xdist plugin extends pytest with some unique test execution modes: test run parallelization: if yo

pytest-dev 1.1k Dec 30, 2022
PacketPy is an open-source solution for stress testing network devices using different testing methods

PacketPy About PacketPy is an open-source solution for stress testing network devices using different testing methods. Currently, there are only two c

null 4 Sep 22, 2022
Load and performance benchmark tool

Yandex Tank Yandextank has been moved to Python 3. Latest stable release for Python 2 here. Yandex.Tank is an extensible open source load testing tool

Yandex 2.2k Jan 3, 2023
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom

hey is a tiny program that sends some load to a web application. hey was originally called boom and was influenced from Tarek Ziade's tool at tarekzia

Jaana Dogan 14.9k Jan 7, 2023
A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax

1.0 Release See here for details about breaking changes with the upcoming 1.0 release: https://github.com/taverntesting/tavern/issues/495 Easier API t

null 909 Dec 15, 2022
The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).

mamba: the definitive test runner for Python mamba is the definitive test runner for Python. Born under the banner of behavior-driven development. Ins

Néstor Salceda 502 Dec 30, 2022
Automated testing tool developed in python for Advanced mathematical operations.

Advanced-Maths-Operations-Validations Automated testing tool developed in python for Advanced mathematical operations. Requirements Python 3.5 or late

Nikhil Repale 1 Nov 16, 2021
A modern API testing tool for web applications built with Open API and GraphQL specifications.

Schemathesis Schemathesis is a modern API testing tool for web applications built with Open API and GraphQL specifications. It reads the application s

Schemathesis.io 1.6k Jan 6, 2023
Language-agnostic HTTP API Testing Tool

Dredd — HTTP API Testing Framework Dredd is a language-agnostic command-line tool for validating API description document against backend implementati

Apiary 4k Jan 5, 2023
A modern API testing tool for web applications built with Open API and GraphQL specifications.

Schemathesis Schemathesis is a modern API testing tool for web applications built with Open API and GraphQL specifications. It reads the application s

Schemathesis.io 1.6k Dec 30, 2022
WEB PENETRATION TESTING TOOL 💥

N-WEB ADVANCE WEB PENETRATION TESTING TOOL Features ?? Admin Panel Finder Admin Scanner Dork Generator Advance Dork Finder Extract Links No Redirect H

null 56 Dec 23, 2022
AutoExploitSwagger is an automated API security testing exploit tool that can be combined with xray, BurpSuite and other scanners.

AutoExploitSwagger is an automated API security testing exploit tool that can be combined with xray, BurpSuite and other scanners.

null 6 Jan 28, 2022
Python Projects - Few Python projects with Testing using Pytest

Python_Projects Few Python projects : Fast_API_Docker_PyTest- Just a simple auto

Tal Mogendorff 1 Jan 22, 2022
✅ Python web automation and testing. 🚀 Fast, easy, reliable. 💠

Build fast, reliable, end-to-end tests. SeleniumBase is a Python framework for web automation, end-to-end testing, and more. Tests are run with "pytes

SeleniumBase 3k Jan 4, 2023
Declarative HTTP Testing for Python and anything else

Gabbi Release Notes Gabbi is a tool for running HTTP tests where requests and responses are represented in a declarative YAML-based form. The simplest

Chris Dent 139 Sep 21, 2022
Parameterized testing with any Python test framework

Parameterized testing with any Python test framework Parameterized testing in Python sucks. parameterized fixes that. For everything. Parameterized te

David Wolever 714 Dec 21, 2022