How to call multiple APIs in parallel for load testing, using Gatling ?

I’m currently trying to load test my APIs using Gatling, but I have a very specific test that I want to perform. I would like to simulate a Virtual User calling all my APIs (the 16 of them) simultaneously. I would like to repeat this multiple times so I can have an idea of the average time it takes for my APIs to respond when called all together at the same time.

The method I used was :

  • Creating a Scenario for each of my API.
  • Calling every single one of the scenarios in my SetUp()
  • Injecting 60 users in every scenarios with a throttle of 1 Request per Second & holding it for 60 seconds.

The aim was to have 60 iterations of what I wanted.

FYI I’m using Gatling 3.1.2

//This is what all my scenarios look like

val bookmarkScn = scenario("Bookmarks").exec(http("Listing bookmarks")

//My setUp


//Adding all the scenarios one after the other


I got some results with this method but they are not at all what I was expecting and if I keep the test going for too long eventually every call just timeout.

It was supposed to just take more time than usual (e.g from 100ms per API to 300ms).

My question is : Is this method correct ? Can you help me achieve my goal ?

Please read throttle documentation. It doesn’t make your users loop, it’s a mere rate limiter.

You need to either make your users loop, or inject more.