Feeder and session

Hi all,

my scenarios heavily rely on the Feeders using CSV. Is there global way for the chains after feeder not to share the same session object?

I ended up cleaning “gatling.http.cookies” to avoid collisions of tests against the same JSESSIONID on the backend, i.e :

val deliveryCostList = csv(“delivery_cost_details.csv”).queue

scn =
scenario(“Delivery Cost checks”)
.repeat(deliveryCostList.data.length) {
.exec( session => session.remove(“gatling.http.cookies”))
http(“Add a new address for ‘${product_code}’ in ‘${storeId}’”)
.param(“email”, “${email}”)
.param(“firstName”, “${first_name}”)
.param(“lastName”, “${last_name}”)
.param(“line1”, “${line1}”)
.param(“town”, “${town}”)
.param(“postcode”, “${postal_code}”)
.param(“countryIsoCode”, “${country_iso}”)
.param(“state”, “${state_iso}”)
.param(“phoneNumber”, “${phone_number}”)
.check(status is 200)
http(“Set delivery mode for ‘${product_code}’ in ‘${storeId}’”)
.check(status is 200)

thank you for the help!


Sorry, but I don’t see any better option that the one you implemented here.

I’ll talk with @slandelle about having a “clear cookies” builtin …



You’re probably used to other tools such as JMeter, where users are implemented as threads, so it’s a common workaround to “reuse” old threads and clear them instead of creating new ones.
Try to think of real users going in their browser set up, trash their cookies and start browsing again.

In Gatling, a user is implemented as a message, and it’s very cheap to create a new one.
IMHO, you should think more about the behavior of the users you’re trying to simulate. What you’re probably trying to achieve is inject more users and remove the repeat loop.