I am new to Gatling tool. I am using auth token of 1 user and passing in the header for each api call but in inject method I am passing atOnceUsers(10) .that seems to be working and I am able to generate beautiful reports with success and expected failure cases.
val Auth_Cookie = Map(“Accept” → “/”,“cookie” → “.AUTHMPC=8BEAE9079269;”)
As you can see below, Auth_Cookie is and sending in the header for each api.
.exec(http(“request_10”)
.get(uri6 + “/manifest.json”)
.headers(headers_5)
.resources(http(“request_11”)
.options(uri4 + “/Accounts/IsCookieExists”)
//.headers(headers_11),
.headers(Auth_Cookie),
http(“IsCookieExists”)
.get(uri4 + “/Accounts/IsCookieExists”)
//.headers(headers_13),
.headers(Auth_Cookie),
http(“request_15”)
.options(uri4 + “/Accounts/Active”)
.headers(headers_11),
setUp(scn1.inject(
atOnceUsers(20)
).protocols(httpProtocol))
Above with one Auth_cookie token, I am passing 20 users , which is wrong right, in real world,20 different users will login and 20 users will have different auth cookie token which needs to be passed in header for all the api’s.
So how to pass 20 different cookies for all the api simultaneously for the UI performance testing.
I want your help & suggestion, how to deal with this case?
Regards,
Sweta S Bala