Skip to content

akiyamasho/locust-loadtest-template

Repository files navigation

Locust Load Test Template

This is a quick template for creating load tests with Locust. スクリーンショット 2024-02-06 5 16 01

Table of Contents

Requirements

Either of the following:

  • docker with docker-compose
  • python3

Setup

  1. Update the endpoints and parameters in src/main.py to the environment you'd like to test.

    NOTE: Sample GET and POST endpoints are provided in the file.

  2. Run locust through the startup script

    1. With docker-compose:
      docker-compose up
      
    2. With python (this creates a virtualenv and installs the requirements):
      ./start.sh
      
  3. Access the Locust UI at http://localhost:8089

  4. Use the host of your backend as the URL, and set the number of users and spawn rate to your desired load test.

Development

This project uses the Locust library for load testing.

You can also install the dev dependencies for formatting and linting.

pip install -r requirements_dev.txt

About

Quick template for creating GET/POST load tests with Locust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published