Stress Test with Gatling

Hi,

I am new to Gatling and was exploring the various features available. I would like to know the feasibility of stress testing with Gatling.

My requirement is to continue to inject more users to the scenario until the average response time reach the target value.

See below my code snippet - here 1 user will be executing Launch for 5 minutes and stop the test. I would like to continue the test with more users if the response time is below 1sec.

object Launch{

val launch = exec(http(“Launch”)
.get("/")
.check(responseTimeInMillis.lessThan(1000)))
}

object Login{

val login = feed(feeder)
.exec(http(“Login”)
.post(uri1 + “/more”)
.headers(headers_15)
.formParam(“userid”, “${userId}”)
.formParam(“password”, “${pswd}”)
.formParam(“rmflag”, “0”)
.formParam(“ajax”, “1”)
.check(responseTimeInMillis.lessThan(2000)))

}

val users = scenario(“Users”).during(5 minute){
pace(10 seconds)
exec(Launch.launch)
}
val admins = scenario(“Admins”).exec(Launch.launch, Login.login)

setUp(
users.inject(atOnceUsers(1))
admins.inject(rampUsers(10) over(10 seconds))
).protocols(httpProtocol)

Regards,
Nittz