Skip to main content

Developer friendly load testing framework

Project description

Locust

Build Status codecov license PyPI PyPI GitHub contributors

Links

Description

Locust is an easy-to-use, distributed, user load testing tool. It is intended for load-testing web sites (or other systems) and figuring out how many concurrent users a system can handle.

The idea is that during a test, a swarm of simulated users will attack your website. The behavior of each user is defined by you using Python code, and the swarming process is monitored from a web UI in real-time. This will help you battle test and identify bottlenecks in your code before letting real users in.

Locust is completely event-based, and therefore it's possible to support thousands of concurrent users on a single machine. In contrast to many other event-based apps it doesn't use callbacks. Instead it uses light-weight processes, through gevent. Each locust swarming your site is actually running inside its own process (or greenlet, to be correct). This allows you to write very expressive scenarios in Python without complicating your code with callbacks.

Features

  • Write user test scenarios in plain-old Python
    No need for clunky UIs or bloated XML—just code as you normally would. Based on coroutines instead of callbacks, your code looks and behaves like normal, blocking Python code.

  • Distributed & Scalable - supports hundreds of thousands of users
    Locust supports running load tests distributed over multiple machines. Being event-based, even one Locust node can handle thousands of users in a single process. Part of the reason behind this is that even if you simulate that many users, not all are actively hitting your system. Often, users are idle figuring out what to do next. Requests per second != number of users online.

  • Web-based UI
    Locust has a neat HTML+JS that shows all relevant test details in real-time. And since the UI is web-based, it's cross-platform and easily extendable.

  • Can test any system
    Even though Locust is web-oriented, it can be used to test almost any system. Just write a client for what ever you wish to test and swarm it with users! It's super easy!

  • Hackable
    Locust is very small and very hackable and we intend to keep it that way. All heavy-lifting of evented I/O and coroutines are delegated to gevent. The brittleness of alternative testing tools was the reason we created Locust.

Documentation

More info and documentation can be found at: https://docs.locust.io/

Questions/help?

For questions about how to use Locust, feel free to stop by the Slack or ask questions on Stack Overflow tagged Locust.

Bug reporting

Open a Github issue and follow the template listed there.

Authors

License

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

Supported Python Versions

Locust is supported on Python 3.6, 3.7, 3.8.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

locust-1.0.tar.gz (268.3 kB view details)

Uploaded Source

Built Distribution

locust-1.0-py3-none-any.whl (287.6 kB view details)

Uploaded Python 3

File details

Details for the file locust-1.0.tar.gz.

File metadata

  • Download URL: locust-1.0.tar.gz
  • Upload date:
  • Size: 268.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.1

File hashes

Hashes for locust-1.0.tar.gz
Algorithm Hash digest
SHA256 9427ccc5946c8b306a2daa77c21c85646b1552b7bbf6e7ba784801945b246a58
MD5 a65e3f6e34fb511f56fd1d91a94b099e
BLAKE2b-256 5b3a68474bc2c57bf9d0e24086b48aa209d3f1db7ce52449d158b76c505d3c7f

See more details on using hashes here.

Provenance

File details

Details for the file locust-1.0-py3-none-any.whl.

File metadata

  • Download URL: locust-1.0-py3-none-any.whl
  • Upload date:
  • Size: 287.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.1

File hashes

Hashes for locust-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6497e2c0e734cd3ee08992f6233ed295c8edd664cd885288323e1890e262885
MD5 207714d21ee4f6cc87c4a89480570bef
BLAKE2b-256 47636262376f1dc31bfba891d590c0aba61f37cd8b6a5016ed5daa5897d9e94c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page