Disclaimer : sorry for the double post, I wanted to edit my previous post but apparently all I could do was delete it. Thought it would delete the thread but it didn’t, my bad.
Hello,
I’ve been using Gatling 2.3.1 up until today, and in my script when I was using the following :
exec(addCookie(Cookie("name", "value")))
It wasn’t working, the cookie I was setting wasn’t included in the request that was following it.
So I just installed Gatling 3.0.0 RC4 (few months ago I had to reinstall it because for some reason my scripts weren’t compiling so I thought it might be a smiliar issue).
Documentation showed that the code regarding adding cookie was the same, but in the the end so is the result : it’s not working.
Here’s my code :
.exec(
http("request_70")
.post(uri02 + "/connexion/json/authenticate?realm=/INTERNET&realm=/INTERNET")
.headers(headers_38)
.body(StringBody("Random stuff for obvious reasons as login info are there")).asJson
.check(jsonPath("$.tokenId").saveAs("ivoiream")))
.exec(addCookie(Cookie("ivoiream", "${ivoiream}")))
.exec(
http("request_73")
.post(uri02 + "/connexion/json/users?_action=idFromSession&realm=/INTERNET")
.headers(headers_73))
And here’s the cookies that I got from the log after replaying my script :
cookie: dtCookie=52F0D5244481287EE8B6F1C8A2A72B9D|X2RlZmF1bHR8MQ; amlbcookie=01
(blablabla)
cookies=
dtCookie=52F0D5244481287EE8B6F1C8A2A72B9D|X2RlZmF1bHR8MQ, domain=.domain[.fr](http://edf.fr/), path=/
amlbcookie=01, domain=.domain[.fr](http://edf.fr/), path=/, secure
Any help on this ? I’ve tried pretty much everything but nothing is working.
Thanks !