Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Load testing 1-on-1: discovering the limits of your system

Hello there!

This tutorial is structured in 4 main parts with theory and practical exercises. My goal here is to give you an introduction on load testing with Locust while we test an API on your own local machine. Something that you will be able to later on customize to your own APIs, webUIs, GQL, gRPC, WebSocket or anywhere you want to answer the question: where is breaking point where things don't behave as expected?

Each part starts with a minimal setup so you can start writing your own code. The next part considers you have a concluded working example on the previous part. But if for any reason you got stuck with a syntax error, couldn't finish on time to follow along with everybody else, you can save your work and git checkout to a different the branch for the final answer.

Here is our schedule for today:

  • Part 1: Hello World of Locust
  • Part 2: From Hello World to API load testing
  • Part 3: A more complex API
  • Part 4: Automate users and ramps

But before we get started: we need to make sure you have everything necessary installed and configured

Setup:

  • Python 3.10 (or later): Open any terminal and run python --version. If you see any version such as 3.10 or later, great! If you see a lower version, the tutorial should work, but it was not fully tested with old versions of Python.
  • pip or uv: we'll need a package manager to install Locust. Make sure your computer have one of them, and it's working properly.
  • git (command line): for cloning this repository, switching branches, etc. Visual interfaces for git are OK if you know how to work with them.
  • Docker: we'll be pulling some images from docker registry to get our test API up and running without worring about any other software installation. Run docker --version on your terminal to make sure it's installed and running. In case you need to install it, refer to one of these links:
  • Download the API docker image: docker pull ghcr.io/vinigfer/europython2026_load_testing
  • Install locust (recommend to create a new virtual env where you cloned this repository):
python -m venv venv
source venv/bin/activate
pip install locust==2.44.1
locust --version

Once everything is ready, move to Part 1 - Hello World of Locust

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages