LoadRunner – Goal-Oriented Scenario

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 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 the 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 the hits per second goal that you want to achieve. The hits per second goal are for Web Vusers only and relate 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 the ‘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 the response time goal of a transaction which you can choose from the ‘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 the pages per minute goal that you want to achieve. The 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 the test after the target is 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 the ‘Receive notification’ box to get a notification of either of the cases.

Figure 12: Scenario Settings

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

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

Figure 13: Load Behavior option

13. You can set the scenario start time using the ‘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 the performance testing goal, scenario, load behaviour and scenario start time click ‘OK’.

Figure 15: Load Preview

15. Select the load generator.

Figure 16: Scenario Group

16. If you want to overwrite runtime then use the ‘Run-time setting’ option, this will overwrite the 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 Comment