Skip to content
Scalable user load testing tool written in Python
Python HTML JavaScript CSS Other
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update release process documentation Apr 29, 2020
docs Add link to introduction for users familiar with JMeter. Jun 10, 2020
examples Improve documentation for FastHttp & add properties to example code. May 30, 2020
locust Release 1.0.3. Fix changelog generation to explicitly use python3. Jun 5, 2020
.coveragerc Remove concurrency from coverage Oct 1, 2019
.dockerignore Added .dockerignore file Oct 21, 2019
.gitattributes Added .gitattributes file that should give us consistent line endings Dec 2, 2013
.gitignore gitignore auto generated file May 22, 2020
.travis.yml Re-enable wheel distributions. doh. Feb 3, 2020
CHANGELOG.md Release 1.0.3. Fix changelog generation to explicitly use python3. Jun 5, 2020
Dockerfile Remove COPY:ing of docker_start.sh from Dockerfile Apr 19, 2020
LICENSE Updated README with new example according to new API. Jan 26, 2011
MANIFEST.in Include LICENSE in the sdist. Nov 14, 2018
Makefile Release 1.0.3. Fix changelog generation to explicitly use python3. Jun 5, 2020
README Added README file that is required by setuptools when creating dists Dec 10, 2011
README.md Fix PyPI shield image May 18, 2020
Vagrantfile Also switching the Vagrant file to use xenial since precise is past … Oct 1, 2017
codecov.yml Use consistent indentation in yml Jan 16, 2020
generate_changelog.py Add script for generating the automatic Changelog Apr 29, 2020
setup.cfg Add PyPI metadata that marks the locust package as obsoleting the loc… May 16, 2020
setup.py Update flask requirement. Fixes #1394 May 25, 2020
tox.ini Add cryptography to tox test deps too Apr 25, 2020

README.md

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.

You can’t perform that action at this time.