RSS

How to extract Cookie Data from Jmeter Request

26 May

How to extract Cookie Data from Jmeter Requestcomfortfood_cookie_design

Simpler option is adding a HTTP Cookie Manager which automatically handles cookies. However you need to set CookieManager.save.cookies=true property either in user.propertiesfile or by passing a corresponding parameter to JMeter startup script i.e.

jmeter -JCookieManager.save.cookies=true

After that you’ll see all the cookies as JMeter Variables. The easiest way to visualize them is using Debug Sampler and View Results Tree Listener

In your case you can access your sid cookie as

${COOKIE_sid}

Other cookies can also similarly be obtained as ${COOKIE_sidClient}, ${COOKIE_clientSrc}, etc.

CookieManager.delete_null_cookies=false
CookieManager.save.cookies=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.output_format=xml
Advertisements
 
Leave a comment

Posted by on 26/05/2017 in Jmeter

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: