Web_Add_Cookie, do i need to remove this from my script?

587 views
Skip to first unread message

Ltester

unread,
Jan 11, 2010, 4:16:48 PM1/11/10
to LoadRunner
All,
I created a script with the protocol "SAP WEB", and now i can see
lines that look like this

web_add_cookie
("__utma=53051772.1381310793.1258072906.1258710680.1259973614.20;
DOMAIN=susd15.Testingqa.com");

web_add_cookie("IV_JCT=%2Fscesus;
DOMAIN=scesuppliersbx.edisonintl.com");

Am i suppose to take them out of the script?

can this cause any issues?

Thanks


Floris Kraak

unread,
Jan 11, 2010, 6:28:29 PM1/11/10
to lr-loa...@googlegroups.com
On Mon, Jan 11, 2010 at 10:16 PM, Ltester <azar...@gmail.com> wrote:
>
> web_add_cookie
> ("__utma=53051772.1381310793.1258072906.1258710680.1259973614.20;
> DOMAIN=susd15.Testingqa.com");
>
> web_add_cookie("IV_JCT=%2Fscesus;
> DOMAIN=scesuppliersbx.edisonintl.com");
>
> Am i suppose to take them out of the script?
>
> can this cause any issues?
>

The answer is "sometimes". It depends on where that recorded cookie came from.
The rule of thumb:
- If the cookie is added via a HTTP header, then you can probably remove it
- If it's added via javascript (document.cookie = ) then you probably
can't and may have to correlate.

Regards,
Floris
---
'What does it mean to say that one is 48% slower? That's like saying
that a squirrel is 48% juicier than an orange - maybe it's true, but
anybody who puts the two in a blender to compare them is kind of
sick.'
--- Linus Torvalds

franklin inbaraj

unread,
Jan 12, 2010, 2:13:14 AM1/12/10
to lr-loa...@googlegroups.com
Remove the cookie and run the scripts, if no issues, then u can remove it. Only some cookies need to correlated. These cookis will not make any impact on the system/response times.
 
Thanks,
Franklin

--
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



--
Franklin Inbaraj

papayamilkshake

unread,
Jan 12, 2010, 7:23:37 AM1/12/10
to LoadRunner
Try running the script w the cookies. Cookies should be handled by LR
so you need not be too worried over it
However, at times, the cookies may cause your scripts not to work as
they are retrieving specified values from the cookies which are used
in authentication.
therefore do take note of this.

regards
papayamilkshake
@ http://loadrunnertnt.com

On Jan 12, 3:13 pm, franklin inbaraj <franklininba...@gmail.com>
wrote:


> Remove the cookie and run the scripts, if no issues, then u can remove it.
> Only some cookies need to correlated. These cookis will not make any impact
> on the system/response times.
>
> Thanks,
> Franklin
>
>
>

> On Tue, Jan 12, 2010 at 4:58 AM, Floris Kraak <randa...@gmail.com> wrote:


> > On Mon, Jan 11, 2010 at 10:16 PM, Ltester <azarco...@gmail.com> wrote:
>
> > > web_add_cookie
> > > ("__utma=53051772.1381310793.1258072906.1258710680.1259973614.20;

> > > DOMAIN=susd15.Testingqa.com <http://susd15.testingqa.com/>");


>
> > > web_add_cookie("IV_JCT=%2Fscesus;
> > > DOMAIN=scesuppliersbx.edisonintl.com");
>
> > > Am i suppose to take them out of the script?
>
> > > can this cause any issues?
>
> > The answer is "sometimes". It depends on where that recorded cookie came
> > from.
> > The rule of thumb:
> > - If the cookie is added via a HTTP header, then you can probably remove it
> > - If it's added via javascript (document.cookie = ) then you probably
> > can't and may have to correlate.
>
> > Regards,
> > Floris
> > ---
> > 'What does it mean to say that one is 48% slower? That's like saying
> > that a squirrel is 48% juicier than an orange - maybe it's true, but
> > anybody who puts the two in a blender to compare them is kind of
> > sick.'
> >   --- Linus Torvalds
>
> > --
> > 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<LR-LoadRunner%2Bunsu...@googlegroups.com>

Floris Kraak

unread,
Jan 12, 2010, 10:46:31 AM1/12/10
to lr-loa...@googlegroups.com
On Tue, Jan 12, 2010 at 1:23 PM, papayamilkshake
<papayam...@gmail.com> wrote:
>
> Try running the script w the cookies.  Cookies should be handled by LR
> so you need not be too worried over it

The thing is, Loadrunner solves the cookie problem for roughly 90% of
the cookies by automatically handling cookies that get added via HTTP
headers when the script runs.
Don't ask me why it still records those. It does, and we get to delete them.

But, for the remaining 10% or so (YMMV - it's probably less) of the
cookies in your recording there actually is a good reason why they are
there: They were added via other means - usually javascript, code
running inside the webpage which the basic HTTP protocol does NOT
emulate.
(That's what Click & Script is for..)

> However, at times, the cookies may cause your scripts not to work as
> they are retrieving specified values from the cookies which are used
> in authentication.

Er, cookies do not on their own retrieve values from other cookies.
Sure, it's possible that a cookie gets added via javascript that uses
a value that was added via a different cookie. In that case you may
have to correlate these values. But the criterium 'it uses a value
inside a cookie' isn't why you correlate. The real criterium is "it
uses data that was send to me in the previous transaction". How it was
send to you and how you send that data back is kind of irrelevant. ;-)

Ltester

unread,
Jan 12, 2010, 3:23:52 PM1/12/10
to LoadRunner
Thank you all for your reply

On Jan 12, 7:46 am, Floris Kraak <randa...@gmail.com> wrote:
> On Tue, Jan 12, 2010 at 1:23 PM, papayamilkshake
>

Reply all
Reply to author
Forward
0 new messages