Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Recording Web Applications:

Any LoadRunner script irrespective of the protocol contains three default actions

Vuser_init()

Action()

Vuser_end()

The vuser_init ()and vuser_end() representing the initialization and termination of a virtual user and
can be executed only once per virtual user. The Action() can be repeated any number of times. More
actions can be added during the recording.

The entire document describes the various methods to record a script using the WebTours
application that is installed by default with the full installation of LoadRunner. The WebTours
application runs on Xitami Web Server and the web server can be started by navigating to

Programs  HP LoadRunner  Samples  Web  Start Web Server. Please find the screenshot
attached:

Once the web server is started, an icon that looks like symbol X should be seen in the tray
icon. The WebTours application can be launched from same location or simply by launching the
browser and typing the Web Tours URL. The Web Tours URL can be retrieved by double clicking the
Xitami Server as seen in the below screenshot:

Recording options

To start recording a Web Application, the steps required are as below:

1. launch the virtual user generator and click on new


2. Choose the Web(HTTP/HTML) protocol and click on create
3. Choose the internet applications from the Application type and Microsoft Internet Explorer
from the Program to Record dropdown and type the URL of the application that you wanted
to navigate through. From the drop down, Record in Action choose the appropriate area
based on the user category (default is Action) . Click on Options to change the recording
options

4. From the new screen click on script and choose the options as seen in the screenshot
Close all AUT processes when recording stops – This option will close the browser automatically
once the recording is stopped

Generate fixed think time after end transaction – If the transactions are placed during the script
recording, after every end transaction a fixed think time would be placed into the script
automatically if this option is chosen

Generate recorded events log – this is going to create a log file which details all the events that
were recorded during the script

Generate think time greater than threshold – if the think time is greater than 3 seconds, that
value would be directly placed into the script automatically by choosing this option

Maximum number of lines in action file – The maximum lines in any action file can be up to
65000. The default value is 60000. Choose this option to change the # of lines in action file

5. Click on “Recording” and choose the recording options appropriately


The recommended settings are HTML based script and click on HTML Advanced
Choose the HTML Explicit URLs only option
The difference between the HTML and URL mode is explained in detail at the link
http://perftraineronline.wordpress.com/2012/06/14/recording-web-applications-using-
loadrunner/
6. Click on Correlation on the left menu and uncheck the option “ Enable correlation during
recording”

For the web applications it is recommended to manually correlate the scripts and for the
peoplesoft, Siebel, SAP applications it is recommended to use the auto correlation and
manual correlation together and only with these protocols, the option has to be checked
7. Click OK on the recording options screen and start recording screen. The internet browser
would be launched automatically with the URL mentioned at 3 rd step.
8. Wait until the # of events are stopped before you go the next step
9. Add a comment before performing each user action. If a separate action has to be recorded
for each user action, click on Add new action and enter the action name. This document
records the every user navigation into the same action. Once all the steps of the use case are
recorded, stop the recording.
10. Save the recorded script to your work station

Understanding the sections of the VUser script:

The above screenshot is the left pane in the VUGen, which is used to navigate to various actions of
the script. As the script is recorded with the default options, only one action is seen apart from
vuser_init and vuser_end
Recorded script in script view
Recorded script in Tree View

The bottom pane of the VUser script. The various log files of the load runner script. The details
about the same can be found at the location
http://perftraineronline.wordpress.com/2012/06/14/understanding-various-log-files-in-loadrunner/

Script Recorded:

The navigation used to record the script is as below:

1. Launch Web Tours application (http://127.0.0.1:1080/WebTours)


2. Login with the user credentials (jojo/bean)
3. Click on Flights
4. Choose the arrival city, departure city, seat type, seat preference, Arrival Date and departure
date and click on continue
5. Choose a flight from the list
6. Enter the passenger details and payment details
7. Signoff

You might also like