Skip to content

juxt/ramp

Repository files navigation

ramp - Ramping load test

A shell script wrapper around Gatling to perform load tests, either locally or remotely using AWS.

It will simulate a number of users who (with ramp-up) attempt to send a GET request every second to a certain URL. It will upload detailed test results to an AWS S3 bucket of your choice where they can be viewed as a web page.

It can be customised for more complex use cases.

How to use

  1. If you want to run your simulation remotely or upload the results to an S3 bucket, install and configure the Amazon Command Line Interface.

  2. Call the run-simulation.sh script with any arguments you need.

    $ ./run-simulation -b my-bucket-name -p -s -v --TargetUrl http://www.example.com

Arguments

The list of valid arguments is shown on ./run-simulation.sh -h All arguments are optional.

Single-dash arguments are used by the script itself. Double-dash arguments are passed to the simulation. The default LoadSimulation.scala takes three arguments:

  • TargetUrl - the URL you want to load-test.

  • PeakUsers - the maximum number of concurrent users to simulate.

  • Duration - the total duration of the test in seconds (1/3 ramp-up, 1/3 peak, 1/3 ramp-down).

The script will first look for simulation arguments in params.txt, but will overwrite them with your double-dash arguments (if you provide any). You can edit that file manually, which might be useful if you need a lot of simulation arguments.

If you use a custom simulation file, you can use custom simulation arguments too. run-simulation.sh will accept and pass on arbitrary double-dash arguments. See Params in LoadSimulation.scala for the syntax to import arguments.

If running locally, most AWS-related arguments will be ignored, but you can still specify a bucket name with -b. Your results will be uploaded there. For ease of viewing, it is recommended that you make that bucket public with -p.

If running remotely, be aware that by default the stack will not be deleted after the simulation is complete (and you will continue to be billed for its EC2 instance). This allows you to run multiple simulations in a row without having to create a new stack every time. When you want to delete the stack, use -s.

Customisation

  • By default, the script merely sends GET requests to a target URL. But it can provide much more complex use cases if you replace LoadSimulation.scala with your own Gatling simulation script.

    • Currently, you have to use the same structure: name the file LoadSimulation.scala, the package ramp, and the Simulation class LoadSimulation. Beyond that, go wild.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages