Skip to content

luramarchanjo/poc-locust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a proof of concept (POC) using Locust!

What is Locust?

Locust is an open-source load testing tool.

Define user behavior with Python code, and swarm your system with millions of simultaneous users.

Setup

1º Install Docker

2º Install Docker Compose

Testing

To test the Locust, we are going to use docker-compose to start, setup, and stop our environment that is composed of:

  • 1 Application
  • 1 Locust Master
  • 3 Locust Workers
version: '3'

services:

  application:
    image: chentex/go-rest-api
    # Omitted lines

  master:
    image: locustio/locust
    # Omitted lines

  worker:
    image: locustio/locust
    # Omitted lines

It is not necessary to know about docker-compose, because, we already have a set of scripts to do it for us.

  • start.sh: Start the environment (locust master, worker, and application)
  • stop.sh: Stop the environment (locust master, worker, and application)

Let us a test?

We need to start the environment to do that, run the above script:

sh start.sh

After starting the environment, open the Locust address http://localhost:8089 and set the information:

Click at Start swarming button and go to the Charts tab!

alt text

To stop the test and environment, run the above script:

sh stop.sh

Be Happy!

Releases

No releases published

Packages

No packages published