+ All Categories
Home > Documents > Performance Testing PPT

Performance Testing PPT

Date post: 14-Nov-2014
Category:
Upload: api-3817447
View: 102 times
Download: 0 times
Share this document with a friend
35
Envision , Evolve, Unleash Performance Testing - LR Venu Gopal Reddy.S
Transcript

Envision , Evolve, Unleash

Performance Testing - LR

Venu Gopal Reddy.S

04/08/23 2

Contents

• Why Load Test Your Web Application ?• Functional vs. Load Web Testing• Web-Based, Multi-Tiered Architecture• Manual Testing Is Problematic• The LoadRunner Solution• LoadRunner Expert Workflow

“The Big Picture”• Plan Load Test• Sample Task Distribution Diagram• Transaction Profile

04/08/23 3

Contents Contd…

• User Profile• How to Use the Information• Create VuserScript• Actions• Think Times• Parameterization• Determine Which Fields to Parameterize• Parameterization Decision-Maker• Select the Data Access Method

04/08/23 4

Contents Contd…

• Data File Replacement Methods• Run-Time Settings – Iterations• Summary - Parameterization• Transactions• Automatic Transactions• Summary• Next session……….

04/08/23 5

Why Load Test Your Web Application?

• Why Load Test Your Web Application?– The failure of a mission-critical web

application can be costly

• don’t just cross your fingers

– Deploy with confidence

• assure performance and functionality under real-world conditions

04/08/23 6

Functional vs. Load Web Testing

Functional test

Load test

Do business processes function properly after implementation?

Functionality

EXAMPLEOBJECTIVE

Will 2,000 concurrent hits crash the server?Stability

Is response time acceptable according to specifications?

Performance

Do business processes function properly under heavy load?

Functionality under load

EXAMPLEOBJECTIVE

04/08/23 7

Web-Based, Multi-Tiered Architecture

04/08/23 8

Testers

Load Generation System Under Test

Do you have the testing resources?• Testing personnel• Client machines

How do you synchronize users?

How do you collect and analyze results?

How do you achieve test repeatability?

Analysis?

123.20

All of you, click the

GO button again

Manual Testing Is Problematic

Web server Database server

Coordinator

04/08/23 9

System Under Test

The LoadRunner Solution

Web server Database server

Load Generation

Vuser host

Overcomes resource limitations

• Meaningful results with analysis tools

• Repeats tests with scripted actions

AnalysisController

• Runs many Vusers on few machines

• Replaces testers with “Virtual Users”

• Controller manages the Vusers

04/08/23 10

The LoadRunner Solution

Provides support for many protocols and APIs

04/08/23 11

The LoadRunner Solution

Virtual User Generator

Generates load and collects test results

Creates the Vusers deployed by the Controller

Compiles and displays test results with graphical and statistical tools

LoadRunner Controller

LoadRunner Analysis

04/08/23 12

TuneSystem Based

on Analysis

LoadRunner Expert Workflow“The Big Picture”

AnalyzeSystem Under Load

Phase 5

LoadRunnerV U G E N

LoadRunnerC O N T R O L L E R &

A N A L Y S I S

RunScenarios

Phase 4

CreateScenarios

Phase 3

Create Web Virtual Users

Phase 2Phase 1

Plan Load Test

04/08/23 13

Plan Load Test

• System Usage Information– Task Distribution Diagram

• which business tasks?• how many operations at what times of the day?

– Transaction Profile• how many operations on average, how many at peaks?• how much database activity?• how much risk to business if task fails?

– User Profile• which tasks does each real user perform?• what is ratio of different tasks for each user?

04/08/23 14

Sample Task Distribution Diagram

ONLINE BOOKSTORE (typical day, thousands of users)

Login

*Yahoo

*System backup

Business Processes

Compose

Inbox

Logout Night Day Night

1 1

50 50 50 50

180 210 150 130 100

150 200 170 140

1000 1200 600

40 30 40 75

12 122 24 46 68 810 10 12am pm

Hours to be emulated

*not a web task

04/08/23 15

Transaction Profile

Which business process to automate?

RiskBusiness process name

Logout

Typical day

20/hr

Peak day

30/hr

Web server activity

Moderate

Moderate

Moderate High

40/hr 90/hr Heavy High

Database activity

Compose

New Folder

Inbox

130/hr 180/hr Moderate Moderate Mod.

10/hr 15/hr Moderate Moderate Low

Log in 70/hr

210/hr Heavy Light High

Selection criteria: High in database I/O

High throughput

High business risk (should business process fail)

04/08/23 16

User Profile

BusinessProcess

No. of Concur-rent Users

InBox

Login

Logout

Compose

Folder 1

10/hr

5/hr

15

Folder 2

5/hr

5/hr

25/hr

5

Folder 3

5/hr

10

04/08/23 17

How to Use the Information

• Decide which business processes to automate• Learn what processes are linked (data dependent)

• Discover peak load times– peak hours of the day– peak days of the month, quarter, or year

• Decide whether to emulate processes or users

04/08/23 18

•Record Vuser Actions

• Add Load Runner Transactions

•Parameterize data

• Verify correct Execution

Create VuserScript

04/08/23 19

Actions

• A recorded business process that, when played back, emulates a real user performing the business process actions on a system.

Virtual User Playback Model

Logon(recordingoptional)

vuser_init.c

User Actions(Business Processes)

Action1.c, Action2.c, etc.(e.g., Create Order, Ship Order)

This section may be iterated (repeated) during one test run

Logoff(recordingoptional)

vuser_end.c

04/08/23 20

Think Times

Think time steps:• Simulate human users by pausing between user actions

• Inserted automatically by VuGen during recording

• Default Run-Time Setting is “Ignore think times” *(VuGen only)

04/08/23 21

• The practice of replacing a recorded value in a Vuser with a placeholder which can represent an expandable range of values.

• Solve certain problems that may occur during playback– date constraints– unique constraints– data caching– data dependency

• Emulate real user activity• Exercise the server

Parameterization

04/08/23 22

Determine Which Fields to Parameterize

• Which fields require a current date?• Which fields require unique values?• Which fields exercise the database server?• Which fields’ values are dependent for validity on the value of another field?

04/08/23 23

Parameterization Decision-Maker

For each field, ask . . .

Is there a date

constraint?Does

data get cached?

Parameterize Parameterize Parameterize

Is there a unique

constraint?

Is this a data

dependent field?

Parameterize

Do not parameterize

No

Yes

No

No

No

Yes

Yes

Yes

04/08/23 24

Select the Data Access Method

• Sequential• Random• Unique• Same line as . . .

04/08/23 25

1

2

3

4

Vuser

IterationVuser 1 Vuser 2 Vuser 3 Vuser 4

Data File Replacement Methods

a a a a

b b b b

c c c c

d d d d

a e i m

b f j n

c g k o

d h l p

a

c

d

h

f

e

j

g

l

m

k

n

i

c

e

b

Sequential Random

param1

Unique

04/08/23 26

Run-Time Settings – Iterations

For the Sequential access method, Iteration Count should equal the number of rows in the data file

04/08/23 27

Summary - Parameterization

• Parameterize fields in order to:– solve unique data constraints– solve date constraints– exercise the server(s)– handle data dependency

• Establish input data:– from the database– with the help of a Functional Expert

• Control Vuser execution from the Run-Time Settings– extended log, parameter substitution– number of iterations

04/08/23 28

Transactions

• An end-to-end (browser-to backend-to browser) measurement of one or more user actions within an action file.

Why Add LoadRunner Transactions?• Transactions are LoadRunner’s only means of

measuring performance

• Measure high business risk transactions

• Able to measure a single step or a group of steps

• Allows performance comparison between different load tests

• Helps to identify performance problems

04/08/23 29

Transactions Cont….

• Start and End Transaction

• During recording Start and End Transaction

• After recording Start and End Transaction• LR_AUTO – use this when you want LoadRunner to detect the transaction status automatically

• LR_PASS / LR_FAIL – use one of these when you want to set the transaction status manually in the code

04/08/23 30

Automatic Transactions

Steps12 sec

1 sec

9 sec

12 sec

1 sec

21 sec

19 sec

4 sec

Complete

businessprocess

(1 minute, 19 seconds

total)

• Measure performance of every test step

• Compare individual steps to each other

• Compare individual steps to entire business process

04/08/23 31

Summary

• Use LoadRunner transactions to measure:– end-to-end response times of specific steps in the

business process– the entire business process– every step in the business process automatically

• Add LoadRunner transactions during or after recording• Use automatic LoadRunner transactions to measure

every step without manually inserting transactions

04/08/23 32

Next session……….

• Controller

• Analysis

• Advanced topics

04/08/23 33

Thank You

04/08/23 34

Phase wise Approach

Goal definition (g)

Preparation (p)

Test execution (e)

Reporting + decision next phase (rd)

Multiple iterations of phase (p), (e) and (rd) are planned at a maximum of 3. In general the more important a certain activity is the earlier it is scheduled (i.e. cycle 1).

The overall project process can be depicted as follows:

 

Goal Oriented Approach

Test prep. Testreporting

Goaldefinition

Finished!

Next cycle

DecisionTest

execution

Max. 3 cycles

g e1,2,3p1,2,3 rd1,2,3 Same cycle

04/08/23 35

Architecture


Recommended