I am running many different scenarios concurrently in my simulation.
I’d like to add an option in Jenkins to choose which scenarios will be executed concurrently, so my first thought was a
simulation code that looks as follows but setUp only accepts a Simulation class which I am not sure how tif there is a way
to input in such manner (Apologies for my lousy Scala skills) Is it supposed to be possible? or maybe another way to go about this?
setUp(
if(isScenario1){
scenario1.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(rest_httpconf),
*scenario12*.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(rest_httpconf),
*scenario13*.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(rest_httpconf),
}
if (isScenario2){
scenario2.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(option_httpconf),
scenario22.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(option_httpconf),
scenario23.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(option_httpconf),
}
if(*isScenario3*){{
scenario3.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(option_httpconf)
}
if(isScenario4){
scenario4.inject(rampConcurrentUsers(1) to 1000 during (Config.rampUpDuration minutes))
.protocols(rest_httpconf)
}
).maxDuration(Config.scenarioDuration minutes).assertions(global.successfulRequests.percent.is(98))