jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma N" <um...@cspl.com>
Subject RE: Read a cookie value inside Jmeter 2.4
Date Wed, 03 Nov 2010 07:21:24 GMT
Please unsubscribe

-----Original Message-----
From: denis boutin [mailto:dboutin@c-log.com] 
Sent: Wednesday, November 03, 2010 12:29 AM
To: jmeter-user@jakarta.apache.org
Subject: Read a cookie value inside Jmeter 2.4

Hi,

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("test");
System.out.println("${JSESSIONID}"); // return ${JSESSIONID}
System.out.println("toto");
System.out.println(vars.get("JSESSIONID")); // null
System.out.println("cookie count : " + 
sampler.getCookieManager().getCookieCount()); // not executed probably 
due to bad syntax...

Blured.



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message