Is it possbile to warm up application under test / Ignoring all requests for a specified amount of time?

Hi!

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?

Regards
Robert

Hi,

You could process the resulting simulation.log to remove any time periods you’re not interested in, and then trigger report generation (see -ro command line parameter here → http://gatling.io/docs/2.2.3/general/configuration.html#gatling-cli-options)

Thanks,
Barry

Hi Robert,

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)
)

Regards,
Chandra

Then, FrontLine has warm-up and ramp-down phases exclusion built-in :slight_smile:

While that’s lovely for FrontLine users (and I fully intend to explore that route in the near future), is there a workaround for the rest of us?

I’ve tried what Chandra suggested above, but the assertions I set up for delayedScenario still appeared to apply to warmupScenario.

Cheers,
~Alan