Stress Test API

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")

        val httpConf = http

        val scn = scenario("My Perf Tests")



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:

  1. At what concurrent user count do my tests start failing?

  2. Which endpoints are failing at those concurrent user counts?

  3. Is this the right way to set up the tests to get the information that I want?

I think that test will provide you the information you want. I would make one tweak though.
Change atOnceUsers(100)
to something more like this:
rampUsers(200) over (400 seconds)

You’ll want to change “over (400 seconds)” to whatever makes sense in your scenario.

Give it a run! You’ll probably have to visually inspect the report graphs to find out at what user count you begin seeing errors.

I should read the whole post… To run against one URL at a time, you could just comment out the other