constantUsersPerSec() during ()

I’m using Gatling 3.03 open source with sbt v1.2.8, scala v2.12.8

I’m new with Gatling and am just getting familiar with it.

When I specify:

setup(scn.inject(
nothingFor(5),
atOnceUsers(10),
constantUsersPerSec(20) during (15)
).protocols(httpConf.inferHtmlResources())

The html report shows that I do have a 20 user per second rate but for only 10 seconds instead of 15 seconds. That means I’m getting to about 220 users instead of expected 300 users for that 15 second duration. Can anyone explain this behavior. See attached png image files.

Thanks.

I think you should add “.forever{ OR .repeat(){” in scn.

If use above conditional statements,it will keep running the test based on condition.

You can also go with .protocols(httpConf.inferHtmlResources()).maxDuration(70 minutes)

https://groups.google.com/d/msg/gatling/NWH3aPnEGqI/unYHZ9MWFgAJ