Hi Community
I’m currently using Gatling version 3.0.3 and was wondering whether there’s any possibility to group (based) on the injection profiles.
Our project has the need to extend the performance simulations’ duration from 1 to 3 hours, each hour increasing the active amount of users by X amount.
Furthermore, the desire is to visually report this, based on the amount of active users for the respective hour of the test cycle.
Theoretically, we could schedule 3 individual jobs from within our CI pipeline, but this would not be the cleanest way to go and could cause some overlap between the individual test runs.
This seems overkill given the fact that the script itself can perfectly facilitate such a ramp-up scenario and this way we would produce the most relevant output (reporting/number wise, compared to having 3 separate runs and reports).
Current Setup:
TypeAUser.inject(rampConcurrentUsers(0) to (Threshhold1stHourTypeA) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeA) during (50 minutes)),
TypeBUser.inject(rampConcurrentUsers(0) to (Threshhold1stHourTypeB) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeB) during (50 minutes))
Desired Setup:
TypeAUser.inject(
rampConcurrentUsers(0) to (Threshhold1stHourTypeA) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeA) during (50 minutes),
rampConcurrentUsers(Threshhold1stHourTypeA) to (Threshhold1stHourTypeA * 2) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeA *2) during (50 minutes)
rampConcurrentUsers(Threshhold1stHourTypeA * 2) to (Threshhold1stHourTypeA * 3) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeA *3) during (50 minutes)
),
TypeBUser.inject(
rampConcurrentUsers(0) to (Threshhold1stHourTypeB) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeB) during (50 minutes),
rampConcurrentUsers(Threshhold1stHourTypeB) to (Threshhold1stHourTypeB * 2) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeB *2) during (50 minutes)
rampConcurrentUsers(Threshhold1stHourTypeB * 2) to (Threshhold1stHourTypeB * 3) during (10 minutes),constantConcurrentUsers(Threshhold1stHourTypeB *3) during (50 minutes)
)
The only thing I’m currently lacking is a way to group the scenario globally on the number of active users (i.e. the sum of Threshhold1stHourTypeA & Threshhold1stHourTypeB for the 1st hour, sum of (Threshhold1stHourTypeA * 2) & (Threshhold1stHourTypeB * 2) and so on).
I’ve tried something in the individual scenarios as follows: group(concurrentUsers + " users."){ … code … , but this won’t help me out past the first hour as I can’t multiply the val concurrentUsers for the grouping.
Any other suggestions?
Thanks in advance!