Stress testing with Gatling

Gatling version: 3.11.5 (must be up to date)
Gatling flavor: [ x ] java kotlin scala javascript typescript
Gatling build tool: maven [ x ] gradle sbt bundle npm

I am trying to do a stress test with Gatling, however to properly create one I am looking for some way to do this.

The injection part of the scripting works for this purpose as is, but could be better. In a stress test I would like to push my system to the limits, for that purpose I have created a scenario and I want to find out at what amount of active users do my system start behaving erratically. In the open model profile injection, I can simulate this with very large values over a long duration with one of the ramping functions. Or better is to use the meta dsl and incrementUsersPerSec.

The largest issue however, is that there is no way to stop the simulation once the system starts reaching its limits. If I start running into problems at 500 users / pr second or if I have setup a throttle profile at 1000 req / s, there’s no reason to start ramping it up further. I just want the simulation to end and get my report, so I can see what the limits were and the data leading up to the failure.

So in the same vein as we have exitBlockOnFail in a scenario, something similar would be nice to have with assertions. Ie. either the simulation exits if we have 5% failures or better yet, we could give a time window and a percentage of failures. Ie. in the last 30 seconds if we start see a faliure rate of 10% or higher, stop the simulation.

Thoughts? In my mind it would enhance the value of Gatling.

Your question is a duplicate of this other one: Exit if User per sec reached certain rate?.

Same answer:

This feature, named Run Stop Criteria, is only available in Gatling Enterprise, see Run Stop Criteria | Gatling Features.

Ah thank you very much, due to the title of said post I didn’t read it.

But yes, that is what I’m looking for!

1 Like