loadrunner tutorials

2011-04-30  张林 

LoadRunner Tutorial 1 ~ 16
http://www.guru99.com/loadrunner-tutorials.html
Loadrunner is the Flagship performance testing tool by HP/Mercury and has over 70% market share . Loadrunner supports almost all networking protocols. Following  16 training tutorials , cover all that you need to know and use Load Runner.
1. Load Runner and its Architecture

Key Takeaways
Tutorials have been recorded using Loadrunner version 8.1 but you can use the tutorials to learn any newer versions.
Loadrunner primarily is a 3 stage architecture consisting of the Vuser Host , Controller and the Analysis and Monitoring tool.
A Typical performance testing process would consist of
a) Planning your Load Test
b) Creating Vuser Scripts
c) Creating Load Scenarios
d) Run the Load Tests
e) Analyze Results
f) Fine tune your system

2. Mercury Web Tours Sample Application used for Hands-on
points to note:
Mercury Web Tours is designed specifically with training needs of Loadrunner in mind.
We recommend you practise the assignments in the tutorials as you go along and even script a few scenarios of your own!

3. a generic overview of Load Runner and its various Components

points to remember
As shown in the video, your load testing process would consists of
Recording a script in the Vuser Component of Loadrunner
Create & Run a load scenario in the Controller section of Loadrunner
Analyze Test Results in Monitoring and Analysis tool

4. Vuser Component

key takeaways:
The Virtual User Generator also known as Vuser only records events that cause client and server to
communicate
A typical Vuser script development process would be a) Record the script b) Replay & Verify the recorded Script c) Enhance the Script d) Replay & Verify the Enhance Script e) Configure Run-time Settings f) Use the script in your load scenario some definitions
Virtual User - Software Simulated tester that  replaces human testers.
Virtual Scripts - Contains test steps performed by Virtual User
Actions - A set of related steps are grouped together as Actions. Similar to concept of functions in programming.

5. "scripting" in Vuser Component
key takeaways    
You can record single or multiple protocols scripts in LOADRUNNER, depending on your requirements
HTML based script, record html based on user actions. It is the recommended mode of recording
URL bases script, record all requests and resources from server . It is not intuitive and is should be used while recording applets or non-browser applications.

6. various VIEWS available in Vuser
Two views available in loadrunner
Tree View is an ICON based view that lists Vuser Actions as steps. It also takes a snapshot of the Vuser Action
Script View is a text based view that lists the Vuser actions as functions.

7. Transactions in Load Runner
keypoints about transaction in loadrunner
Transactions help measure performance of your system under test.
You can have any number of transactions in your script
A transaction can have sub-transactions

8. PLAYBACK functionality
key takeaways:
Playback/Replay ensures that your script is recorded correctly
Before playback make sure to set the run-time settings
Think Time is the time taken by a user (usually to think ) before he takes the next action.

9. common playback problem
points to remember
Dynamic values such as Cookies , Checksums , Session Id's change each time you use an application
During Script Replay, the recorded dynamic values do not match the actual dynamic values and your script fails
To avoid failure, you must parametrize the dynamic values and use the parametrized values for further communication between client and server
This is nothing but CORRELATION

10.  various options available for correlation
Note:-
Correlation can be done
Manually called Manual correlation
Automatically called Automatic correlation

Manual correlation can be done as
Manual Coding
Snapshot Comparison
Vuser Comparison (recommended)

11. manual correlation
Steps in Vuser Comparison method of Correlation
Identify Dynamic values that needs to be correlated
Find Servers response containing the Dynamic value
Capture the Dynamic value in a parameter
Replace every occurrence of the Dynamic value with parameter
Verify Changes
web_reg_save_param
It is an in-built function used for parsing
syntax:-
web_reg_save_param("Parameter Name","Left Boundary","Right Boundary")

12. automatic correlation

Steps in Auto Correlation
Replay the script
Identify the values to correlate
Select the values and click the auto-correlate button
Verify the script
 
Though Automatic Correlation seems simpler, it can be error prone and the recommended method is to use manual correlation

13. parameterization
Notes:-
Parametrization is important because
It allows you  to test your script with different values
Reduces the size of your script
Steps in Parametrization

Replace the constant values in Vuser Script with parameters
Set the data source for the parameter , so different values  can be selected at run time
 
14. checkpoints
Summary:-
A checkpoint compares stored value with actual (present) value and reports pass or fail status
You can create  a checkpoint during recording or  while enhancing the vuser script.
Types of Checkpoints
Text Check
Image Check

15. Controller section
Summary:-
The Controller has two sections
Design Section - Used to design the load testing scenario
Run Section - Used to monitor scenarios which are in execution.
You can design Manual or Goal Oriented Scenarios
During Scenario run, you can monitor graphs to track execution progress.

16. Analyzer section
Summary:-
Analyzer section is used  to observe data and graphs recorded during the load test
90% column gives the time required to complete the transaction in 90% time
It is possible to correlate & merge Graphs

fyi,
性能测试从零开始——LoadRunner入门http://www.51testing.com/html/86/n-91586.html
517°/5171 人阅读/0 条评论 发表评论

登录 后发表评论