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”
2. After launching the controller, you will get a ‘New Scenario’ pop-up. Choose ‘Goal-Oriented Scenario’ option.
3. You need to choose and add VuGen script(s) using ‘Add==>>’ button
4. After adding the script, click ‘OK’.
5. By default ‘Hits per Second 100’ goal scenario opens. If you want to change the goal then click ‘Edit Scenario Goal’.
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.
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.
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.
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.
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.
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.
11. Set ‘Load Behavior’ as per your requirement.
12. You can choose load behavior either ‘Automatic’ or from given options.
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
14. Once you set performance testing goal, scenario, load behaviour and scenario start time then click ‘OK’.
15. Select the load generator.
16. If you want to overwrite runtime then use ‘Run-time setting’ options, this will overwrite VuGen run-time setting.
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.