I’m on: Gatling 2.0.0-RC4
From the HAR then…
In the initial Log in POST request, here’s a snippet of the response…
“response”: {
“status”: 302,
“statusText”: “Found”,
“httpVersion”: “HTTP/1.1”,
“headers”: [
{
“name”: “Date”,
“value”: “Fri, 12 Sep 2014 14:29:51 GMT”
},
{
“name”: “X-AspNetMvc-Version”,
“value”: “3.0”
},
{
“name”: “Server”,
“value”: “Microsoft-IIS/7.5”
},
{
“name”: “X-AspNet-Version”,
“value”: “4.0.30319”
},
{
“name”: “X-Powered-By”,
“value”: “ASP.NET”
},
{
“name”: “Content-Type”,
“value”: “text/html; charset=utf-8”
},
{
“name”: “Location”,
“value”: “/”
},
{
“name”: “Cache-Control”,
“value”: “private”
},
{
“name”: “Set-Cookie”,
“value”: “AuthKey=JJRo-CkKx5aZsVo9DkXRhGnghba_I9ai8Enmy306olOVeVp4qlvtBIfMN6AuiyRWpZ3PlO-4tEyGrD0moSrd7g; path=/”
},
{
“name”: “Content-Length”,
“value”: “118”
}
],
“cookies”: [
{
“name”: “AuthKey”,
“value”: “JJRo-CkKx5aZsVo9DkXRhGnghba_I9ai8Enmy306olOVeVp4qlvtBIfMN6AuiyRWpZ3PlO-4tEyGrD0moSrd7g”,
“path”: “/”,
“expires”: null,
“httpOnly”: false,
“secure”: false
}
]
…where AuthKey is the cookie I’m interested in.
Still in the HAR file, here’s a future call where this is used:
{
“startedDateTime”: “2014-09-12T14:29:52.196Z”,
“time”: 1773.4999656677246,
“request”: {
“method”: “GET”,
“url”: “OUR URL HERE REMOVED FROM THIS EXAMPLE”,
“httpVersion”: “HTTP/1.1”,
“headers”: [
{
“name”: “Accept-Encoding”,
“value”: “gzip,deflate,sdch”
},
{
“name”: “Host”,
“value”: “10.186.60.100:85”
},
{
“name”: “Accept-Language”,
“value”: “en-GB,en-US;q=0.8,en;q=0.6”
},
{
“name”: “User-Agent”,
“value”: “Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36”
},
{
“name”: “Accept”,
“value”: “text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8”
},
{
“name”: “Referer”,
“value”: “REDACTED URL AS THIS IS AN EXAMPLE”
},
{
“name”: “Cookie”,
“value”: “ASP.NET_SessionId=ikwcdl5igx11rsbzxaxxitwt; .ASPXAUTH=B2480671121B9B2D19D5978B99468138E6895C19B65C267175FADAA9761FE0B1744C58FC4A098866C274170A506CD9BAEA9B44B9F8A94268525E8788FE883CA4AC0B0C60126ECE7D18FC4E4F0F6E8DD38297AE3BD1090F968A9478105AB876DD; __utma=58869677.1896549843.1410524728.1410527132.1410528232.3; __utmb=58869677.14.9.1410532077718; __utmc=58869677; __utmz=58869677.1410524728.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); AuthKey=JJRo-CkKx5aZsVo9DkXRhGnghba_I9ai8Enmy306olOVeVp4qlvtBIfMN6AuiyRWpZ3PlO-4tEyGrD0moSrd7g”
},
{
“name”: “Connection”,
“value”: “keep-alive”
},
{
“name”: “Cache-Control”,
“value”: “max-age=0”
}
],
“queryString”: [],
“cookies”: [
{
“name”: “ASP.NET_SessionId”,
“value”: “ikwcdl5igx11rsbzxaxxitwt”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “.ASPXAUTH”,
“value”: “B2480671121B9B2D19D5978B99468138E6895C19B65C267175FADAA9761FE0B1744C58FC4A098866C274170A506CD9BAEA9B44B9F8A94268525E8788FE883CA4AC0B0C60126ECE7D18FC4E4F0F6E8DD38297AE3BD1090F968A9478105AB876DD”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “__utma”,
“value”: “58869677.1896549843.1410524728.1410527132.1410528232.3”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “__utmb”,
“value”: “58869677.14.9.1410532077718”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “__utmc”,
“value”: “58869677”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “__utmz”,
“value”: “58869677.1410524728.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)”,
“expires”: null,
“httpOnly”: false,
“secure”: false
},
{
“name”: “AuthKey”,
“value”: “JJRo-CkKx5aZsVo9DkXRhGnghba_I9ai8Enmy306olOVeVp4qlvtBIfMN6AuiyRWpZ3PlO-4tEyGrD0moSrd7g”,
“expires”: null,
“httpOnly”: false,
“secure”: false
}
],
“headersSize”: 991,
“bodySize”: 0
},
“response”: {
“status”: 200,
“statusText”: “OK”,
“httpVersion”: “HTTP/1.1”,
…blah blah blah
In the test, the log in form POST looks something like this…
.exec(http(“request_23”)
.post("""/Account/LogOn/Url/Defined/Here""")
.headers(headers_23)
.pause(1)
…and I would have expected any future calls in this session to use any and all cookie data returned from this call.
Is that right?