Reputation: 565
We're trying to stress test our REST-ish app with Gatling. We want our users
to make a post with a different fileBody
every request.
Our scenario looks like:
scenario("100%")
.during(15 minutes) {
exec(requestStream.next())
.pause(118 seconds, 120 seconds)
}
.users(2)
.delay(2 minutes)
.protocolConfig(httpConf)
...build up several scenarios...
setUp(severalScenarios)
This runs fine but it appears that the block with the exec
is only executed one time when each scenario is built for the first time. We thought that the block would be executed every time the during(...)
loop comes around giving each user a new Request
from the iterator to run every 15 minutes.
Are we missing something? Is there a smarter way of doing this?
Upvotes: 1
Views: 1851
Reputation: 7038
No, that's not the way the DSL works. The DSL elements are actually builders that are resolved once and for all when the simulation is loaded.
What you want is inject dynamic data into your scenario elements, and you have to use Feeders, user Session, Gatling EL, etc. What does your requestStream look like?
Upvotes: 2