Loadrunner vs Ajax

171 views
Skip to first unread message

Suresh Gattu

unread,
Nov 3, 2009, 10:10:07 AM11/3/09
to LR-Loa...@googlegroups.com
All,

What is the best way of scripting a business process which involves
Ajax based calls which update the response content again and again
onto the same webpage.

Http requests sent via lr ,need a response which either stops or ends
with a time out or error before sending the next http request. But
when Ajax is involved the request sent would get back periodic updates
sent back continously without ending the response at a point.

In this type of scenario what would be appropriate approach in scripting

G


Floris Kraak

unread,
Nov 3, 2009, 11:18:42 AM11/3/09
to lr-loa...@googlegroups.com
On Tue, Nov 3, 2009 at 4:10 PM, Suresh Gattu <saisure...@gmail.com> wrote:
>
> Http requests sent via lr ,need a response which either stops or ends
> with a time out or error before sending the next http request. But
> when Ajax is involved the request sent would get back periodic updates
> sent back continously without ending the response at a point.
>
> In this type of scenario what would be appropriate approach in scripting
>

Fun, a challenge ;-)

If I understand you correctly then there is a single XMLHttpRequest in
the application you're testing which simply keeps the connection open
indefinitely. The normal web protocol does not deal with this
possibility, it just assumes the response will finish at some stage.

I believe the Web Services protocol does have some support for this
mode of operation but since I haven't used yet I don't know how well
it works. It seems that you can tell the transport layer to process
XML requests asynchronously and create an event handler to deal with
the responses. Presumably this is what you are looking for.

I strongly recommend you look into the documentation regarding this
protocol though - like I said, I have no experience with this.

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

hiranmaya

unread,
Nov 4, 2009, 7:22:08 AM11/4/09
to LoadRunner
LoadRunner 9.1 onwards there is a specific protocol "AJAX Click and
Script" specifically for supporting AJAX based applications.
Have not used it but i guess its similar to pure click and script
protocol where the recording is more like functional automation tools
(QTP), and records the user actions on the application (like entering
values in forms, clicking on button, etc).

Regards,
Hiranmaya.

Floris Kraak

unread,
Nov 4, 2009, 8:58:02 AM11/4/09
to lr-loa...@googlegroups.com
On Wed, Nov 4, 2009 at 1:22 PM, hiranmaya <hiran...@gmail.com> wrote:
> LoadRunner 9.1 onwards there is a specific protocol "AJAX Click and
> Script" specifically for supporting AJAX based applications.
> Have not used it but i guess its similar to pure click and script
> protocol where the recording is more like functional automation tools
> (QTP), and records the user actions on the application (like entering
> values in forms, clicking on button, etc).

Whether that deals with XML requests that never finish is an open
question though, isn't it?

hiranmaya

unread,
Nov 4, 2009, 9:19:54 AM11/4/09
to LoadRunner
I just tried recording the google home page where search options are
progressively displayed while keying in the search criteria through
AJAX calls, using the AJAX click and script. The script really does
not record the calls to the server while keying in the search
criteria.
Well I am not sure if this is the right method.

Yes Floris, you are right.. the question of handling XML requests
still remains.

Regards,
Hiranmaya.

On Nov 4, 6:58 pm, Floris Kraak <randa...@gmail.com> wrote:

Roland Jefferson JR

unread,
Nov 4, 2009, 11:04:19 AM11/4/09
to lr-loa...@googlegroups.com
With Ajax Click and Script you have to adjust the sensitivity of what
you are recording to pick up extra sensitive gui changes. Check this
out in the help files.
Roland
> --
> 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

Suresh Gattu

unread,
Nov 4, 2009, 1:04:04 PM11/4/09
to lr-loa...@googlegroups.com, lr-loa...@googlegroups.com
Ajax click and script is quite tricky, does this involve playing
around with DEP execution prevention settings on vugen machine if
recording is not smooth,also not sure ajax push technology is
supported with lr

Also are there any non click and script methods possible

G

"quality is assurance of perfection"

On Nov 4, 2009, at 11:04 AM, Roland Jefferson JR <rolandjef...@gmail.com

Sameh Abdelhamid

unread,
Nov 4, 2009, 5:31:58 PM11/4/09
to lr-loa...@googlegroups.com
Ronald is correct. You need to adjust the sensitivity, and you can definatley catch the chatter between the webclient and the webserver.
However,  I still find that it is much better using HTTP mode.
Each to their own.
Problem with click and script is teh scripts are not re-useable if the slightest thing changes from the java client at a user perspective.

Sam Abdelhamid

unread,
Nov 4, 2009, 9:01:37 AM11/4/09
to lr-loa...@googlegroups.com
Ajax click and script, is really bad. I've been using it for the past
few months, and have scraped it. LR9.5 guys say that they spent alot
of effort on it and its really good. But its not. Sorry mr HP. You
fail this time.
In General click and script is a really really bad way to write
scripts. It tried to make recording a script simple and easy, but in
reality its not that easy. Sure, with some off the shelf apps, it may
just work, but I wouldnt
hold your breath.
There is nothing you cant do in HTTP/HTML mode, with a little
intuitive C coding to achieve what you mention.
Basically, even click and script wont solve your keep alive packets in
LR........
Time to put on your developer hat and write some methods that deal
with it....
Reply all
Reply to author
Forward
0 new messages