Recording Web Applications
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
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
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
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: