Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTesting Tools @ OneStopTestingLoadRunner @ OneStopTesting

Message Icon Topic: Ajax technology

Post Reply Post New Topic
Author Message
rima
Newbie
Newbie
Avatar

Joined: 25Apr2007
Online Status: Offline
Posts: 1
Quote rima Replybullet Topic: Ajax technology
    Posted: 25Apr2007 at 11:05pm
Hi All,

I am new to loadrunner. I am trying to record VU script for load testing of our web application. I am facing an issue with tree structure.
Basicaly, while loading the page only parent items will load with a + symbol to expand / view the child items of that parent.
When i am recording the script for expansion, as far as script is concerned there are no calls made to the server to display the child records. Here i am failing to execute my script.
We are using AJAX technology. Would like to know how can i address this issue.



Post Resume: Click here to Upload your Resume & Apply for Jobs

IP IP Logged
chahna
Newbie
Newbie
Avatar

Joined: 26Apr2007
Online Status: Offline
Posts: 1
Quote chahna Replybullet Posted: 26Apr2007 at 3:15am
I had to deal with AJAX once ... it was quite painful since there was not much support from the VuGen function library. Maybe this has changed with the Click+Script Vuser type, which I doubt. There is a function to evaluate JavaScript but as far as I can remember it doesn't really allow multiple return values, etc.

Here is basically what I did:
Since my load generators were running on Windows, I used the C system function (depending on your Vuser language; their are similar functions for every programming language) combined with the Scripting Host facility - wsf. I imported the JavaScript used in AJAX into the WSF and executed the functions necessary to generate the data which I need to have for the next step. From the VuGen network traces you can tell what these AJAX calls normally look like. Of course you are only interested in the call which data is actually needed for the next web_url or whatsoever call.

To reflect in code (informally):

    * Define web parameter size to very large (like 100k).
    * Catch full output of the AJAX call(s) into that parameter.
    * Extract XML data from the parameter.
    * Safe that XML data into a file (using a file name with the Vuser Id).
    * Process XML data in the file using the AJAX library over WSF locally.
    * Safe to an output file whatever you need to return to the Vuser for the next request.
    * Read that output from the file into the Vuser.
    * Make the next request using that data.



As you see, this has left the trails of record/corelate/parametrize quite a bit. Also this puts a lot of stress onto your load generators; you need to monitor their CPU and memory usage as well (which you should do anyway) to see that these aren't becoming a bottleneck themselves.

Also don't forget to add the .js files and the .wsf to your Vuser, otherwise they don't get loaded as part of the Vuser.

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 3.539 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Privacy Policy | Terms and Conditions
Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting