Deepak Shetty <[email protected]> wrote on 04/18/2012 01:49:16 PM:
>
> Extracting the cookie is a regex extractor (where you select the option
for
> Header) and extract based on the name or 'Set-Cookie' header
> Then you add a beanshell post processor that does something like
> sampler.getCookieManager().addCookie(cookie); where the cookie is based
on
> the value you extracted
I seem to be doing something wrong. I am able to extract the section of the
cookie I need, in the format I need.
However, the cookie is not showing up as I need/want it to.
In the example given is "sampler" the literal text I would use, or is it a
placeholder for the actual sampler or some other sort of reference to the
sampler the processor is attached to?
Also, I am needing to modify the cookies being SENT, so shouldn't I be
using a BeanShell PRE processor, and not a POST?
Reference Name : GROUP_COOKIE
Regular Expression : tn_cookie_groups=("[A-Za-z0-9\ _-]*")
Template : $1$
Script:
sampler.getCookieManager().addCookie(Cookie("tn_cookie_groups2", $
{GROUP_COOKIE}));
I have also tried:
sampler.getCookieManager().addCookie("tn_cookie_groups2", $
{GROUP_COOKIE});
in both pre and post processors.
Please forgive me if this is something obvious or basic, but I am
relatively new to jmeter and have been fighting with this issue for
approaching two weeks now.
Thank you for your help.
Lee Lowder
This communication and any attachments are confidential, protected by
Communications Privacy Act 18 USCS ยง 2510, solely for the use of the intended
recipient, and may contain legally privileged material. If you are not the
intended recipient, please return or destroy it immediately. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]