Second "exec" in "during" being executed a limited number of times

Config included below, but basically what I want to do is:

  • define a chain of two requests, the second depending on the first

  • have users keep executing that chain for some period of time

I created a chain with two “exec” calls, and then wrapped that in a “during”. The first exec (“get_code”) is getting run the number of times I’d expect (for the config below, about 1000 times over 40s), but the second one (“exchange_code”) seems to happen around (but not always exactly) once for each user (in my last run, it happened 11 times; in a run with 60 users, it will get called ~60 times).

Just getting started with Gatling. Am I missing something obvious? Or does this not work the way I’m expecting it to?

This is using v1.5.3


class Auth2SimpleSimulation extends Simulation {

val durationSeconds = 30

val httpConf = httpConfig

val urlFormPostHeaders = Map(
“Content-Type” → “application/x-www-form-urlencoded”)

val chain =
.param(“gameId”, “loadtest”)
.param(“provider”, “anonymous”)
.basicAuth(“test”, “test”)
.param(“grantType”, “authorization_code”)
.param(“code”, “${auth_code}”)

val scn = scenario(“Basic Login”)
.during(durationSeconds) {

Of course, right after I post I think to enable logging and see this:

Bypassing cached Request ‘exchange_code’: Scenario ‘Basic Auth2 Login’, UserId #8

Adding .disableCaching to my httpConf solved the problem.


Cool. I was about to ask you to check this point.