Git Product home page Git Product logo

docker-locust-1's Introduction

Locust.io Docker Image

Build Status codecov

This docker-locust allows you to run locust.io in any CI tools e.g. Jenkins and generate HTML report at the end of load test.

Requirement

  1. docker-compose version 1.6.0+

Run locust application locally

Run the application with the command:

local.sh deploy

You will be prompted for certain inputs required

Target url: https://targeturl.com
Path of load testing script: example/simple.py
Number of slave(s): 5
Run type [automatic/manual]: manual

Or you can simplify it with following command:

local.sh deploy https://targeturl.com example/simple.py 5 manual

Note: The load test script will be automatically saved in Docker image when the given command above is executed.

Report Generation

Simply after load test run, append "/htmlreport" to the URL which will download the report of the recent run. Example:

Setup in jenkins

docker-locust can be run automatically by using CI tool like jenkins.

Sample case:

  • Target url: https://targeturl.com
  • Number of slaves: 5
  • Number of users [total users that will be simulated]: 100
  • Hatch rate [number of user will be added per second]: 5
  • Duration [in seconds]: 20

Steps:

  1. Put following command in "Execute shell" field:

    (echo 100 && echo 5 && echo 30) | bash local.sh deploy https://targeturl.com example/simple.py 5 automatic
  2. Install html-publisher-plugin in jenkins to display load test result. Example configuration in jenkins job:

Unit tests

Run the unit tests with this command:

local.sh test

Troubleshooting

All output from containers can be see by running:

docker-compose logs -f

docker-locust-1's People

Contributors

budtmo avatar farshi avatar hjacobs avatar diemol avatar elgalu avatar a1exmac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.