1

For example- I need to check that for 1000 users it responds in 3 seconds.

Is the number of users and response times configurable?

ravenblizzard
  • 326
  • 3
  • 12
Chinya
  • 419
  • 1
  • 7
  • 18

1 Answers1

6

This answer targets Gatling 2.

You can set the target number of users by configuring the "injection profile" of your simulation:

setUp(scn.inject(atOnceUsers(1000)) // To start all users at the same time
setUp(scn.inject(rampUsers(1000) over (30 seconds) // To start gradually, over 30 seconds

For more information, please refer to the injection DSL documentation

If you want to check that all your users responds in less than 3 seconds, one way to ensure this is Gatling's assertions:

setUp(...).assertions(global.responseTime.max.lessThan(3000))

If this assertion fails, meaning at least one user responded in more than 3 seconds, Gatling will clearly indicate the failure after your simulation is completed.

Pierre DAL-PRA
  • 956
  • 5
  • 10