Executor is Python-based load generating tool where you have full freedom of programming test scenario in Python language. It uses resource-efficient coroutine approach.

Locust package is not installed automatically by Taurus, please install it manually: pip install locust

Make note that for Locust iterations option means quantity of requests, not cycles of scenario (as the last can contains more than one request). Following load profile settings has no effect for this executor: throughput and steps

Taurus appends PYTHONPATH with path to artifacts directory and current working directory. Make sure you have no module name clashes (for example, don't name your locustfile as

Here's example config that uses existing locust file:

- executor: locust
  concurrency: 10
  ramp-up: 1m
  iterations: 1000
  scenario: example


Example locust file

from locust import HttpUser, TaskSet, task, between
class WebsiteTasks(TaskSet):
    def on_start(self):"/login", {
            "username": "test_user",
            "password": ""
    def index(self):
    def about(self):
class WebsiteUser(HttpUser):
    tasks = [WebsiteTasks]
    wait_time = between(0.100, 1.500)

Latest supported version is 2+.

Requests Scenario

LocustIO executor partially supports building scenario from requests. Supported features:

  • request methods GET/POST
  • headers and body for requests
  • set timeout/think-time on both scenario/request levels
  • assertions (for body and http-code)
    timeout: 10  #  global scenario timeout for connecting, receiving results, 30 seconds by default
    think-time: 1s500ms  # global scenario delay between each request
    default-address:  # specify a base address, so you can use short urls in requests
    keepalive: true  # flag to use HTTP keep-alive for connections, default is true
    - url: /  
      method: get
        var1: val1
      body: 'body content'
      - contains:
        - body  # list of search patterns
        - content
        subject: body # subject for check
        regexp: false  # treat string as regular expression, true by default
        not: false  # inverse assertion condition

Keep in mind that Locust requires default url for its work (empty string is accepted). You have to set host in python script or default-address in script for Taurus. If both are found value from Taurus script has priority.

Run Locust in Distributed Mode

Distributed mode for Locust is enabled with two option master and workers under execution settings:

- executor: locust
  master: True
  workers: 10


Keep in mind that Taurus starts locust master node only. All other workers should be configured and started manually.