I am new to jmeter. I have setup up HTTP Request sampler to send GET request to google.com. The response I get is 200. But I could not find the response header where it shows the cookies in the response. I want to use that cookie value for my next request.
0
votes
2 Answers
3
votes
You need to look into View Results Tree listener, Set-Cookie
header will present in "Sampler Result" tab:
HTTP Cookie Manager should handle cookies automatically. Just in case if you need cookies to be store as JMeter Variables you can set the following property:
CookieManager.save.cookies=true
which can be done in 2 ways:
Pass it to JMeter startup script via -J command line argument as:
jmeter -JCookieManager.save.cookies=true
- Add aforementioned
CookieManager.save.cookies=true
line to user.properties file (located in "bin" folder of your JMeter installation) to make the change permanent. Remember, JMeter restart is required to pick the property up.
This way you will be able to access i.e. NID
cookie value as ${COOKIE_NID}
where required
See Using the HTTP Cookie Manager in JMeter guide for more information on using HTTP Cookie manager