Hello everyone, I’m not that proficient with user injections so I would like to ask for some help. We have a scenario by which users should be injected:
30 minutes - stable load, then 30 minutes of spike with a big number of users and that repeats again.
setUp(TestScenario.scenario
.injectOpen(
constantUsersPerSec(ConfigHelper.USERS_PER_SECOND).during(Duration.ofMinutes(ConfigHelper.CONSTANT_USER_RATE_DURATION)),
stressPeakUsers(ConfigHelper.SPIKE_USERS_NUMBER).during(Duration.ofMinutes(ConfigHelper.SPIKE_DURATION)),
constantUsersPerSec(ConfigHelper.USERS_PER_SECOND).during(Duration.ofMinutes(ConfigHelper.CONSTANT_USER_RATE_DURATION)),
stressPeakUsers(ConfigHelper.SPIKE_USERS_NUMBER).during(Duration.ofMinutes(ConfigHelper.SPIKE_DURATION)),
constantUsersPerSec(ConfigHelper.USERS_PER_SECOND).during(Duration.ofMinutes(ConfigHelper.CONSTANT_USER_RATE_DURATION))
)
).maxDuration(Duration.ofMinutes(ConfigHelper.DURATION))
.protocols(ConfigHelper.httpProtocol)
.assertions(global().successfulRequests().percent().gt(ConfigHelper.SUCCESS_RATE));
We have executed this code with parameters such as:
Users per second: 15
Constant user rate duration: 30
Spike users number: 400
Spike duration: 30
Test Duration: 150
But numbers of users were not like a would expect:
I wanted to create a quite opposite picture from the one that I provided. Like 200 or so users during constant rate and big spike with 400 users during the spike.
So, I would like to have some guidance, thank you in advance