LoadRunner – Goal-Oriented Scenario

LoadRunner - Goal Oriented Scenario Preparation

LoadRunner Goal-Oriented scenario is used to achieve a defined performance testing goal. In such a scenario, you have to specify the target, minimum and maximum no. of Vusers and duration. When the execution of the script starts then LoadRunner ramp-up the load from min no. of Vusers to max no. of Vusers and in parallel checks whether the goal or target is reached or not. If the target does not reach, it stops the execution of the test. The target can be mentioned in terms of response time, no. of Vusers, transactions per sec, throughput etc. To prepare the goal-oriented scenario for your load test you need to follow below steps in the controller:

Steps for a goal-oriented scenario in LoadRunner

1. Open “Controller”

LoadRunner - Goal-Oriented Scenario - Open controller
Figure 01

2. After launching the controller, you will get a ‘New Scenario’ pop-up. Choose ‘Goal-Oriented Scenario’ option.

LoadRunner - Goal-Oriented Scenario - Choose option
Figure 02: ‘New Scenario’ pop-up

3. You need to choose and add VuGen script(s) using ‘Add==>>’ button

LoadRunner - Goal-Oriented Scenario - Choose script
Figure 03: Choose script

4. After adding the script, click ‘OK’.

Figure 04: Choose a script

5. By default ‘Hits per Second 100’ goal scenario opens. If you want to change the goal then click ‘Edit Scenario Goal’.

LoadRunner - Goal-Oriented Scenario -
Figure 05: ‘Scenario Goal’ Window

6. ‘Edit Scenario Goal’ window will appear. You can choose Goal type in ‘Define Scenario Goal’ section. There are 5 types of performance goal in the dropdown. You can choose any of them.

LoadRunner - Goal-Oriented Scenario - Goal Type
Figure 06: ‘Edit Scenario Goal’ Window

Goal Types:

a. Virtual Users: This goal tests if your application can run a specified number of Vusers simultaneously. Running this type of goal-oriented scenario is similar to running a manual scenario.

LoadRunner - Goal-Oriented Scenario - Virtual users
Figure 07: Define Scenario Goal as Virtual Users

b. Hits per Second: This goal is used to test the strength of the server in terms of hits. For this type of goal, you need to specify a minimum-maximum range of Vusers for the scenario to run and hits per second goal which you want to achieve. Hits per Second goal is for Web Vusers only and relates to HTTP requests per second.

LoadRunner - Goal-Oriented Scenario - Hits per second
Figure 08: Define Scenario Goal as Hits per second

c. Transactions per Second: This goal is used to test the strength of the server in terms of TPS or transactions per second. For this type of goal, you need to specify a minimum-maximum range of Vusers for the scenario to run and transactions per second goal of a transaction which you can choose from ‘Transaction Name’ dropdown.

LoadRunner - Goal-Oriented Scenario - Transactions per second
Figure 09: Define Scenario Goal as Transactions per second

d. Transaction Response Time: This goal is used to achieve the response time goal of a transaction. For this type of goal, you need to specify a minimum-maximum range of Vusers for the scenario to run and response time goal of a transaction which you can choose from ‘Transaction Name’ dropdown.

LoadRunner - Goal-Oriented Scenario - Transaction Response Time
Figure 10: Define Scenario Goal – Transaction Response Time

e. Pages per Minute: This goal is used to test the strength of the server in terms of pages. For this type of goal, you need to specify a minimum-maximum range of Vusers for the scenario to run and pages per minute goal which you want to achieve. Pages per Minute goal is for Web Vusers only.

LoadRunner - Goal-Oriented Scenario - Pages per minute
Figure 11: Define Scenario Goal – Pages per Minute

7. Update ‘Scenario Settings’ as per your requirement. 

8. Set ‘Run Time’. This is the duration of test after the target gets achieved. You can also called as steady state.

9. Set the action ‘If the target cannot be reached’. Either ‘Stop scenario and save results’ or ‘Continue scenario without reaching goal’

10. You can also check ‘Receive notification’ box to get notification of either of the case.

Figure 12: Scenario Settings

11. Set ‘Load Behavior’ as per your requirement. 

12. You can choose load behavior either ‘Automatic’ or from given options.

Figure 13: Load Behavior option

13. You can set the scenario start time using ‘Scenario Start Time’ option. You can choose any one of them:

  • Without delay
  • With a delay of HH:MM:SS time
  • At specific system clock time
Figure 14: Scenario Time set-up

14. Once you set performance testing goal, scenario, load behaviour and scenario start time then click ‘OK’.

Figure 15: Load Preview

15. Select the load generator.

Figure 16: Scenario Group

16. If you want to overwrite runtime then use ‘Run-time setting’ options, this will overwrite VuGen run-time setting.

Figure 17

That’s all. Likewise, you can create your performance test goal-oriented scenario in LoadRunner and check whether the application meets the defined goal or not. The next step will be to execute the test by clicking the ‘Start Scenario’ button under the ‘Run’ tab.


Leave a Reply

Your email address will not be published. Required fields are marked *