Run multiple scenarios sequently over a csv of domains

hi folks,

i have searched and tried over and over again, but i don’t get how i could run multiple scenarios with a load of users sequential for each user (for example: login, add to basket, got to checkout, checkout).

That way i could isolate the login scenario (separate object) to get the cookies and session to work out different “scenarios”:

File: login.scala

package ndx

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import headers._

object webdev_just_login {
val chain_login = scenario(“login”)

:
:
}

File: addtobasket.scala

package ndx

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import headers._

object webdev_just_addtobasket {
val chain_basket = scenario(“addtobasket”)

:
:
}

I hope to be clear, if not please comment.

Thanks for this nice peace of software by the way :slight_smile:

Hartmut

You can’t compose scenarios, only chains.

Remove scenario() from chain_login and chain_basket.

Then, you’ll be able to build a final scenario out of them, e.g.:

scenario(“foo”).exec(chain_login, chain_basket)

Cheers (and thanks),

Stéphane

Hi Stéphane,

that did it, thanks.

Hartmut

You’re welcome.

Have fun!