How to execute multiple request asynchronously

I am new to Gatling and I am trying to do load testing our multiple post call during member enrollment. After successful login, the multiple enrollment call need to be made asynchronously.

Below is my simulation. How do I make it asynchronous so that enroll image, voice id etc will be called asynchronously.


package Simulations

import baseConfig.BaseSimulation
import io.gatling.core.Predef._
import io.gatling.http.Predef._

class EnrollmentTest  extends BaseSimulation {

  val csvFeeder = csv("enrollMany.csv").circular

  def retrieveBearerToken() = {
    // retrieve authorization Bearer Token
   
  }

  def startEnrollment() = {

    repeat(1000) {
      // now call the feeder here
      feed(csvFeeder)
        .feed(customFeeder)
        // post enrollment login with Bearer Token
        .exec(http("login")
          .post("enrollmentLogin")
        )

       //Now I want to make following request asynchronous

        // Enroll Image
        .exec(http("Enroll Image")
          .post("url1")
        )

resources

resources ??

Have you searched for “resources” in Gatling’s documentation?

Yes i did, but I didn’t find any suitable solution. Can you please provide some sample or link for this.

Hi Raj,

I think Stéphane meant this: https://gatling.io/docs/current/http/http_request#resources

But it may not be enough for you. There’s also this RFE - https://github.com/gatling/gatling/issues/3783

peter

Thank you!