You are on page 1of 48

Load Runner

Mercury Performance
Test Tool
Topics to be Covered
 Why Performance ?
 Definitions: Performance Testing
 Benchmark Design
 Performance Testing Tools
 LoadRunner Components
 What is load testing process?
 Getting Familiar with Mercury
Tours
 Application Requirements
Why Performance…?
 Does the application respond quickly
enough for the intended users?
 Will the application handle the expected
user load and beyond?
 Will the application handle the number of
transactions required by the business?
 Is the application stable under expected
and unexpected user loads?
 Are you sure that users will have a
positive experience on go-live day?
Define Stress/Load/Performance
Testing
 Stress Testing: Stress Testing is done in order to check
when the application fails by reducing the system resources
such as RAM, HDD etc. and keeping the number of users as
constant.
 Load Testing: Load Testing is done in order to check when
the application fails by increasing the number of users and
keeping the system resources as constant.
 Performance Testing: The term Performance can mean
measuring response time, throughput, resource utilization,
or some other system characteristic( or group of them), by
varying the number of users.
Benchmark Design
 The Benchmark is the representative workload
used during the performance test run. It should
be representative of the likely real-world
operating conditions.
 Benchmark is provided by the client.
 In Industry scenario the benchmark is as follows:
 No. of transactions passed per second >= 8
 Response time <= 5 sec.
Performance Testing
Tools
 Segue Silk Performer
 Rational Team Test
 Mercury Load Runner
 Empirix e-Load/RSW)
 Soft Light Site Tools Loader
LoadRunner Components
 The Virtual User Generator captures end-user
business processes and creates an automated
performance testing script, also known as a virtual
user script.
 The Controller organizes, drives, manages, and
monitors the load test.
 The Load Generators create the load by running
virtual users.
 The Analysis helps you view, dissect, and
compare the performance results.
 The Launcher provides a single point of access
for all of the LoadRunner components.
What is the load testing
process?
Getting Familiar with
Mercury Tours
Opening Mercury Tours
 Make sure that the sample Web server is
running.
 Open the Mercury Tours application.

 Log into Mercury Tours.

 Reserve a flight.

 End your Mercury Tours session.


Application
Requirements
 Mercury Tours must successfully handle 10
concurrent travel agents.
 Mercury Tours must be able to process 10
simultaneous flight bookings with
response time not exceeding 90 seconds.
 Mercury Tours must be able to handle 10
travel agents running simultaneous
itinerary checks with response time not
exceeding 120 seconds.
 Mercury Tours must be able to handle 10
agents signing in and signing out of the
Building Scripts
Topics to be Covered
 Introducing the Virtual User Generator
(VuGen)
 How do I start recording user activities?
 How do I record a business process to
create a script?
 How do I view the script?
Introducing the Virtual User
Generator (VuGen)
How do I start recording
user activities?
1. Open Virtual User Generator.
2. Create a single protocol Web script.
How do I record a business
process to create a script?
First Step: Set Recording Options

Recording Levels
How do I record a business
process to create a script?
Contd …

1. Start recording on the Mercury Tours Web site.


2. Login to the Mercury Tours Web site.
3. Enter flight details.
4. Select a flight.
5. Check the itinerary.
6. Click sign off in the left pane.
7. Click Stop on the floating toolbar to stop the
recording .
8. Choose File > Save or click the Save button.
Type basic_tutorial in the File name box and
click Save.
How do I view the script?
 Tree View
 Script View

Tree View
Script View
Playing Back
Your Script
Topics to be Covered
 How do I set the run-time behavior?
 How do I watch my script running in real
time?
 Where can I view a summary of the
playback?
How do I set the run-time
behavior?
Choose VUser > Runtime-Settings – Run Logic
How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings - Pacing


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings - Log


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Think Time


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Miscellaneous


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Speed


Simulation
How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Browser


Emulation
How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Proxy


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Preferences


How do I set the run-time
behavior?
Contd..

Choose VUser > Runtime-Settings – Content Check

Create New Application and New Rule


How do I watch my script
running in real time?
Choose Tools > General Options and select the
Display tab.
Where can I view a
summary of the playback?
Go to Execution Log in VUGen screen
Solving Common
Playback
Problems
Topics to be Covered
 What is Correlation?
 Preparing Mercury Tours for Playback
Errors
 How do I work with unique server values?
What is Correlation?
Many applications use dynamic values that change each time
you use the application. For example, some servers assign a
unique session ID for every new session. When you try to
replay a recorded session, the application creates a new
session ID that differs from the recorded session ID.

LoadRunner addresses this issue through correlation.


Correlation saves the changing values, in our case the session
ID, to a parameter. When running the emulation, the Vuser
does not use the recorded value—instead, it uses the new
session ID, assigned to it by the server.
Preparing Mercury Tours
for Playback Errors
1. Open Mercury Tours.
Choose Start > Programs > Mercury LoadRunner >
Samples > Web > Mercury Web Tours Application.
1. Change the server options.
Click SERVER OPTIONS in the left pane. Select the Setting 3
option. Scroll down to the bottom of the page and click the
Reconfigure Server Details button. Scroll down to the bottom
of the page and click the Return to the Mercury Tours
Homepage link. This setting tells the server not to
allowduplicate session IDs.
(Note that if you have IIS installed on your machine, you will
need to modify the settings for this application. Search for the
file xitami.cfg in the xitami folder, and open it in a text editor.
Locate the line portbase=1000, and modify it to portbase=1001.
Save and exit the file.)
3. Close the browser.
4. Record the script again to create a new script with dynamic
values.
How do I work with unique
server values?
1. Record the script again.
2. Replay the script.
3. Scan the script for correlations.
4. View the correlations.
5. Correlate the Session ID.
6. Examine the syntax of the correlation statement.
7. Play the script again.
8. Fix the server configuration.
Choose Start > Programs > Mercury LoadRunner >
Samples > Web > Mercury Web Tours Application to
open Mercury tours.
Click SERVER OPTIONS in the left pane. Clear all of the
options. Scroll down to the bottom of the page and click the
Reconfigure Server Details button.
Close the browser.
Preparing a Script
for Load Testing
Topics to be Covered
 How do I measure business processes?
 How do I emulate multiple users?
 How do I verify Web page content?
 Did my test succeed?
How do I measure business processes?

Creating Transactions – Re-Record the script using


Transactions

The transactions would be created for the


following pages:
1. URL Access
2. Login
3. Flight Button click
4. FindFlight_Continue_Button
5. SelectFlight_Continue_Button
6. Purchase Flight Button
7. Check Itinerary
8. Log Off
How do I emulate multiple users?

Parameterization – Step1

Right Click the text


How do I emulate multiple users?
Contd..

Parameterization – Step2 – Select or Create Parameter

Type the
parameter
name

Click the button


How do I emulate multiple users?
Contd..

Parameterization – Step3 – Parameter Properties

Select Parameter Type

Create File
How do I emulate multiple users?
Contd..

Parameterization – Step4 – Define Parameter and Close


How do I emulate multiple users?
Contd..

Parameterization – View Parameter


How do I verify Web page
content?
Checkpoints – Two Types

 Text Checkpoint - checks that a text string


appears on a Web page.

 Image Checkpoint - checks for an image on


a Web page.
How do I verify Web page
content? Contd..

Text Checkpoint – Go to Tree View

Right Click
Click Here
How do I verify Web page
content? Contd..

Image Checkpoint – Go to Tree View

Right Click
Click Here
Did my test succeed?
Playback the Script
1. Enable image checks.
2. Run the script.
3. Locate the text check.
4. Locate the image check.

You might also like