Reputation: 25
I have Login request and in request i got JSESSIONID along with XSRF-TOKEN as Cookie data as shown below in request
Cookie Data: XSRF-TOKEN=dcd43854-8ca5-4acd-b1ad-a220e776d7c5; JSESSIONID=D93526D77C6FEC68A3D39767481ACED1
and now i want to pass JSESSIONID in sign up Header manager as cookie parameter
After googling i found that in jmeter proprties file i made "CookieManager.save.cookies=true" and later i passed the cookie variable as JSESSIONID=${COOKIE_JSESSIONID} but this ${COOKIE_JSESSIONID} is taking it own JSSIONID rather i need it from the Login page JSESSIONID.
If required how to extract JSESSIONID from the response, So that we can pass that variable in Sign up Cookie
Upvotes: 1
Views: 626
Reputation: 336
You are required to use regular expression extractor under HTTP Login request. After looking at the screenshot attached by you, it seems that login request is processed with 2 redirects. Hence, the value of JSESSIONID has to be in the output (actually response headers or body) of either in the main login request or the first redirect request.
You can use the below configurations to capture the JESSIONID. Make sure to select the "Response Headers" & "Main sample and sub-samples" radio button of regular expression extractor as used in below screenshot.
Upvotes: 0