Print Page | Close Window

Introduction-to-Loadrunner-Part-3

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: LoadRunner @ OneStopTesting
Forum Discription: LoadRunner is a performance and load testing product by HP / Mercury Interactive for examining system behavior and performance, while generating actual load.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=7240
Printed Date: 30Nov2024 at 10:42pm


Topic: Introduction-to-Loadrunner-Part-3
Posted By: Mithi25
Subject: Introduction-to-Loadrunner-Part-3
Date Posted: 26Oct2009 at 11:43pm

Objectives of this Article

  •   Introduction to Virtual User Technology
  •   Record scripts
  •   General options
  •   Recording options
  •   Runtime options
  •   Replay recorded scripts
Virtual User Technology
  •   Simulates a real user
  •   Requires less resources – machines and people
  •   Greater control over test execution
  •   Can synchronize actions performed by users
  •   Collect and analyze results in a better way
  •   VUsers can communicate directly with a server by executing calls to the
  •   server API-without relying on client software
VuGen

 

  •   Capture a business transaction by recording user actions performed
  •   Monitors the communication between the application and the server
  •   Generates the required function calls
  •   Inserts the generated function calls into a Vuser script
Recording a Script

{mosgoogle}

New VUser

  1.   Click on New Vuser
  2.   Select the new Virtual User from the list of protocols
  3.   Click OK
  4.   The required header files are automatically included in the script


Vuser Script Sections

 

Script Section
Used when recording...
Is executed when...
vuser_init
a login to a server
the Vuser is initialized (loaded)
Actions
client activity
the Vuser is in "Running" status
vuser_end
a logoff procedure
the Vuser finishes or is stopped

Recording Options

Recording Mode
This allows us to specify the information to be recorded and which functions to be used when generating a script

  •   HTML Mode
  •   URL Mode
HTML Mode

The HTML mode is based on user actions, and the scripts contain functions that correspond directly to the action taken.

Example:
...
web_link(“Enterprise Systems Performance",
"Text=Enterprise Systems Performance ",
"Snapshot=t4.inf",
LAST); 

URL Mode

The URL mode is based on HTTP requests sent to the server as a result of user actions.
Example:
. . .
web_url(“Enterprise Systems Performance",
"URL=http://www.in.ibm.com/esp.html",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http:// www.in.ibm.com/atc?. . . ,
"Snapshot=t4.inf",
"Mode=URL",
LAST);

Deciding on Recording Mode

HTML Mode 

URL Mode 

 Intuitive and easy to understand

Not as intuitive as the HTML scripts 

Scalable 

More scalable and effective for creating a load test 

   
Deciding on Modes
  •   For browser applications, use HTML mode.
  •   For non-browser applications, use URL mode.
Note: The option of mixing recording modes is available for very advanced users for performance tuning

 

Other Recording Options 

Selecting the Browser

 

Proxy Settings

 

Advanced Settings

 
Recording Scripts

 

  1.   Click on Red Record Button  
  2. Record dialog box pops up.

  1.   Click black Stop button to end recording
  2.   Save the script.
Note:
  Record user transaction is the appropriate sections
  Do not name a script init, run, or end, as these names are used by VuGen.

-------------
http://www.quick2sms.com - Send Unlimited FREE SMS to Any Mobile Anywhere in INDIA,
Click Here



Print Page | Close Window