Write test scenarios in pure Python

No need for clunky UIs or bloated XML, just plain code

Distributed & Scalable

Locust supports running load tests distributed over multiple machines, and can therefore be used to simulate millions of simultaneous users

Web based UI

Even though all tests are Python code, Locust has a neat web interface that shows relevant test details in real-time during test runs

Screenshot of Locust UI

Install

$ pip install locustioMore info »

Simple to use

# locustfile.py

from locust import Locust, task

class MyLocust(Locust):
    min_wait = 5000
    max_wait = 15000
    
    def on_start(self):
        self.client.post("/login", {
            "username": "test_user",
            "password": ""
        })
    
    @task
    def index(self):
        self.client.get("/")
        
    @task
    def about(self):
        self.client.get("/about/")
$ locust -f locustfile.py -H http://site.com

Authors

  1. Jonatan Heyman

  2. Carl Byström

  3. Joakim Hamrén

  4. Hugo Heyman

By ESN

A large portion of Locust has been developed at ESN, a company specialized in making large scale social web sites and software for real-time web development.