Developing Locust itself

Here’s useful information on making changes to Locust.

Running tests

To be able to run Locust’s test on different Python versions we use tox. You can install tox by running:

pip install tox

Then you can run the tests by just invoking tox in the Locust project root directory:


Build documentation

To build the documentation you first need to install the required PyPI packages. You can do that by running the following command in the Locust project’s root directory:

pip install -r docs/requirements.txt

Then you can build the documentation locally using:

make build_docs

Then the documentation should be build and available at docs/_build/index.html

Making changes to Locust’s Web UI

The CSS styling for Locust’s user interface is written in SASS. In order to make changes to the CSS rules, you need to have SASS installed and available on your PATH.

Once you have SASS installed you can have the command line sass program compile the Locust .sass files by running the following in the locust project’s root path:

make sass_build

Or you can make sass watch for changes to the .sass files and automatically generate new CSS files by running:

make sass_watch

The CSS files that are generated by SASS should be checked into version control.