scalastress-testinggatling

Gatling: Get cookie value with Gatling 2


Hi I want to extract a value from a cookie and pass that cookie value as a parameter to the next exec(). I found some syntax which does not work for the new Gatling 2. Could someone please show an example?

Thanks


Solution

  • Answered on Gatling Goole Group: extract with a regex from the "Set-Cookie" header:

    .check(headerRegex("Set-Cookie", "yourRegexHere").saveAs("attributeName"))