I’m new to Scala and gatling so please bear with me. I have a bunch of different api tests inside one simulation:
`
class PerfTest extends Simulation {
object Reference {
val endpoints = exec(http("/search/reference/stuff")
.get("/search/reference/stuff"))
.exec(http("/search/reference/stuff?{zipcode}")
.get("/search/reference/stuff?zipcode=30049"))
.exec(http("/search/reference/zips/id/{zipcode}")
.get("/search/reference/zips/id/30049"))
.exec(http("/search/reference/years")
.get("/search/reference/years"))
}
val httpConf = http
.baseURL(http://blah.com)
.contentTypeHeader("application/json")
val scn = scenario("My Perf Tests")
.exec(Reference.endpoints)
setUp(scn.inject(atOnceUsers(100)).protocols(httpConf))
.assertions(forAll.responseTime.mean.lessThan(800),
forAll.successfulRequests.percent.is(100))
}
`
What I would like to do is repeat the above tests over and over, 1 user at a time, and see at what point (how many concurrent users) my assertions start to fail. I’d like to know a few things:
-
At what concurrent user count do my tests start failing?
-
Which endpoints are failing at those concurrent user counts?
-
Is this the right way to set up the tests to get the information that I want?