LoadRunner in a Nutshell

Preview:

Citation preview

LoadRunner

…in a nutshell

Understand terminologyUnderstand terminology

Define:Define:ScenarioScenario

Number of usersNumber of users

EventsEvents

Load scalingLoad scaling

Define:Define:VusersVusers

is short for…is short for…

Virtual userVirtual user

emulate actionsemulate actions

Defn:Defn: Vuser ScriptsVuser Scripts

actionsactions

a collections of actions…a collections of actions…

business processbusiness process

can be recorded or…can be recorded or…

manually generatedmanually generated

In ANSI CIn ANSI C+ custom LR API+ custom LR API

Define:Define: Transactions:Transactions:

not what you thinknot what you think

Standard Definition:Standard Definition:

Request Request Response Response

Request Request Response Response

Request Request Response Response

Request Request Response Response

Trxns

A defined set of actionsA defined set of actions

You determine transaction startYou determine transaction start

end of transactionend of transaction

……Based on your processBased on your process

Defn:Defn: ControllerController

controls the scenarioscontrols the scenarios

provides real-timeprovides real-time monitoringmonitoring

logginglogging

Defn:Defn: Load GeneratorLoad Generator::

executes the scenarioexecutes the scenario

Define:Define: Performance Analysis Performance Analysis

view resultsview results

raw formraw form

create custom reportscreate custom reports

make graphs & chartsmake graphs & charts

Define:Define: Rendezvous Points: Rendezvous Points:

prepare vusersprepare vusers

wait for a certain event…wait for a certain event…

……then load simultaneouslythen load simultaneously

The Load Runner Suite:The Load Runner Suite:

5 key components:5 key components:

1.vGen Editor1.vGen Editor

2. Controller2. Controller

3. Remote Agent Dispatcher3. Remote Agent Dispatcher

4. Agent4. Agent

4. Analyzer4. Analyzer

View @ 40,000 Ft.View @ 40,000 Ft.

Run & Create a LoadRunnerRun & Create a LoadRunner test… test…

8 Simple Steps8 Simple Steps

1. Plan the business action1. Plan the business action

2. Record or write script2. Record or write script

3. Setup a scenario3. Setup a scenario

4. Run test scenario4. Run test scenario

5. Monitor progress5. Monitor progress

6. Load results in Analyzer6. Load results in Analyzer

7. Draw relationships7. Draw relationships

8. Complete report8. Complete report

About VGenAbout VGen

A detailed view:A detailed view:

Script ViewScript View

Tree viewTree view

VUser 3 key script VUser 3 key script customization features:customization features:

1. Parameterization:1. Parameterization:

Allows dynamic input dataAllows dynamic input data

So submit a unique value @So submit a unique value @

……every iteration or…every iteration or…

distribute values distribute values across scriptsacross scripts

Example of parameterizingExample of parameterizing

Read data from tableRead data from table

Read input data Read input data from data poolfrom data pool

capitalize on custom formatscapitalize on custom formats

2. Correlation:2. Correlation:

Anticipate and handle Anticipate and handle dynamic datadynamic data

The problem with recording:The problem with recording:

……it records server responsesit records server responses

……but on replay…but on replay…

……it expects the exact it expects the exact same values from the serversame values from the server

Example: Example: Session IDsSession IDs

3. Transactions:3. Transactions:

Select when the Select when the transaction starts…transaction starts…

……and when it endsand when it ends

Track the performance in that Track the performance in that set of events (transactions)set of events (transactions)

Transactions in tree form:Transactions in tree form:

……and in code form:and in code form:

Start transaction and…

end transaction

VUserVUser Script Actions:Script Actions:

What are Actions?What are Actions?

modules / supersetsmodules / supersets

ModulesModules

TransactionsTransactions

Actions Actions

1. vuser_init1. vuser_init

Initializing functionsInitializing functions

Preliminary actionsPreliminary actions

Login screensLogin screens

2. vuser_Action2. vuser_Action

The “meat”The “meat”

main( ) functionmain( ) function

3. vuser_end3. vuser_end

cleanup modulecleanup module

Add or modify your actions

Checking TransactionsChecking Transactions

Inspecting RequestsInspecting Requests

And ResponsesAnd Responses

Client RequestsClient Requests

Server ResponseServer Response

Create ScenariosCreate Scenarios

Elements of Scenario:Elements of Scenario:

1)1) Amount of vUsers Amount of vUsers

2)2) Duration Duration

3)3) Machines Machines

4)4) Load action Load action

Duration + Load actionDuration + Load action

= scenario pattern= scenario pattern

Builder

Setup Users

The AnalyzerThe Analyzer

Default metrics groups:Default metrics groups:

1)1) Web Transactions Web Transactions

2)2) Web Page Diagnostics Web Page Diagnostics

3)3) Web Resources Web Resources

4)4) Web Page Diagnostics Web Page Diagnostics

5)5) System Resources System Resources

DatabaseDatabase ArchitecturesArchitectures

trickier

Supports most DBs:Supports most DBs:

SQL ServerSQL Server Sybase Sybase DB2 DB2 Oracle Oracle

……but not all versionsbut not all versions

Is database the root cause?Is database the root cause?

Capture a lot of counter dataCapture a lot of counter data

What does the data mean?What does the data mean?

Use the auto correlationUse the auto correlation

Find direct correlationsFind direct correlations

Find inverse correlationsFind inverse correlations

Pinpoint trendsPinpoint trends

SummarySummary

VGen Controller Analyzer

Understand what your testingUnderstand what your testing

Use the 8 StepsUse the 8 Steps

ParameterizeParameterize, , correlatecorrelate & &define define transactionstransactions when when

necessarynecessary

endend

Recommended