How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Reload this page AJAX Scripting in LoadRunner

This page analyzes (truthfully, without the hype and generalizations) the issues around recording and running LoadRunner C scripts on websites built using the AJAX design pattern.


RSS XML feed for load testers RSS preview for load testers Site Map List all pages on this site 
About this site About this site 
Go to first topic Go to Bottom of this page

Set screen The Trouble with AJAX and LoadRunner

Set screen The Annoyances with LoadRunner Click and Script

Set screen Alternatives to LoadRunner

Set screen Reverse Psychology

Set screen X-Ray Eyes

Set screen A Valuable Service to Developers

Set screen JavaScript Libraries LoadRunner Advertised to Support

Set screen JavaScript Libraries LoadRunner Does Not Officially Support

Set screen LoadRunner Click and Script 16 Functions

Set screen AJAX specific LoadRunner functions and other libraries

Set screen LoadRunner's Trouble with Recording

Set screen Files To Consider

Set screen Tools To Expose Behavior

Set screen Strategy for Recording Using LoadRunner

  1. In following my approach for recording, run through the business process to write down the manual activities you will perform and the verification necessary.

    Due to the complexity of AJAX, I also recommend saving a graphic file (visual snapshot) for each before/after condition along with the HTML that created each.

  2. After recording, additional script coding is usually needed to be added to reveal internal conditions.

  3. Invoke VuGen (from Start > LoadRunner > Applications > Virtual User Generator), click "New User Script" to create a new Multi-protocol script of "Web (Click and Script)" (available in LoadRunner v8.1 FP4 and later). Click the right arrow to move it over to the Selected Protocol, then click OK. This activates technology from the HP QuickTestPro (QTP) product which recognizes and replays Javascript just as the browser would.

    I usually get rid of the Tasks pane and click the Script icon.

  4. In VuGen menu Tools > Recording Options, by pulling down the Tools menu. In Advanced, check "Record rendering-related property values" and "Enable generation of out-of-context steps". In Web Event Configuration, move slider up to High. Adjust this back down to Medium on less difficult apps.
  5. Rather than recording into the default vuser_init or Action section, I prefer to make a habit of recording into a separate new "Recording" VuGen action file (then copying and pasting generated code). This is because I at times wiped out my edited Action code.
  6. Click Start Record. Select "Internet Application" and type in the URL of the AJAX-enabled page you want to script. For this tutorial, we use the at ASP.NET AJAX (AjaxControlToolkit) from Microsoft at Microsoft updates this page to the latest release. Known releases are the September 2009 Release Version 3.0.30930 and Version 3.0.30512 based on .NET Framework 3.5 developed using Visual Studio 2008.

    There is an earlier version on .NET Framework 2.0 developed using Visual Studio 2005.

  7. If you get a "Data Protection Exception", from the start menu, select "All Programs", then "Accessories" and right-click on the "Command Prompt" shortcut and choose "Run As Administrator". Click Continue to confirm. Disable Data Execution Prevention (DEP) with this following command:

    After your run, turn it back on again:

    The expected response from the computer is:

  8. If you are running with IE7, you may get this dialog. If so, click Yes, then open up IE again and paste the app URL in the IE Address bar. You should now see the count of events increment.
  9. Before performing each activity on the page being recorded, I add a comment so I can remember the text I clicked on and why I did it.

    Copy and paste the text from your list of actions planned. If you didn't plan, open a Notepad and add to the list as your record.

  10. Stop the recording. VuGen then generates LoadRunner script code.

Set screen ASP.NET/AJAX/Samples

Set screen web_reg_cross_step_download

Set screen Working with JavaScript Variables

Set screen Recording Sensitivity

Set screen Modal Dialogs

Set screen Find the Value

Set screen Replay Problems

Set screen Getting Information by Recording in Web HTML Mode

Set screen Before Replay

Set screen JSON Coming Back

Set screen Resources:

Portions ©Copyright 1996-2014 Wilson Mar. All rights reserved. | Privacy Policy |

Related Topics:
another page on this site Performance Testing 
another page on this site NT Perfmon / UNIX rstatd Counters 
another page on this site Mercury LoadRunner 
another page on this site Mercury Virtual Table Server (VTS) 
another page on this site Mercury WinRunner 
another page on this site Rational Robot 
another page on this site Free Training! 
another page on this site Tech Support 

How I may help

Send a message with your email client program

Your rating of this page:
Low High

Your first name:

Your family name:

Your location (city, country):

Your Email address: 

  Top of Page Go to top of page

Thank you!