Building & Creating a Performance Scenario within Loadrunner’s Controller

During the preparation phase of a performance testing project and once you’ve developed all the performance scripts, refer to our article Key Steps involved in creating/developing a Performance Test Script you will then need to build and create Performance scenarios.  This will be based on the performance modelling you’ve performed refer to our article Performance Modelling – Creating an accurate performance model.

This article describes the key steps on how to create a performance scenario in Loadrunner’s Controller application.

The creation of a performance scenario is the best way to emulate real users in a real-life scenario by giving information on how to emulate what real users do. This normally consists of the following information:

When you create a new scenario in the Loadrunner Controller application you have the option to create a ‘Manual Scenario’ or a ‘Goal-Oriented Scenario.’

Manual Scenario

You can build/design a manual scenario by

  • Selecting the scripts to execute within the scenario.
  • Selecting the load generators on which scripts will run.
  • Allocating the Vusers to each of the scripts.

You can design a manual scenario in one of two modes:

  • Vuser group mode – In this mode, each script you choose for the scenario is assigned to a Vuser group. You can then assign several Vusers to each Vuser group that you create.
  • Percentage mode – In this mode, you outline the total number of Vusers to be used in the scenario, allocate the load generators and specify a percentage of the total number of Vusers to each script.

Steps to create a manual scenario

  • Create a new scenario by selecting the new scenario and selecting the manual scenario type and the mode you require ie. Vuser group mode/percentage mode. For more details, refer to How to Change the Scenario Mode (Manual Scenario)
  • Add the load generators to the scenario.
  • Add Vuser groups/scripts to the scenario.

Vuser group mode

  • Give the group a name.
  • Assign a number of Vusers to the group.
  • Select a load generator on which to run the Vusers.
  • Select a Vuser script.

Percentage mode

  • Select all the Vuser scripts you want to include in the test.
  • Select the load generators on which to run the scripts.
  • Assign a percentage of the total number of Vusers for each script.
  • Define a schedule for the scenario.
  • Define a schedule by which to run the Vusers in the scenario.

For more details, refer to Define a Schedule for the Scenario.

In addition to the above, you can also –

  • Define a virtual location for each script in the scenario if you have Network Virtualization installed. you can select the location for the network virtualization. For more details, refer to Network Virtualization Locations.
  • Define virtual services for the scenario in place of actual services, if you have Service Virtualization installed, For more details, refer to Service Virtualization.
  • Define service level agreements (SLAs) to measure scenario goals overtime periods, or over a whole scenario. For more details to define SLAs, refer to Define Service Level Agreements.

Goal-Oriented Scenario

In a goal-oriented scenario, you can define the goals you want your test to accomplish.

The following types of goals exist for a goal-oriented scenario.

  • Virtual Users (Vusers) – This goal can be used to test if your application can run a specified number of Virtual Users concurrently. This type of goal is like running a manual scenario.
  • Pages per Minute/Hits Per Second/Transactions per Second – The goals of these tests can be used to test the power of your server.

For each of these goals, you need to:

  • Specify the minimum-maximum range of Vusers for the scenario to run and in addition, for the transactions per second goal type, you also need to specify a transaction name.
  • Transaction Response Time – This goal can test how many Vusers can be run concurrently without exceeding the maximum transaction response time.

For this goal type you need to:

  • Specify the name of the transaction in your script that you want to test.
  • Specify the minimum-maximum range of Vusers for the scenario to run.
  • Specify the maximum transaction response time i.e. acceptable/service level agreement value. For instance, If you do not want a customer to wait more than three seconds to log in to your website, specify a maximum transaction response time of three seconds.

Steps to create a goal-oriented scenario in the Loadrunner

  • Create a new scenario by selecting New scenario and selecting the goal-oriented scenario type.
  • Select the scripts to run in the scenario.
  • Add the load generators to the scenario.
  • Assign the load generators to each script.
  • Define a goal for the scenario i.e. Virtual users, Pages per Minute/Hits Per Second/Transactions per Second, Transaction response time.
  • Assign each script a percentage of the total scenario target.

Again, like creating a manual scenario you can also add the following if required.

  • Define a virtual location for each script in the scenario if you have Network Virtualization installed. you can select the location for the network virtualisation. For more details, refer to Network Virtualisation Locations.
  • Define virtual services for the scenario in place of actual services, if you have Service Virtualization installed, For more details, refer to Service Virtualisation.
  • Define service level agreements (SLAs) to measure scenario goals overtime periods, or over a whole scenario. For more details to define SLAs, refer to Define Service Level Agreements.

In conclusion, when creating a performance scenario, the steps described above should be used to create your performance scenario within the Loadrunner Controller application.

To find out how SQA Consulting can assist you with your performance testing needs contact us.

Get In Touch

Technology Consulting Partners