75
An Icon for Software Quality & Standards INDIAN INSTITUTE OF SOFTWARE TESTING 1 Load Runner (HP Performance Test Tool)

Load Runner

Embed Size (px)

DESCRIPTION

about software testing.. load runner tool

Citation preview

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

1

Load Runner (HP Performance Test Tool)

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Topics to be Covered• Why Performance ?• Definitions: Performance

Testing• Performance Testing Tools• LoadRunner Components• What is load testing process? • Getting Familiar with HP Tours• Application Requirements

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Performance Testing Tools

Segue Silk Performer

Rational Team Test

Mercury Load Runner

Empirix e-Load/RSW)

Soft Light Site Tools Loader

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

What is the load testing process?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Getting Familiar with HP Tours

Opening HP Tours

Make sure that the sample Web server is running.

Open the HP Tours application. Log into HP Tours. Reserve a flight. End your HP Tours session.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Application Requirements

HP Tours must successfully handle 10 concurrent travel agents.

HP Tours must be able to process 10 simultaneous flight bookings with response time not exceeding 90 seconds.

HP Tours must be able to handle 10 travel agents running simultaneous itinerary checks with response time not exceeding 120 seconds.

HP Tours must be able to handle 10 agents signing in and signing out of the system with response time not exceeding 10 seconds.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Introducing the Virtual User Generator (VuGen)

Script steps

Tool bar

Snap Shots

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I start recording user activities?

1.1. Open Virtual User Generator.Open Virtual User Generator.

2.2. Create a single protocol Web script.Create a single protocol Web script.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I record a business process to create a script?

First Step: Set Recording OptionsFirst Step: Set Recording Options

Recording LevelsRecording Levels

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I record a business process to create a script?

Contd …

1.1. Start recording on the HP Tours Web site. Start recording on the HP Tours Web site.

2.2. Login to the HP Tours Web site. Login to the HP Tours Web site.

3.3. Enter flight details. Enter flight details.

4.4. Select a flight. Select a flight.

5.5. Check the itinerary. Check the itinerary.

6.6. Click sign off in the left pane. Click sign off in the left pane.

7.7. Click Stop on the floating toolbar to stop the Click Stop on the floating toolbar to stop the recording .recording .

8.8. Choose File > Save or click the Save button. Choose File > Save or click the Save button. Type basic_tutorial in the File name box and Type basic_tutorial in the File name box and click Save. click Save.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I view the script?

Tree ViewTree View Script ViewScript View

Tree ViewTree ViewScript ViewScript View

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Playing Back Your Script

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I set the run-time behavior?

Choose VUser > Runtime-Settings – Run LogicChoose VUser > Runtime-Settings – Run Logic

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings - PacingChoose VUser > Runtime-Settings - Pacing

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings - LogChoose VUser > Runtime-Settings - Log

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings – Think TimeChoose VUser > Runtime-Settings – Think Time

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings – MiscellaneousChoose VUser > Runtime-Settings – Miscellaneous

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings – Speed Choose VUser > Runtime-Settings – Speed SimulationSimulation

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..Choose VUser > Runtime-Settings – Browser Choose VUser > Runtime-Settings – Browser

EmulationEmulation

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..

Choose VUser > Runtime-Settings – ProxyChoose VUser > Runtime-Settings – Proxy

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..Choose VUser > Runtime-Settings – PreferencesChoose VUser > Runtime-Settings – Preferences

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I set the run-time behavior?

Contd..Choose VUser > Runtime-Settings – Content CheckChoose VUser > Runtime-Settings – Content Check

Create New Application and New RuleCreate New Application and New Rule

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I watch my script running in real time?

Choose Tools > General Options and select the Display tab.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Where can I view a summary of the playback?

Go to Execution Log in VUGen screen

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Solving Common Playback Problems

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Topics to be Covered• What is Correlation?• Preparing Mercury Tours for Playback

Errors• How do I work with unique server

values?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Preparing Mercury Tours for Playback Errors

1. Open HP Tours.Choose Start > Programs > HP LoadRunner > Samples > Web > HP Web Tours Application.

2. 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 HP 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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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 > HP LoadRunner > Samples > Web > HP Web Tours Application to open HP 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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Preparing a Script for Load Testing

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE 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?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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 Access2. Login3. Flight Button click4. FindFlight_Continue_Button5. SelectFlight_Continue_Button6. Purchase Flight Button7. Check Itinerary8. Log Off

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I emulate multiple users?

Parameterization – Step1

Right Click the textRight Click the text

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I emulate multiple users? Contd..

Parameterization – Step2 – Select or Create Parameter

Type the Type the parameter parameter

namename

Click the buttonClick the button

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I emulate multiple users? Contd..

Parameterization – Step3 – Parameter Properties

Select Parameter TypeSelect Parameter Type

Create FileCreate File

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I emulate multiple users? Contd..

Parameterization – Step4 – Define Parameter and Close

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I emulate multiple users? Contd..

Parameterization – View Parameter

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow 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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I verify Web page content?

Contd..

Text Checkpoint – Go to Tree View

Right ClickRight Click

Click HereClick Here

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I verify Web page content?

Contd..Image Checkpoint – Go to Tree View

Right ClickRight Click

Click HereClick Here

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

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.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Creating a Load Testing Scenario

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Topics to be Covered• Introducing the LoadRunner

Controller• What mixture of users should be part

of the load test?• How do I generate a heavy load?• How do I emulate real load behavior?• How do I emulate different types of

users?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGIntroducing the LoadRunner

ControllerScenario Objective

The objective is to create a scenario that emulates the behavior of ten travel agents simultaneously logging on, searching flights, purchasing flights, checking itineraries, and logging off the system.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGIntroducing the LoadRunner Controller Contd..

Starting the Controller

Open HP LoadRunner - Choose Start > Programs > HP LoadRunner > LoadRunner.

Open the Controller. - In the Load Testing tab, click Run Load Tests. The LoadRunner Controller opens.

Select a Scenario Type. – Manual or Goal Oriented Scenario

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

What mixture of users should be part of the load test?

Eight users would be added simultaneously and two afterwards

1. Add a script to the load test.2. Begin designing the load test scenario.3. Change the Group Name and number of

Vusers.1. Click the Details button.2. In the Vuser Quantity box, enter 8.3. Click on OK.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I generate a heavy load?

1. Add a load generator.1. Click the Generators button and add the

generator which can be used to apply load.

2. Test the load generator connection.1. Select the localhost load generator and click

Connect.2. Click Close.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I emulate real load

behavior?Edit Schedule

1. Change the Scenario Schedule default settings.

2. Specify a gradual start. (Ramp Up)3. Initialize the Vusers. (To minimize CPU

consumption)4. Schedule the duration.5. Schedule a gradual closure.( Ramp Down)6. View Graphical representation of the

scheduler. Click OK

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I emulate different types

of users?Set Runtime Settings

1. Open the Run-Time settings.2. Enable think time.3. Enable logging.4. Browser Emulation5. Content Check6. Pacing

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Running The Load Test

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Topics to be Covered• The Controller Run View at a Glance• How do I run a load test scenario?• How do I monitor the application

under load?• How can I increase the load during

the test?• Did the application perform well

under load?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGThe Controller Run View at a

Glance

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I run a load test scenario?

1. Open the Controller Run view.

2. Start the scenario.1. Set the path of the result

directory2. Click on OK.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How do I monitor the application under load?

1. Examine the Performance graphs.

1. Running Vusers - Whole Scenario2. Transaction Response Time - Whole

Scenario3. Hits per Second - Whole Scenario

2. Highlight individual measurements.

1. Double click the graph to highlight the same

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How can I increase the load during the test?

1. Click the Vusers button. The Vusers window opens.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Did the application perform well under load?

1. Visualize the Transaction Response Time and determine whether the transaction was within acceptable limit for the customer.

2. If the transaction response time degrades, look for bottlenecks.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Analyzing Scenario

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Topics to be Covered• How does an analysis session work?• How do I start my analysis session?• The Analysis Window at a Glance• Did I reach my goals?• Did my server perform well?• How can I pinpoint the source of the

problem?• How can I publish my findings?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow does an analysis session

work?1. Were the test expectations met? What

was the transaction response time on the user’s end under load? What was the average transaction response time of the transactions?

2. What parts of the system could have contributed to the decline in performance? What was the response time of the network and servers?

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTINGHow do I start my analysis

session?1. Open HP LoadRunner.

1. Choose Start > Programs > HP LoadRunner > LoadRunner.

2. Open LoadRunner Analysis.1. In the Load Testing tab, click Analyze Load

Tests.

3. Open the analysis session file.1. File > Open.2. From the <LoadRunner Installation>\Tutorial

folder, select analysis_session and click Open.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

The Analysis Window at a Glance

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Did I reach my goals?

• Check Transaction Summary Area

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Did I reach my goals? Contd..

• Check Transaction Summary Area

Open the Average Transaction Response Time graph.

Click the check_itinerary transaction, in the Transaction Name column.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Did my server perform well?• Study the behavior of the Vusers.

» Click Running Vusers in the graph tree.

Filter the graph so that you see only the time slice when all the Vusers ran simultaneously.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

Did my server perform well? Contd..

• Correlate the Running Vusers and Average Transaction Response Time graphs to compare their data.

– Right-click the Running Vusers graph and choose Merge Graphs.– From the Select graph to merge with list, choose Average Transaction– Response Time.– In the Select type of merge area, select Correlate, and click OK.

Analyze the correlated graph

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How can I pinpoint the source of the problem?

• From the graph tree, select the Average Transaction Response Time graph.

Filter the Average Transaction Response Time graph to display only the check_itinerary transaction.

Right-click the graph, and choose Set Filter/Group by. In the Transaction Name value box, select

check_itinerary. Click OK.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How can I pinpoint the source of the problem? Contd..

• Auto-correlate the graph.– Right-click the graph, and choose Auto Correlate. Click OK.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How can I pinpoint the source of the problem? Contd..

• Rename the graph.– Choose Rename Graph.– Type Auto Correlated - check_itinerary and press ENTER

• Analyze the auto-correlated graph.– Look at the legend below the graph.

In the Measurement column you can see that the Private Bytes and Pool Nonpaged Bytes, both of which are memory-related measurements, have a Correlation Match of over 70% with the check_itinerary transaction.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING

How can I publish my findings?

HTML Reports1. From the Reports menu,

choose HTML Report...2. Select a file name for your

report, and the path where you want to save it. Click Save.

An Icon for Software Quality & Standards

INDIAN INSTITUTE OF SOFTWARE TESTING