Beruflich Dokumente
Kultur Dokumente
LoadRunner
Scenario
The elements that define a load test,
such as:
host
scripts
machines
virtual users
results run-time
location settings
Creating a Scenario
LoadRunner
Controller
Server(s)
Host 1 Host 2
The LoadRunner Controller
• Before scenario execution
– creates scenario
– sets up run-time configuration
Vusers
Run Agent
Stop
Initialize
Remote
Load Command
Launcher
Host machine
Controller
Running a Scenario
CREATE SCENARIOS
3.1 Define hosts
3.2 Connect hosts
3.3 Define Vuser scripts
3.4 Add Vusers
VuGen Creates a .usr File
Example Transaction Profile
TYPICAL WEB SERVER DATABASE RISK of
TRANSACTION PEAK DAY
DAY ACTIVITY ACTIVITY FAILURE
Log in
70/hr 210/hr Heavy Light High
Create new
account 10/hr 15/hr Moderate Moderate Low
Create order
130/hr 180/hr Heavy Heavy Mod
.
Update order 20/hr 30/hr Moderate Moderate High
create_order
create_order.usr
3.4 - Add Vusers
Vusers Tab of the Controller
Host
Script
Machines
Initialize/ Names
run Vuser
Vuser
status
Controller Tabs
• Hosts tab
– all available hosts and their connection
status
• Scripts tab
– paths to all available Vuser scripts and
the script type
• Vusers tab
– displays all of the Vusers in a group
• Online tab
– displays monitors and graphs in real time
LoadRunner Expert Workflow
“Zooming In”
Transaction
name
3 transactions failed at 8
seconds, and 2 transactions
failed at 9 seconds
All 5
transactions
failed.
• This graph is a quick way to find
out if any transactions failed
4.1 Verify Vusers Run Concurrently
Failed Transactions by Vuser
Top Time
Transaction
A LoadRunner transaction which
requires significantly more than the
average time to complete, irrespective
of load. This creates a bottleneck.
Automatic Transactions
• Measure performance of every test step
• Compare individual steps to each other
• Compare individual steps to an entire business
process
Steps
12 sec
1 sec
9 sec
Complete
12 sec
business
1 sec
process
21 sec
19 sec 1 minute 19 seconds total
4 sec
4.2 Isolate Top Time Transactions
Run-time Settings
Automatic
Transactions show
up only in the
Controller’s graphs
and reports, not in
VuGen’s Execution
Log.
4.3 Run full load test Verify that the system functions 100%
under the expected load
4.3 Run Full Load Test
Set Up Monitoring Options
• Check Auto start at scenario run
• Check Send errors to the output window
(otherwise pop-ups interrupt the run)
4.3 Run Full Load Test
Set Up Monitoring Tools
How often
is data read
from
cache? How
OBJECT COUNTER many data
requests can't
Cache Copy Read Hits % be fulfilled by
Data Map Hits % virtual
memory?
Memory Page Faults/sec
How busy
Bytes Transferred/sec is server
Server work
Total Bytes/sec sending data
queues to clients?
System % Total Processor Time
File Data Operations/sec
How
often is
How server busy
often does (not waiting)
server Read ?
or Write?
4.3 Run Full Load Test
Runtime Settings
•• Checks
Getting
Logging
Allows
Better these
are good for
emulates
testing
uses
testing thereal
measurements
resources
of
real
more
user Vuser,
is
that
but may befor all
the payoff
may distortduring
world
behavior
unnecessary
previous
load
testtest
conditions
load results
preparation
50% of the
transactions completed
in 57 seconds or less
4.3 Run Full Load Test
Throughput
NOTE: The graph data spreadsheet display can be turned on and off
4.3 Run Full Load Test
Hits per Second
Without a filter,
I can directly compare
the performance of all
transactions.
4.3 Run Full Load Test
Filtered Transaction Performance
Great! 21 of the
25 total transactions
took less than
6 seconds.
4.3 Run Full Load Test
Transaction Performance Summary
4.3 Run full load test Verify that the system functions 100%
under the expected load
120 Vusers
100 Vusers
This comparison
shows that adding more
users didn’t slow
the system much
Refresh Databases to Original State
1.1 Get system usage 2.1 Record user 3.1 Define hosts 4.1 Verify that Vusers
information actions 3.2 Connect hosts run concurrently
1.2 Document 2.2 Add LoadRunner 3.3 Define scripts 4.2 Isolate top time
business process transactions transactions
properties 3.4 Add Vusers
2.3 Parameterize 4.3 Run full load test
1.3 Determine which data 4.4 Isolate hardware
fields to 2.4 Add verification and software
parameterize
checks limitations
1.4 Establish which 2.5 Verify correct
data to use execution
Lab Exercise
Cross Scenario Graphs
120 Vusers
100 Vusers