Professional Documents
Culture Documents
Performance Testing - LR
10/17/08 2
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
10/17/08 3
Contents Contd…
10/17/08 4
Why Load Test Your Web Application?
10/17/08 5
Functional vs. Load Web Testing
OBJECTIVE EXAMPLE
Functional Do business
test Functionality processes function
properly after
implementation?
OBJECTIVE EXAMPLE
Load Will 2,000 concurrent
test Stability hits crash the server?
Is response time
Performance acceptable according
to specifications?
Do business
Functionality processes function
under load properly under heavy
load?
10/17/08 6
Web-Based, Multi-Tiered Architecture
10/17/08 7
Manual Testing Is Problematic
Coordinator
Testers
10/17/08 10
The LoadRunner Solution
Generates load
LoadRunner Controller and collects test results
10/17/08 11
LoadRunner Expert Workflow
“The Big Picture”
LoadRunner
VUGEN
LoadRunner
CONTROLLER&
ANALYSIS
10/17/08 12
Plan Load Test
10/17/08 13
Sample Task Distribution Diagram
Hours to be
Business emulated
Processes
Logout Night 40 30 Day40 75 Night
*Yahoo 50 50 50 50
*System backup 1 1
12 2 4 6 8 10 12 2 4 6 8 10 12
am pm
Business Typical day Peak day Web server activity Databas Risk
process name e activity
Log in 70/hr ✓ ✓
210/hr Heavy Light High ✓
10/hr 15/hr Moderate Moderate Low
Inbox
Compose 130/hr ✓ ✓
180/hr Moderate Moderate Mod.
Business
Folder 1 Folder 2 Folder 3
Process
No. of Concur-
15 5 10
rent Users
Logout 5/hr
Compose 5/hr
10/17/08 16
How to Use the Information
10/17/08 17
Create VuserScript
10/17/08 18
Actions
10/17/08 19
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)
10/17/08 20
Parameterization
• 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
10/17/08 21
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?
10/17/08 22
Parameterization Decision-Maker
For each field, ask . . .
Do not
parameterize
Is there a
unique
constraint? No
Is there a
date
constraint? No
Does No
data get
cached? No
Is this a
Yes data
dependent
field?
Yes
Yes
Yes
10/17/08 23
Select the Data Access Method
• Sequential
• Random
• Unique
• Same line as
...
10/17/08 24
Data File Replacement Methods
Vuser
Vuser 1 Vuser 2 Vuser 3 Vuser 4
Iteration
a a a e a i a m
1 a f l i
b b b f b j b n
2 c e m c param1
c c c g c k c o
3 d j k e
d d d h d l d p
4 h g n b
10/17/08 25
Run-Time Settings – Iterations
For the Sequential access method, Iteration
Count should equal the number of rows in the
data file
10/17/08 26
Summary - Parameterization
10/17/08 27
Transactions
10/17/08 28
Transactions Cont….
10/17/08 29
Automatic Transactions
Steps
12 sec
1 sec
9 sec Complete
12 sec
business
1 sec
process
21 sec
(1 minute,
19 sec 19 seconds
total)
4 sec
10/17/08 30
Summary
10/17/08 31
Next session……….
• Controller
• Analysis
• Advanced topics
10/17/08 32
Thank You
10/17/08 33
Goal Oriented Approach
Next cycle
Max. 3 cycles
10/17/08 34
Architecture
10/17/08 35