Performance Testing - Gatling
The Ensono Stacks Performance Tests is a sample project demonstrating performance testing (Load testing) using the Gatling tool.
The tests within this repository have been written against the Ensono Stacks APIs.
Getting started
To get started with performance testing, first clone the Ensono Stacks Performance Tests repo:
git@github.com:amido/stacks-performance-tests.git
Dependencies
- Java version 11
- Maven
- IDE for Scala development. I.e. IntelliJ IDEA
Quick run
Once the project has been cloned locally, tests can be run using the following command:
mvn clean gatling:test -Denv=dev
By default, this will run a load test against all simulations with 1 user with a ramp up duration of 1 second.
There are optional parameters that can be added to change the load test:
-DrampUsers=X
- This allows you to set the number of users that will be simulated in the tests.-DrampDuration=X
- This sets the amount of seconds the test will ramp the test load from 0 users to X users in the test.-DatOnceUsers=X
- Injects a given number of users at once.-DconstantUsersPerSec=X -DconstUsersDuration=X
- Injects users at a constant rate, defined in users per second, during a given duration. Users will be injected at regular intervals.