Running scenarios in parallel

Hi,

Will below script runs the scenarios in parallel/concurrently? or do I have to do it differently? My goal is to run different scenarios concurrently to test the performance of the system.

val usersApiScenarios = List(
  GetAllUsers.getUsers.inject(
    atOnceUsers(100),
  ),
  GetUserByUsername.getUserByUsername.inject(
    atOnceUsers(100),
  )
 )

if you want to run scenarios concurrently:
setUp(
scn_1.inject(// traffic profile),
scn_2.inject(// traffic profile)
)

if you want to run scenarios sequentially,
setUp(
scn_1.inject( … during x seconds)
scn_2.inject(
nothingFor(x seconds),
// traffic profile
)
)

And ofc, within each scenarios, you could execute sequentially: scn = scenario(“randomName”).exec(api_1, api_2, api_3)

Those are my experience, might not be the best solution, but works.

Best,
Alex

Thank you Alex.

But I am trying to understand.
The only difference I see is that if the scenarios are separated by coma in the setup, they run concurrently. And if there is no coma between the scenarios they run sequentially.
Am I right?

Can point me to any documentation if there is any.

Thank You in advance.

oh, sorry, that was a typo, there should be comma, the difference is that to run scn sequentially, I use “nothingFor” https://gatling.io/docs/current/general/simulation_setup/#open-model
to make sure the second scn only starts after the first.

Thank you.