Random switch with possibilities as parameter sometimes does not work correctly

I have a simulation that receives the possibilities as parameters and I have seen in some cases not all the scenarios are being executed even when I am passing the same possibilities:

val allInOneTest: ScenarioBuilder = scenario(“All In one”).exec(
scn1Possibility → exec(scn1),
scn2Possibility → exec(scn2),
scn3Possibility → exec(scn3),
scn4Possibility → exec(scn4),
scn5Possibility → exec(scn5)

setUp(allInOneTest.inject(rampUsers(numberOfUsers) over 1.minute)).protocols(httpConf)


  • numberOfUsers = 50

  • scn1Possibility = 35

  • scn2Possibility = 5

  • scn3Possibility = 40

  • scn4Possibility = 15

  • scn5Possibility = 5

sometimes sc5 is executed others is not ore same happens to scn2.

Is there a way to identify why those scenarios under the same input parameters are not being executed? or do I need to change something in the way I am setting up the randomSwitch?


Forgot to mention I am using gatling 2.2.2 and scala 2.11.3