HP LoadRunner Tutorial.pdf

上一篇 / 下一篇  2009-10-20 20:42:17 / 个人分类:LoadRunner

pacing针对两个iteration之间的停顿时间,think time针对两个step之间的停顿时间,都可以设random。

Replay log中的步骤点了之后可以高亮显示script具体对应哪个步骤。同时,你右键script里的某行代码,选择go to step in replay log,可以查看对应的log。

Test Result can be filtered by pass/fail.
Test Result can be searched by pass/fail.(Ctrl+F/From the menu)

Corralation:
In the modified configuration of HP Web Tours, the server assigns a unique session ID to the Vuser. If you try to play back the script, it will fail. You will instruct VuGen to insert a step that saves the original session ID to a parameter. In each replay session, VuGen saves the new unique session ID to a parameter. In the subsequent steps, it uses the saved value instead of the
originally recorded value.

 

Prepare a script. for load testing:

How to Enable image checks:
Open the Run-Time settings (Vuser > Run-Time Settings) and select the Internet Protocol: Preferences node. Select Enable image and text check.

How to add an Output Message/Error Message
SelectInsert > New Step. The Add Step dialog box opens. Scroll down, select Output Message, and click OK.
注意:该菜单下列出了所有LR可用的函数方法,假如想不起来,可参考。

 

7. Creating a Load Testing Scenario

Manual Scenario: You can use thePercentage Modeto distribute the total number of Vusers among scripts based on a percentage
specified by your business analyst. The Percentage Mode check box is selected by default the first time you start LoadRunner following installation.

In this tutorial, you will use just one Vuser script. to model a single group of users performing identical actions. To emulate a real scenario with a more varied mix of user profiles, you would createdifferent groupsrunningseveral scriptswith different user settings. 建好后,假如你添加了两个script,你会发现,在Scenario Groups pane,2个script各占50%,这就是上一段说的percentage mode吧。然后一个script就组成了一个group。You configure the Vuser groups in the Scenario Groups pane. You create different groups to represent typical users of your
system and specify the number of Vusers that will run, and the machine that they will run on.

In a typical production system, you would have a few load generators, each hosting manyVusers.

Initialization means preparing the Vusers and the load generators for a load test run by running thevuser_initaction in the script. Initializing Vusers before they start runningreduces CPU consumptionand helps provide more realistic results.

Gradually stopping Vusers is recommended to helpdetect memory leaks and check system recovery, after the application has reached a threshold.

Definition of Counter:
1. Transaction Response Time - Whole Scenario graph. Shows the amount of time it takes for each transaction to be completed.
2. Hits per Second - Whole Scenario graph. Displays the number of hits (HTTP requests) made to the Web server by Vusers during each second of the scenario run.
3. The Throughput graph shows the amount of data (measured in bytes) that the Vusers receive from the server at any given second. You can compare this graph with the Transaction Response Time graph to see how throughput affects transaction performance.If the throughput scales upward as time progresses and the number of Vusers increases, this indicates that the bandwidth is sufficient. If the graph were to remain relatively flat as the number of Vusers increased, it would be reasonable to conclude that the bandwidth is constraining the volume of
data delivered.

Goal-Oriented Scenario:
比如设了hits per second为3的goal,当大于3,就达标了。(前提是vuser比如在5个到10个之间)表示pass了。这是为了测试性能上是不是每秒能request server 3次。大于3次的话,性能才达标。


TAG:

 

评分:0

我来说两句

我的栏目

日历

« 2024-04-16  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 26869
  • 日志数: 30
  • 建立时间: 2009-09-19
  • 更新时间: 2012-09-02

RSS订阅

Open Toolbar