Reputation: 539
Not able to get cookie value as Jmeter variable (HTTP cookie manager) which doens't have label.
In our .Net application, there are 3 cookie values in the request as given below:
Cookie:ASP.NET_SessionId=1axjnxqp; xx yy Pvt. Ltd.; compNameSelected=xx yy Pvt. Ltd.
if observed, the middle value doesn't have label (xx yy pvt. ltd). This value is not being captured as cookie in subsequent requests though added HTTP cookie manager, updated user.properties file with CookieManager.save.cookies=true.
Used Debug sampler, only two ASP.NET and comNameSelected are shown.
Please suggest and guide.
Upvotes: 1
Views: 1720
Reputation: 58882
Follow @Dmitri T answer with a small change to make it work:
In the Regular Expression Extractor, On Field to check choose Request Headers
It will get cookie value from request.
Upvotes: 0
Reputation: 168207
You can extract cookies from Set-Cookie response header using Regular Expression Extractor configured like:
cookies
Set-Cookie: (.*)
$1$
-1
(just in case there will be > 1 "Set-Cookie" header)References:
Upvotes: 0