I am using my Gatling scripts in an automated build server (Jenkins).
We are in “script tuning mode”, so I am required to change my script several times a day.
I have variables declared in my Simulation class to manage the basic inputs that determine behavior of the script. I would like to be able to print these values when the script runs (somewhere near the top of the console output), so we can have better visibility of what test parameters are being used. If this information could somehow be added to the Gatling report, that would be even better, but for now I’d be very happy to get it in the console or some other way.
My Simulation classes are all organized like this >
class StressTestCLOUDSimulation extends Simulation {
// definitions for the baseURL(s) go here…
//======================================================
// test input variables go here ( these are the ones I want to access)
val numberOfRepeats = 1
val rampUpDurationInSec = 3600
val userRampStart = 1
val rampTarget = 1800
val usersConstant = rampTarget
val totalTestPeriodInSec = rampUpDurationInSec
// calculate the rps ( or whatever else is interesting)
val testParams = 10 * (numberOfRepeats ) * usersConstant
//====================================================
// httpProtocol defined here…
// scenario (“scn”) definition here…
setUp(
scn.inject(
rampUsersPerSec( userRampStart).to( rampTarget) during (totalTestPeriod )
).protocols( httpProtocol))
}