Why should you
automate performance testing?
Automated Performance Testing is a
discipline that leverages products,
people, and processes to reduce the
risks of application, upgrade, or patch
deployment. At its core, automated performance
testing is about applying
production workloads to pre-deployment
systems while simultaneously
measuring system performance and
end-user experience. A well-constructed
performance test answers questions
such as:
➤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?
By answering these questions,
automated performance testing quantifies the
impact of a change in business terms.
This in turn makes clear the risks of
deployment. An effective automated performance
testing process helps you
to make more informed release
decisions, and prevents system downtime
and availability problems.
What are the
LoadRunner components?
LoadRunner contains the following
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.
Understanding
LoadRunner Terminology
A scenario is a file that defines the
events that occur during each testing
session, based on performance
requirements.
In the scenario, LoadRunner replaces
human users with virtual users or
Vusers.Vusers emulate the actions of
human users working with your
application. A scenario can contain
tens, hundreds, or even thousands of
Vusers.
The actions that a Vuser performs
during the scenario are described in a
Vuser script.
To measure the performance of the
server, you define transactions. A
transaction represents end-user
business processes that you are interested in
measuring.
What is the load
testing process?
Load testing typically consists of
five phases: planning, script creation,
scenario definition, scenario execution, and results
analysis.
Plan Load Test: Define your
performance testing requirements, for example,
number of concurrent users, typical
business processes and required
response times.
Create Vuser Scripts: Capture the
end-user activities into automated scripts.
Define a Scenario: Use the LoadRunner
Controller to set up the load test
environment.
Run a Scenario: Drive, manage, and
monitor the load test from the
LoadRunner Controller.
Analyze the Results: Use LoadRunner
Analysis to create graphs and reports,
and evaluate the performance
Lesson 1 • Introducing LoadRunner
14
Getting Familiar with
HP Tours
To illustrate the HP solution, this
tutorial uses sample performance
requirements for a sample application.
This application, HP Tours, is a Webbased
travel agency system. HP Tours users
connect to a Web server, search
for flights, book flights, and check
flight itineraries.
While LoadRunner supports over 40
types of applications, this tutorial
demonstrates load testing Web-based
applications. If you are load testing
applications that are not Web-based,
please contact HP for assistance.
In this section, you will become
familiar with the HP Tours application.
Opening HP Tours
You will use the HP Tours application
to experience hands-on performance
testing. Before proceeding with the
tutorial, follow these steps to familiarize
yourself with the look and feel of the
application.
1 Make sure that the
sample Web server is running.
The Web server automatically starts
after the LoadRunner installation and
reboot. If you rebooted your system
again, and the server is not running,
chooseStart > Programs
>LoadRunner> Samples > Web > Start Web
Server.
Note: If you try to start the Web
server and it is already running, an error
message appears. You can disregard the
message and continue with the
Tutorial.
2 Open the HP Tours
application.
Choose Start > Programs
>LoadRunner> Samples > Web > HP Web Tours
Application. A browser opens with the HP Tours opening
page.
Lesson 1 • Introducing LoadRunner
14
Getting Familiar with
HP Tours
To illustrate the HP solution, this
tutorial uses sample performance
requirements for a sample application.
This application, HP Tours, is a Webbased
travel agency system. HP Tours users
connect to a Web server, search
for flights, book flights, and check
flight itineraries.
While LoadRunner supports over 40 types
of applications, this tutorial
demonstrates load testing Web-based
applications. If you are load testing
applications that are not Web-based,
please contact HP for assistance.
In this section, you will become
familiar with the HP Tours application.
Opening HP Tours
You will use the HP Tours application
to experience hands-on performance
testing. Before proceeding with the
tutorial, follow these steps to familiarize
yourself with the look and feel of the
application.
1 Make sure that the
sample Web server is running.
The Web server automatically starts
after the LoadRunner installation and
reboot. If you rebooted your system
again, and the server is not running,
chooseStart > Programs
>LoadRunner> Samples > Web > Start Web
Server.
Note: If you try to start the Web
server and it is already running, an error
message appears. You can disregard the
message and continue with the
Tutorial.
2 Open the HP Tours
application.
Choose Start > Programs
>LoadRunner> Samples > Web > HP Web Tours
Application. A browser opens with the HP Tours opening
page.
3 Log into HP Tours.
Type in the following information:
User name: jojo
Password: bean
Click login in the left pane. HP Tours
welcomes you to the application.
4 Reserve a flight.
Click Flights in the left pane. The
Find Flight page opens. Change the Arrival
city to Los Angeles. Click Continue.
5 End your HP Tours
session.
Click Sign Off in the left pane to log
off.
Application
Requirements
Now that you are familiar with HP
Tours, imagine that you are the
performance engineer responsible for
signing off that the application meets
the needs of your business. Your
project manager has given you 4 criteria for
release:
1 HP Tours must
successfully handle 10 concurrent travel agents.
2 HP Tours must be able
to process 10 simultaneous flight bookings with
response time not exceeding 90
seconds.
3 HP Tours must be able
to handle 10 travel agents running simultaneous
itinerary checks with response time
not exceeding 120 seconds.
4 HP Tours must be able
to handle 10 agents signing in and signing out of the
system with response time not
exceeding 10 seconds.
The tutorial will walk you through the
process of building load tests that
validate each business requirement, so
that you can attach a pass or fail
before release.
No comments:
Post a Comment