jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denis boutin <>
Subject Read a cookie value inside Jmeter 2.4
Date Tue, 02 Nov 2010 18:59:06 GMT

I'm trying to read a cookie value inside JMeter2.4. Do you know how can 
I do that  ?

I've tried using a cookie manager which works well. However now in a 
certain part of my scenario I'd like to read a value of a cookie. So 
I've tried various solution, however none of them were successfull.
Direct acess to ${JSESSIONID} which is the name of the cookie correctly 
filled. However, the ${JSESSIONID} return ${JSESSIONID} and not the 
content of cookie

With an regexp extractor this is the same thing
Nom de référence : gna
Expression régulière : JSESSIONID=(.*)
Canevas : $1$

Test avec un postProcesseur beanshell :
System.out.println("${JSESSIONID}"); // return ${JSESSIONID}
System.out.println(vars.get("JSESSIONID")); // null
System.out.println("cookie count : " + 
sampler.getCookieManager().getCookieCount()); // not executed probably 
due to bad syntax...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message