I have apache access logs that contain cookie information per request.
Can I feed these cookie values into a load test with jmeter?
My log format in apache is:
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combined
I see the Access Log Sampler, I’ve got it working to the point where it reads in my access logs and generates requests, but it doesn’t seem to include the cookies from the log line. I’ve played with the HTTPCookieManager and have gotten it to work to the point where it will use cookies returned from one call, in the next call, but it doesn’t use the cookie values form the access logs. Am I trying to do something impossible or am I missing something?
Example log line:
1.2.3.4 – – [31/Jul/2012:23:04:06 -0400] “GET /someurl/ HTTP/1.1” 200 28 “http:/domain/endpoint?params” “Mozilla/5.0 (Macintosh; Intel Mac
OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko)
Chrome/20.0.1132.57 Safari/536.11” “cookie1=value1;cookie2=value2”
My access log contains many lines like the one above, each having different cookie values of course. I want to create a load test where I replay that access log file, including the logged cookies.
Current implementation of Access Log Sampler does fully analyze the logs:
Documentation says:
The current implemenation of the parser only looks at the text within the quotes. Everything else is stripped out and igored.*
You can open an enhancement request with a sampler access log file.