We have started to use Gatling in our nightly builds, to run automatic tests on applications running in docker containers.
The build does this.
1:… Some build stuff
2: Starting the docker containers
3: Running the tests
The first requests against the application is always very slow (naturally) and we would like to ignore those but haven’t found a solution for it.
Is it possible to warmup the application before gathering information from the gatling script?
What we would like to do is to start the script and ignoring the first couple of requests or ignoring a specified time-period. Say run this script for 30 minutes, but ignore the first 5 minutes.
How do you usually handle those kind of problems?
You can define 2 scenarios. Use nothingFor(time) to delay the execution of the scenario.
warmupScenario.inject( // If you need to warm the servers. Only perform GET and no checks.
constantUsersPerSec(1) during(6 minutes)
),
delayedScenario.inject( //Do all the checks in this scenario
nothingFor(5 minutes),
rampUsersPerSec(1) to(10) during(30 minutes)
)