Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DATA PARAMETERS
jaipalreddy@keylabstraining.com
+91-995-938-9467
LRWEB6.5/03
Objectives
In this lesson, you will learn:
Problems that may occur during playback
The benefits of parameterization
How to parameterize fields using VuGen
How to work with data files
The Problems
02/14/99 was
yesterday!
Order number
1234 is
already here!
Server
The Solution
PARAMETERIZATION
Parameterization
The practice of replacing a recorded
value in a Vuser with a placeholder
which can represent an expandable
range of values.
The Objectives of
Parameterization
Solve certain problems that may occur during
playback
date constraints
unique constraints
data caching
data dependency
Parameterized
(quantity
P
B0033
iteration 1
L
A0544
iteration 2
A
C
C3401
iteration 3
Place order for item #
E
A5455
H
O
Z1120
L
G9993
D
E
C8488
R
iteration 4
(quantity
iteration 5
iteration 6
iteration 7
P4
L
A1
C
11
E
H2
O
210
L
D5
E
69
R
P
409485726280349
L
400320230230239
A
C
447475385798345
E
O
L
D
412353648765410
E
423847495782716
R
432165498765421
Phase 2
Plan Load
Test
Create Web
Virtual Users
Phase 3
Create
Scenarios
Phase 4
Run
Scenarios
1.2
1.3
1.4
Phase 5
Analyze
System
Under Load
Tune
System Based
on Analysis
PROBLEM
O.K.
12 13 14 15 16 17
18 19 20 21 22 23
Order date
02/02/99
Order date
02/02/99
24 25 26 27 28
February
1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
Expired
Date
Order date
02/02/99
Order date
02/02/99
18 19 20 21 22 23
24 25 26 27 28
Database
server
Web
server
Web browser
(client)
SOLUTION
O.K.
18 19 20 21 22 23
Order date
02/02/99
Order date
02/02/99
24 25 26 27 28
February
1 2 3 4 5
6 7 8 9 10 11
O.K.
12 13 14 15 16 17
Order date
02/15/99
Order date
02/15/99
18 19 20 21 22 23
24 25 26 27 28
Database
server
Web
server
Web browser
(client)
PROBLEM
1st
run
Unique
constraint
violation
Database
server
Book order
#00115
Web
server
Book order
#00115
Web browser
(client)
SOLUTION
O.K.
Book order
#00975
Book order
#00975
2nd
run
O.K.
Book order
#00233
Book order
#00233
Database
server
Web
server
Web browser
(client)
PROBLEM
5 matches
found
2nd
run
Server not
exercised
5 matches
found
Database
server
Cache
Web
server
Web browser
(client)
SOLUTION
5 matches
found
2nd
run
9 matches
found
Database
server
Web
server
Web browser
(client)
PROBLEM
2nd
run
45 matches
found
Find author
Shakespeare
Find author
Shakespeare
OK
Display MacBeth
Display match
MacBeth
19 matches
found
Find author
Dickens
MacBeth not
found
Display MacBeth
Display match
MacBeth
Database
server
Web
server
Web browser
(client)
SOLUTION
2nd
run
45 matches
found
Find author
Shakespeare
Find author
Shakespeare
OK
Display MacBeth
Display match
MacBeth
19 matches
found
Find author
Dickens
OK
Display match
Oliver Twist
Database
server
Web
server
Web browser
(client)
Parameterization Decision-Maker
For each field, ask . . .
Is there a
unique
constraint?
Do not
parameterize
No
Is there a
date
constraint?
No
Does
data get
cached?
Yes
Yes
No
No
Is this a
data
dependent
field?
Yes
Yes
Parameterize
Parameterize
Parameterize
Parameterize
Unique
constraint?
Date
constraint?
Data
dependent
field?
Phase 2
Plan Load
Test
Create Web
Virtual Users
Phase 3
Create
Scenarios
Phase 4
Run
Scenarios
1.2
1.3
1.4
Phase 5
Analyze
System
Under Load
Tune
System Based
on Analysis
10/2
04046/1999
Mon 98
True day
Smi
$230th, Wm
.
.59
48449
100345
C044
12/12/99
Willamette
48449
169.00
33339
47555
23564
12221
00410
84444
Database
server
Phase 2
Create Web
Virtual Users
Phase 3
Create
Scenarios
Phase 4
Run
Scenarios
Phase 5
Analyze
System
Under Load
Tune
System Based
on Analysis
Parameter
A placeholder which replaces a hardcoded, recorded value in the script.
The parameter is replaced with a
dynamic data value at run time.
3. Select Properties
Data
mtoys
search_button
query
radish
beet
carrot
rhubarb
onion
Create a Parameter
1. Click Parameter button next to the recorded value
2. Enter a parameter name (or select from the list)
3. Confirm that
parameter type
is "File"
VUSER DESIGN SPECIFICATION
Field
Data
mtoys
search_button
query
radish
beet
carrot
rhubarb
onion
<param>.dat
Parameter
data file
FILE NAME
Data
mtoys
search_button
query
radish
beet
carrot
rhubarb
onion
NAME
DATA
Sequential
Random
Unique
Same line as . . .
1
2
3
4
Random
Unique
Vuser 1
Vuser 2
Vuser 3
Vuser 4
a
a
b
c
c
d
d
h
a
f
b
e
c
j
d
g
a
l
b
m
c
k
d
n
a
i
b
c
c
e
d
b
a
b
c
d
e
f
g
h
i
j
k
l
m
n
param1
o
p
Phase 2
Create Web
Virtual Users
Phase 3
Create
Scenarios
Phase 4
Run
Scenarios
Phase 5
Analyze
System
Under Load
Tune
System Based
on Analysis
Execution
Log
Log RunTime
Settings
cause
parameter
data to
display in
Execution
Log
Parameter
data is
also
displayed
on the
Iteration
Summary
page
Summary
Parameterize fields in order to:
Lab Exercise
keylabstraining.com