I am new to Scala and Gatling so bear with me! I want to have a for loop inside inject where I can set how many times I want atOnceUsers()
instead of just repeating the code x times, but this code is giving me an error so I was wondering if this way is not supported.
val numTimes = 3
val scn = scenario("Some scenario").exec(someScenario)
setUp(
scn.inject(
for (i <- 1 to numTimes) atOnceUsers(10)
).protocols(httpProtocol)
)