Vous êtes sur la page 1sur 26

LoadRunner

• To load your application, LoadRunner


emulates an environment where multiple
users work concurrently.
• While the application is under load,
LoadRunner accurately measures,
monitors, and analyzes a system’s
performance and functionality.

Krish Hegde 1
Architecture Overview

Krish Hegde 2
Client-Server Paradigm
• Client Server applications deliver higher
functionalities and power, but also
introduce new risks:
– Higher Performance risks due to large
number of users accessing the system
simultaneously.
– Impossible to manually simulate load on
application

Krish Hegde 3
Manual Load Testing
• It is expensive, requiring large amounts of
both personnel and machinery
• It is complicated, especially coordinating
and synchronizing multiple testers
• It involves a high degree of organization,
especially to record and analyze results
meaningfully
• The repeatability of the manual tests is
limited
Krish Hegde 4
Load Testing with LoadRunner
• LoadRunner reduces the personnel
requirements by replacing human users with
virtual users or Vusers. These Vusers emulate
the behavior of real users—operating real
applications.
• Because numerous Vusers can run on a single
computer, LoadRunner reduces the hardware
requirements.
• The LoadRunner Controller allows you to easily
and effectively control all the Vusers—from a
single point of control.
Krish Hegde 5
Load Testing with LoadRunner
• LoadRunner monitors the application
performance online, enabling you to fine-
tune your system during test execution.
• LoadRunner automatically records the
performance of the application during a
test. You can choose from a wide variety
of graphs and reports to view the
performance data.
Krish Hegde 6
Load Testing with LoadRunner
• LoadRunner checks where performance delays
occur: network or client delays, CPU
performance, I/O delays, database locking, or
other issues at the database server.
• LoadRunner monitors the network and server
resources to help you improve performance.
• Because LoadRunner tests are fully automated,
you can easily repeat them as often as you
need.

Krish Hegde 7
Load & Stress Testing
• Objectives:
– Check Scalability
– Check Performance ie Transactions/minute,
– Draw Memory Profile
– Check CPU performance
– Check Network performance

Krish Hegde 8
Load & Stress Testing
• Load & Stress testing are two different but
related forms of testing.
• Stress Testing: Involves testing a system under
extreme cases, which may rarely occur under
normal conditions.
• Such testing can involve scenarios like:
– Running many users concurrently for short times
– Short transactions repeated quickly and
extraordinarily long transactions.

Krish Hegde 9
Load & Stress Testing
• Load testing places a more realistic load on the
system
• Load testing starts by placing a low demand on
the system and gradually increasing the load.
• This process allows measuring the performance
of the system under loads, as well as
determining the maximum load, under which the
AUT can respond acceptably.

Krish Hegde 10
Load & Stress Testing
• Load and stress testing are clearly two
inter related processes, generally
performed concurrently.
• They do not conduct functional tests.
• In order to perform performance testing, it
must be assumed that a reasonably stable
and functional system is in use, otherwise
results are meaningless.
Krish Hegde 11
Load & Stress Testing
• It is essential to know that the bottleneck
of a system is due to the server / Client/
Database/ Network performance issues.
• Performance issues could be related to:
– Lack of sufficient Memory
– Lack of CPU performance
– poor algorithms
– Poor design.

Krish Hegde 12
LoadRunner-Scenarios
• Using LoadRunner, you divide your application
performance testing requirements into
scenarios.
• A Scenario could be running a UseCase. In ideal
condition there may be 20~50 usecases
/Scenarios in a AUT.
• A scenario defines the events that occur during
each testing session. Thus, for example, a
scenario defines and controls the number of
users to emulate, the actions that they perform,
and the machines on which they run their
emulations.
Krish Hegde 13
VUsers
• In the scenario, LoadRunner replaces human
users with virtual users or Vusers. When you run
a scenario, Vusers emulate the actions of
human users— submitting input to the server.
• While a workstation accommodates only a
single human user, many Vusers can run
concurrently on a single workstation. In fact, a
scenario can contain tens, hundreds, or even
thousands of Vusers.

Krish Hegde 14
Vuser Scripts
• The actions that a Vuser performs during
the scenario are described in a Vuser
script. When you run a scenario, each
Vuser executes a Vuser script.
• The Vuser scripts include functions that
measure and record the performance of
the server during the scenario.

Krish Hegde 15
Transactions
• To measure the performance of the
server, you define transactions. A
transaction represents an action or a set
of actions that you are interested in
measuring.
• You define transactions within your Vuser
script by enclosing the appropriate
sections of the script with start and end
transaction statements.

Krish Hegde 16
Rendezvous points
• You insert rendezvous points into Vuser scripts
to emulate heavy user load on the server.
Rendezvous points 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.
• For example, to emulate peak load on the bank
server, you can insert a rendezvous point
instructing 100 Vusers to deposit cash into their
accounts at the same time.
Krish Hegde 17
Controller
• You use the LoadRunner Controller to manage
and maintain your scenarios.
• Using the Controller, you control all the Vusers
in a scenario from a single workstation.
• When you execute a scenario, the LoadRunner
Controller distributes each Vuser in the scenario
to a host. The host is the machine that executes
the Vuser script, enabling the Vuser to emulate
the actions of a human user.
• Ideally, the LoadRunner Controller must be
installed in a separate system outside the test
bed.
Krish Hegde 18
LoadRunner Vuser Technology

Krish Hegde 19
LoadRunner Vuser Technology
• LoadRunner has various types of Vusers. Each type is designed to
handle different aspects of today’s system architectures.
Vuser Types:
• E-business Vuser : For Web (HTTP,HTML), Corba-Java, General-
Java, LDAP, POP3, COM/DCOM, Jolt, LDAP, POP3 and FTP
protocols.
• Middleware Vuser : For Jolt, and Tuxedo(6.0, 6.3) protocols.
• ERP Vuser : For SAP, Baan, Oracle NCA, Peoplesoft (Tuxedo or
Web) and Siebel protocols.
• Client/Server Vuser : For Informix, MSSQLServer, ODBC, Oracle
(2-tier), Sybase Ctlib, Sybase Dblib, and Windows Sockets
protocols.
• Legacy Vuser : For Terminal Emulation (RTE).
• General Vuser : For C template, Java template, and Windows
Sockets type scripts.
Krish Hegde 20
GUI Vuser

Krish Hegde 21
GUI Vuser
• A GUI Vuser running on a Windows host
uses WinRunner to execute its Vuser
script. To enable the LoadRunner
Controller to open WinRunner, you must
specify the location of the appropriate
WinRunner configuration file (wrun.ini).

Krish Hegde 22
DB Vuser

Krish Hegde 23
RTE Vuser

Krish Hegde 24
LoadRunner Testing Process

Krish Hegde 25
• Questions?

Krish Hegde 26

Vous aimerez peut-être aussi