You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Deviran <ka...@gmail.com> on 2010/12/16 08:10:50 UTC
Re: Read a cookie value inside Jmeter 2.4
Hi,
I am trying to get the COOKIE value using the Regular Expression Extractor
as follows,
I have set the 'Response Field to check ' to Headers.
Reference Name : mysessionID
Regular Expression : COOKIE_SESSIONID=(.+?)
Template : $1$
Match No. : 1
Default Value : 11111111
I am getting the value as ${mysessionID}. I get only '11111111'.
I have also tried, Regular Expression : ${COOKIE_SESSIONID}
What's wrong. I appreciate your help.
Thanks,
Devi.
--
View this message in context: http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307487.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Mariusz W <ma...@gmail.com>.
have you tried:
SESSIONID=(.*?);
and use ${mysessionID}
if you have Reference Name : mysessionID
it should contain "6959ea68" for example - use Debug Sampler as mentioned
earlier to check if value is ok.
On Thu, Dec 16, 2010 at 11:43 AM, Deviran <ka...@gmail.com> wrote:
>
> I tried SESSIONID too, still getting the default value.
>
>
> i just used 'COOKIE_xx' as mentioned in the doc.
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager
>
> Pls help.
>
> Thanks,
> Devi.
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307723.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: Read a cookie value inside Jmeter 2.4
Posted by Deviran <ka...@gmail.com>.
Yes, i checked the Debug Sampler, i am able to see the COOKIE_SESSIONID
value.
I used ${COOKIE_SESSIONID} directly to set a parameter value without using
regular expression.
i am getting the value.
Thanks a lot for your help.
Regards,
Devi.
--
View this message in context: http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307806.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Mariusz W <ma...@gmail.com>.
I don't use this feature also but after enabling it I see in Debug Sampler:
COOKIE_JSESSIONID=3B153CADD0FC756E14B35CE563BB7D87
where JSESSIONID I get in set-cookie.
On Thu, Dec 16, 2010 at 11:54 AM, Felix Frank <ff...@mpexnet.de> wrote:
> On 12/16/2010 11:43 AM, Deviran wrote:
> >
> > I tried SESSIONID too, still getting the default value.
> >
> >
> > i just used 'COOKIE_xx' as mentioned in the doc.
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager
>
> Interesting. I didn't know Cookie Manager can do that.
>
> Have you added CookieManager.save.cookies=true to the properties file?
>
> If so, you don't need the regex extractor at all, if I'm reading this
> correctly.
>
> Use the Debug Sampler to find out exactly what variables are populatet
> by the Cookie Manager.
>
> Regards,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: Read a cookie value inside Jmeter 2.4
Posted by Felix Frank <ff...@mpexnet.de>.
On 12/16/2010 11:43 AM, Deviran wrote:
>
> I tried SESSIONID too, still getting the default value.
>
>
> i just used 'COOKIE_xx' as mentioned in the doc.
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager
Interesting. I didn't know Cookie Manager can do that.
Have you added CookieManager.save.cookies=true to the properties file?
If so, you don't need the regex extractor at all, if I'm reading this
correctly.
Use the Debug Sampler to find out exactly what variables are populatet
by the Cookie Manager.
Regards,
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Deviran <ka...@gmail.com>.
I tried SESSIONID too, still getting the default value.
i just used 'COOKIE_xx' as mentioned in the doc.
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager
Pls help.
Thanks,
Devi.
--
View this message in context: http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307723.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Felix Frank <ff...@mpexnet.de>.
On 12/16/2010 11:15 AM, Deviran wrote:
>
> example cookie below,
>
> Cookie Data:
> SESSIONID=6959ea68; $Path=/;
Err - then why on earth does your regex say COOKIE_SESSIONID instead of
SESSIONID ?!
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Deviran <ka...@gmail.com>.
example cookie below,
Cookie Data:
SESSIONID=6959ea68; $Path=/;
Request Headers:
Accept-Language: en-us
Accept-Encoding: gzip, deflate
.
.
.
i will check how to use the Debug Sampler.
Thank you for the help,
Devi.
--
View this message in context: http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307685.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Felix Frank <ff...@mpexnet.de>.
On 12/16/2010 09:24 AM, Mariusz W wrote:
> hi,
> Can you get some exemple cookie from your test? I also think that this
> regexp - COOKIE_SESSIONID=(.+?) - will give you only first letter from all
> cookie.
Fair assumption.
Also, using a Debug Sampler is highly recommended.
> On Thu, Dec 16, 2010 at 8:10 AM, Deviran <ka...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> I am trying to get the COOKIE value using the Regular Expression Extractor
>> as follows,
>>
>> I have set the 'Response Field to check ' to Headers.
>> Reference Name : mysessionID
>> Regular Expression : COOKIE_SESSIONID=(.+?)
>> Template : $1$
>> Match No. : 1
>> Default Value : 11111111
>>
>> I am getting the value as ${mysessionID}. I get only '11111111'.
>>
>> I have also tried, Regular Expression : ${COOKIE_SESSIONID}
>>
>> What's wrong. I appreciate your help.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Read a cookie value inside Jmeter 2.4
Posted by Mariusz W <ma...@gmail.com>.
hi,
Can you get some exemple cookie from your test? I also think that this
regexp - COOKIE_SESSIONID=(.+?) - will give you only first letter from all
cookie.
On Thu, Dec 16, 2010 at 8:10 AM, Deviran <ka...@gmail.com> wrote:
>
> Hi,
>
> I am trying to get the COOKIE value using the Regular Expression Extractor
> as follows,
>
> I have set the 'Response Field to check ' to Headers.
> Reference Name : mysessionID
> Regular Expression : COOKIE_SESSIONID=(.+?)
> Template : $1$
> Match No. : 1
> Default Value : 11111111
>
> I am getting the value as ${mysessionID}. I get only '11111111'.
>
> I have also tried, Regular Expression : ${COOKIE_SESSIONID}
>
> What's wrong. I appreciate your help.
>
> Thanks,
> Devi.
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Read-a-cookie-value-inside-Jmeter-2-4-tp3247250p3307487.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>