How to Terminate a Gatling Test After Exactly 5 Minutes of Execution?

We have a Gatling 5 min test which we want to run for N concurrent users for exactly 5 mins and force stop or end the test once 5 minutes duration is completed.

Currently we are using during block to replicate the above scenario. However, we noticed that while Gatling accepts requests for the specified 5-minute duration, it endeavors to complete all requests, active sessions, or threads initiated within this time frame. Consequently, our test extends beyond the intended 5 minutes.

We want to force stop or end our test once the 5 minutes duration is done irrespective whether some requests initiated during 5 minutes block are yet to complete.

Is there any way with Gatling to achieve this?

you can use maxDuration

Cheers!

Thanks @trinp , Let me try it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.