Users looking for information on performance
testing on web based applications using
This presentation provides:
For beginners -It gives an idea about performance testing
concepts and an overview of LoadRunner (LoadRunner
Components, creating scripts, analysis of results) .
Others- Those who have started using LoadRunner can use
this presentation which will help them to identify the
common type of errors they might encounter especially
with correlation and parameterization. This presentation
provides effective ways to solve these errors. Please refer
the problems and solution section document for more
details (slide number 33).
What is Performance testing ?
Why you need Performance testing ?
What are the different types of Performance testing?
Introduction to LoadRunner and its Components
Terms and Terminologies used
Most commonly used L.R functions
Getting started with Record and Playback(VuGen)
Running the Vuser script
Creating the load test and running the scenario.
Analysis of the test results.
Q & A session.
A quick walkthrough on some of the concepts …
Testing conducted to evaluate the compliance of a system
or component with specified performance requirements.
In other words, testing conducted to measure several
system characteristics such as processing speed, response
time, resource consumption, throughput, system
threshold limits and efficiency.
Performance Testing determines…
Why You need Performance testing
Classic performance testing - which measures response times and
Load testing - which measures the system's ability to handle varied
workloads .Load test is conducted with anticipated loads.
Stress testing - which looks for errors produced by low resources or
competition for resources
Volume testing - which subjects the software to larger and larger
amounts of data to determine its point of failure
Fail-over testing - verifies the redundancy mechanism when the system
is under load. In other words, Testing where a system is made to fail
under load, to verify whether standby systems are correctly used to
maintain service .
Endurance/Soak testing- Testing conducted over an extended period of
time to reveal resource usage problems such as memory leaks .
Different types of performance testing that can be done
LoadRunner is the industry-standard load testing
solution for predicting the behavior and performance
of an application.
LoadRunner- An introduction
With LoadRunner we can :
a) Obtain an accurate picture of end-to-end system
b) Verify that new or upgraded applications meet specified
c) Identify and eliminate performance bottlenecks during the
Virtual User Generator - Virtual User Generator (VuGen)
component is used to record a script. It enables you to develop
Vuser scripts for a variety of application types and communication
Controller - The Controller organizes, drives, manages, and
monitors the load test. It also provides a suite of integrated
performance monitors that can be used to monitor each component
of a multi-tier system during load test .
Analysis – It helps us to view, divide, and compare the
performance results of the data collected during the performance
testing (Create result reports and graphs using Crystal
Reports, MS Word or an HTML webpage browser).
Planning the test- Develop a clearly defined test plan to ensure the
test scenarios developed will accomplish load-testing objectives.
Creating Vusers - Create Vuser scripts using VuGen that contain tasks
performed by each Vuser, tasks performed by Vusers as a whole, and
tasks measured as transactions.
Creating the scenario. A scenario describes the events that occur
during a testing session. It includes a list of machines, scripts, and
Vusers that run during the scenario. We create scenarios using
LoadRunner Controller. We can create manual scenarios as well as
goal-oriented scenarios. In manual scenarios, we define the number of
Vusers, the load generator machines, and percentage of Vusers to be
assigned to each script. For web tests, we may create a goal-oriented
scenario where we define the goal that our test has to achieve.
LoadRunner automatically builds a scenario for us.
Running the scenario -We emulate load on the server by instructing
multiple Vusers to perform tasks simultaneously. Before the testing,
we set the scenario configuration and scheduling (via Controller). We
can run the entire scenario, Vuser groups, or individual Vusers.
Monitoring the scenario - Scenario execution is monitored using
the LoadRunner online runtime, transaction, system resource, Web
resource, Web server resource, Web application server resource,
database server resource, network delay, streaming media resource,
firewall server resource, ERP server resource, and Java
Analyzing test results - LoadRunner’s graphs and reports are
used to analyze the application’s performance.
Correlation – Correlation is used to get data which are unique for each
run of the script . (Correlation concept is explained in detail in the
document attached in the slide number 31).correlation example
Parameterization - Parameterization is generally done to test with
multiple set of data or records . A parameter replaces a literal value in
the script . (Please refer document attached in the slide number 31.)
Rendezvous point - Rendezvous point specifies Vusers to begin a
transaction at precisely the same time. (I.e., It instruct Vusers to wait
during test execution for multiple Vusers to arrive at a certain point, in
order that they may simultaneously perform a task.
Scenario - A scenario defines the events that occur during each testing
session. For ex: a scenario defines and controls the number of users to
emulate, the actions to be performed, and the machines on which the
virtual users run their emulations.
Terms and Terminologies
Throughput – It is a measure of how many
requests/second, pages/second, or hits/second the application can
Response time - Response time is often defined as the interval
from when a user initiates a request to the instant at which the first
part of the response is received at by the application
Vuser- Vusers emulate the actions of human users working with
Vuser script - The actions that a Vuser performs during the
scenario are described in a Vuser script.
Transaction – A transaction represents end-user business processes
that you are interested in measuring
vuser_init - It record a log in to the server (vuser initialize loaded).
Action - Action is repeated for multiple iterations. It records the
client activity .
vuser_end - It records log off into the server.
Three Sections in a Vuser script
Note: Refer slide number : 23 to see these three sections in VuGen.
An example …
How to create script using VuGen
1. Click on Start Programs Mercury LoadRunner
Applications Virtual User Generator
The steps for creating scripts
2. Click on the Load Testing Tab
3. Click on Create/Edit Script
1. HTML-based script – It generates a separate step for each user action but does not
record all resources during the recording session, but downloads them during the
2. URL-based script – Records all requests and resources from the server.
7. Select HTML-based script and click OK
9. Enter the URL of the application to test . Now select Action from the
dropdown menu “Record into Action”. Click Ok.
number - 13
We assume that you have entered the URL as seen in the above
figure. Now the page opens, Once you have entered the mailbox
then click sign off.
Now the recording starts.<<back
10. Click on the stop button once the identified scenario is recorded .
Now we can proceed to Run-Time settings and make the
necessary changes before we run the script.
The number of iterations to be performed for a particular run can be
specified here .
The flow in which iteration should be performed can be set here.
New iterations can be set to start from here. The options available are:
o As soon as the previous iteration ends.
o With a fixed delay after the previous iteration ends.
o At fixed intervals of time.
Think time represents the amount of time the user takes to perform
between actions. Think time is automatically added while recording the
script. Runtime settings options for think time is used to create a more
realistic scenario for load testing the application.
11. Click on the Run button to run the script. Please refer the link
given to view the complete script (example)
Once you have run the script, we can view the results from
View->Test Results in the VuGen.
The results summary page shows status of the script run. Here
the iteration # indicates the number of iterations run with
respect to the changes made in run time settings.
Some useful L.R functions
Web_url() - for a URL in the Address field on the internet browser.
Web_submit_form() - for pressing "submit" of a GET or PUT form
obtained in the context of a previous operation — perhaps recorded by
VuGen in HTML-based recording mode.
Web_link() - for clicking a text link.
Web_submit_data() - for pressing "submit" of a GET or PUT form without
the context of a previous operation — perhaps recorded by VuGen in URL-
based recording mode or in HTML-based recording mode with the "A
script containing explicit URLs only" option checked.
Web_reg_find() - verification function.
Web_global_verification() – It searches for a text string in all
Note: Refer to the script attached to understand these functions in
detail (slide 31).
As discussed earlier, parameterization is generally done to test
with multiple set of data or records . A parameter replaces a literal
value in the script. For example, consider the K-mart application or
say login scenario in rediffmail/yahoo .How will we check for
different user login. Here we need to parameterize the username
and password. The attached document in the next slide shows
When to Parameterize and how ?
What is correlation and how to correlate ?
Problems & solutions section
(refer the document attached).
explained earlier) which
illustrates the use of
parameterization in real time
is given in the document
We go for correlation when we want to get data which are unique for each
run of the script. For example, in most of the web applications, the server
generates a unique session id to the Vuser, when we try to play back the
script, it fails because the session is duplicated (let us take the scenario of an
existing user logging into the rediff mail or yahoo mail ). Inorder to
overcome this we need to correlate .As of here we need to correlate the ―
sessionid‖. The below example demonstrates this.
New Scenario window opens
Designing a scenario
1.Click on Start Programs Mercury LoadRunner Applications
Manual scenarios can distribute the total number of Vusers among
scripts based on the analyst-specified percentage (evenly among load
Goal Oriented scenarios are automatically created based on a
specified transaction response time or number of
Goal Oriented scenarios
Scenario Type :
Note : The selected script should be ‘checked’ under Scenario Groups Group
2. Click on Manual Scenario option button and under available script
choose the script and click OK .
3. Click on Generators button
The below screen will open.
4. Click on Connect button and wait until the status changes to Ready from Down.
5. In the Schedule scenario window, change the quantity of Vusers
as you want (default is 10). Now click on Start scenario button.
Start scenario button
The below figure shows the status of Vusers which
you have run.
Understanding the schedule scenario
From the Schedule Scenario window in the run tab, click on the
edit schedule button.
Ramp Up Tab: Determines how to start the scenario.
(i.e., Start Vusers simultaneously by default) or specify the number of
Vusers to start at intervals second option) )
Duration Tab: Sets the duration of the scenario
(i.e., set the duration for the Vusers to run).
Ramp Down Tab: Determines how to stop the scenario
(i.e., specifies how to stop Vusers).
From Controller menu, click on Results -> Analyze Results
Analysis Summary Page
The Analysis summary page generates information on the number of Vusers,
Hits per second, Throughput, Average Transaction Response Time, etc . We can
send these test results for analysis and using performance monitors to identify
the bottlenecks in the application. Performance monitors are available for the
network, application servers, Web servers and database servers.