Correlate the dynamic value in cookie

587 views
Skip to first unread message

mandy

unread,
Mar 1, 2011, 2:02:43 AM3/1/11
to LoadRunner
Hi,

I am new to LR. I recorded one scenario through LR. In my script,
cookies have got added through web_add_cookie. These cookies are
generated through javascript and contain some dynamic value that i
need to use in the next web_url call. The cookie is in client request
header.
Is there a way by which i can correlate that value in cookie?

James Pulley

unread,
Mar 1, 2011, 7:08:02 AM3/1/11
to lr-loa...@googlegroups.com
"I am new to LR"

Welcome. Have you been through standardized product training with a
certified instructor and has your organization assigned a mentor to work
with you?

James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix

Hi,

--
You received this message because you are subscribed to the Google
"LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

Mandy

unread,
Mar 1, 2011, 10:56:48 AM3/1/11
to lr-loa...@googlegroups.com
I have attended 3 days training for LR. But i dont have a mentor to
work with me.

Sent from my iPhone

On Mar 1, 2011, at 5:38 PM, "James Pulley" <loadrunn...@jamespulley.com

Rao Gadde

unread,
Mar 1, 2011, 11:52:39 AM3/1/11
to lr-loa...@googlegroups.com
yes you can correlate them

James Pulley

unread,
Mar 1, 2011, 1:10:20 PM3/1/11
to lr-loa...@googlegroups.com
Use the manual methods identified in training class for the implementation
of your correlated cookie. If your cookie value is truly generated locally
with Javascript then you have few options. You can either reproduce the
Java algorithm in C which produces the value, which is not as difficult as
it sounds, or you need to have a client type which runs your JavaScript,
such as TruClient. I am not a large fan of the tradeoffs involved in the
resource use of TruClient versus the benefits derived so I would likely opt
for the reproduction of the Javascript in C route. Based upon your needs,
background and availability of some honkingly-large-and-supremely-powerful
load generators you may opt for a different route.

V.M.Guruprasath

unread,
Mar 1, 2011, 1:42:09 PM3/1/11
to lr-loa...@googlegroups.com
Hi Mandy,

Couple of points:

1. Client send cookies and Server send cookies.

If you need to correlate server side cookies:

1. Identify the request for which the server sends the desired cookies. Then correlate cookie here.
2. If the value appears in header use web_reg_save_param(""); In attributes use "Search=Headers".

If the cookie to be correlated is a Client side cookie generated by Java code then sit with developer and understand the logic behind the cookie generation. eg: JSESSIONID = <Login_User_FirstName>+<5 digit random number> (some thing like: JSESSIONID=MANDY12345) then try to write a C program that generate a similar cookie.

Hope that helps.

Regards,

V.M.Guruprasath

Surendra Ramanapudi

unread,
Mar 1, 2011, 2:12:48 PM3/1/11
to lr-loa...@googlegroups.com
Just cleanup all the cookies.

mandy

unread,
Mar 3, 2011, 12:56:19 AM3/3/11
to LoadRunner
Thanks everybody for giving the solutions. I will try those and let
you know if it works. And definitely if it doesnt work :)
> >http://groups.google.com/group/LR-LoadRunner?hl=en- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages