• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • Blog

What is Controller?

Controller, as the name suggests, is a program to “control” overall load test. It is responsible for helping you run your performance test design using the VUGen scripts you’ve already created. It lets you over-ride run-time settings, enable or disable think time, rendezvous points, adds load generators and controls the number of users each generator can simulate. It automatically creates a dump of execution results, gives you a live view of “current state” of load test running.

In this tutorial, you will learn-

How to Launch Controller
Simulating a Manual Scenario
Simulating a Goal-Oriented Scenario
Configure Load Generators
Schedule a Group
Set-up the SLA(Service Level Agreement)

Let’s learn more about HP Controller.

How to Launch Controller

To launch HP Controller, go to Start Menu ->HP Software ->HP LoadRunner ->Controller as demonstrated below:

How to use Controller in LoadRunner

After you’ve launched, you’ll see a splash screen appearing momentarily. A quick snap has been displayed below:

How to use Controller in LoadRunner

The snapshot will automatically lead to the main window of HP Controller. Let’s have a look at it before we discuss main components of the screen.

How to use Controller in LoadRunner

If the “New Scenario” screen doesn’t come up automatically, (after you’ve changed the preference) you can click on New button under File Menu or click on How to use Controller in LoadRunner button from the toolbar. Alternatively, you can click Ctrl + N. The menu has been displayed below for reference.

How to use Controller in LoadRunner

Similarly, to open an existing or previously created scenario you can use Ctrl + O or How to use Controller in LoadRunner icon, and it will open a standard dialogue box to browse files. The extension of a Load Runner Scenario file is *.lrs

There are two types of scenarios in Controller.

  • Manual Scenario
  • Goal-Oriented Scenario

Manual Scenario can further or may not have Percentage Mode. We will discuss each in detail.

Simulating a Manual Scenario

A manual scenario is static and gives more control over the situation. You can decide which transaction to execute, for how many of times, for how long.

Based on the composition of test mix, you can see application behaviour such as number of hits, response time, etc.

You will find out how a manual scenario is different from Goal Oriented scenario later.

In order to create a Manual Scenario, select Manual Scenario from “Select Scenario Type”

For now, let’s use non-percentage mode, to begin with. Have a look at the snapshot illustrated below:

How to use Controller in LoadRunner

You can select the scripts you wish to add to the scenario right from the above screen. However, it is generally practiced to add the scripts later. 

Click the OK button to proceed.

This will create a blank scenario and load it into the main screen. You will notice the Save button is enabled now. Have a look at the snapshot below:

How to use Controller in LoadRunner

Likewise, if you selected Percentage Mode while selecting type of scenario, the screen will appear slightly differently. Instead of number of users, it will show the distribution of users in percentage. Controller distributes users per assigned percentage automatically.

The rest is same. Refer to snapshot below:

How to use Controller in LoadRunner

If you do not create a Scenario at the start, you will notice the toolbar as below:

How to use Controller in LoadRunner

You can click on How to use Controller in LoadRunner button to create a new blank Scenario. Once a scenario has been created, you can click on How to use Controller in LoadRunner button to Save a scenario or click Ctrl + S. Likewise, you can click on How to use Controller in LoadRunner button to open an already existing scenario from your local computer drive.

The remaining button simply invokes other components of LoadRunner. The How to use Controller in LoadRunner button invokes VUGen and How to use Controller in LoadRunner button invokes HP analysis.

Once you add a VUSer script or group, you will notice the subject toolbar will show additional icons. The new toolbar will look like this:

How to use Controller in LoadRunner

The new toolbar has 2 additional controls.

The How to use Controller in LoadRunner button opens the list of all Load Generators. In our case, we’re using “localhost” as a generator. This means that your local machine will be used by Controller as well as Generator to simulate virtual user load. The Network Virtualization Settings can be opened by clicking on How to use Controller in LoadRunner icon. Network Virtualization requires Shunra NV for HP Software version 8.6 or higher installed in your machine. This integration enhances test accuracy by virtualizing production network conditions in the load and performance test environment. To incorporate Shunra NV for HP Software into your test environment, contact your HP service representative.

Now that you’ve created a new, blank LoadRunner Scenario, please make a note of

Default configurations of a new scenario:

Scheduled by: Scenario

Run Mode: Real World schedule

Since a VUsers script will be run by a group of VUsers, hence it is called a Group as well. The Group Name column will show the name of VUser Script once added. Let’s add our VUsers scripts into this scenario.

When a scenario is completely created, you will see below toolbar under Scenario Groups:

How to use Controller in LoadRunner

You can click on the How to use Controller in LoadRunner icon in the toolbar to add a VUser Group.

When you click on a cell under Group Name column, it will open a small box i.e. How to use Controller in LoadRunner – here you can see a quick list of recent VUser Scripts as well as Browse button. Refer to below screenshot.

How to use Controller in LoadRunner

You can select from the list or simply browse from desired directory. If you click the browse button, it opens a dialogue box similar to MS common dialogue box. Refer to below snapshot:

How to use Controller in LoadRunner

As you can see, you can browser VUser Scripts, GUI Scripts or QTP Scripts here. Please remember, a GUI or QTP script can only instantiate single user and cannot be used for “load simulation”. Can you tell yourself why a QTP script is available in Load Scenario?

The Correct answer is, QTP scripts can be added to Load Scenario for to extract information:

Since LoadRunner script works based on request and response, this doesn’t include UI and data rendering duration. A QTP script will give 1 sample of Real user experience under load. Of course, the QTP script needs to have all the transactions applied through descriptive programming.  

If you right-click on the grey area on the left, you will see a small menu appearing as in below screenshot:

How to use Controller in LoadRunner

You can click on the Add Group to browse your VUser script.

To remove a group, click on How to use Controller in LoadRunner button in the tool bar or right click on the group and select Remove Group – as shown below:

How to use Controller in LoadRunner

Tip: You can also click on How to use Controller in LoadRunner button to view Run Time Settings specific to the selected group. You can select multiple groups (by holding Ctrl + click) to apply Run Time Settings to selected groups at a time.

From the toolbar, you can click on Details button [How to use Controller in LoadRunner ] in toolbar to view all details pertaining to a VUser Group.

How to use Controller in LoadRunner

If you click More, it will show you a panel with 3 tabs. 1st tab, Rendezvous, will open by default:

How to use Controller in LoadRunner

You can also see the VUsers a list in Vusers tab. If you’ve assigned IDs to VUsers, you’ll see them here.

How to use Controller in LoadRunner

You can also see list of all files in the Script folder. This helps to navigating all the way to the end directory and see only relevant files.

How to use Controller in LoadRunner

We will study how to Schedule a group separately.

Once your scenario is ready, you can click on How to use Controller in LoadRunner button to start executing your scenario. Once you click the play button, you will notice the Controller switches from Design tab to Run tab.

 Controller design the view also gives view a script as you run the scenario. This is helpful when you face errors. However, any changes you make in the script will not be reflected the running scenario. Even when the scenario is not running, you need to view the details and click on REFRESH button for changes to take effect.

You can view a script directly from Controller by clicking on How to use Controller in LoadRunner button.

Likewise, you can see the current VUsers (yes, you can actually view them) by clicking on How to use Controller in LoadRunner button.

Once you’re good with configuration, you can hit the How to use Controller in LoadRunner button or go to Running tab and click on How to use Controller in LoadRunner button.

At the start of execution of the scenario, Controller will implicitly create a temporary directory to dump the results. If the directory already exists, you will get a prompt:

How to use Controller in LoadRunner

If you select Yes, the previous dump will be lost. If you select No, you will see below window. You can opt to create a new directory for each result if you wish. However, consider running out of space shortly after that.

How to use Controller in LoadRunner

As soon as you hit OK, your scenario will start running. You will see users moving from Pending to Init columns and so on.

This is how an example execution will look like:

How to use Controller in LoadRunner

You can click on the Passed Transactions that opens a new window. Here you can check the status of transactions which you’ve applied throughout your scripts.

Similarly, you can click on any graph name on the left to open any graph.

In the bottom of the window, you can see which Transactions are passing, the minimum time taken by any user thus far, the maximum time, average time and standard deviation.

You can choose to collate results side by side or only after the end of scenario completion. For toggle, click on the Results menu and you will find below menu.

How to use Controller in LoadRunner

If you’ve wished to enable collation, you can keep it checked.

Simulating a Goal-Oriented Scenario

A Goal-Oriented scenario is dynamic in nature – this means, it keeps changing the overall load being simulated over the server. You set a Goal, for example, the maximum number of hits you wish to achieve for the target server, maximum response time against a transaction etc.

Based on above numeric, you can draw analytics such as a maximum number of users your application support while staying between acceptable response time. Similarly,The maximum number of users connected to application till X number of hits to the server is reached.

In such a case, HP Controller automatically varies the number of users to the server, thus, you’ve little control over how many numbers of times or for how long a user runs.

Click New to create a new scenario and select Goal-Oriented Scenario.

The following screen will appear:

How to use Controller in LoadRunner

Process of adding VUser Groups is exactly same as in case of Manual Scenario.

The key differences in Goal Oriented Scenario, as the name suggests, is to create a goal. The Controller will automatically

While most of the interface is pretty much similar to Manual Scenario, certain screen appears differently, although perform the same actions. For example, to add a VUser Group or a VUser Script, click on the How to use Controller in LoadRunner button. This will lead to below window:

How to use Controller in LoadRunner

Here you can select recent scripts, browser a script or hit the Record button to create a new script.

Click OK to close the window.

Per need, you can click How to use Controller in LoadRunner button to view the details of selected group/VUser Script.

Clicking How to use Controller in LoadRunner button will remove the selected VUser Group from the current scenario. The changes will be saved only if you save.

Clicking How to use Controller in LoadRunner button will open the Run Time Settings, as we studied in  VUGen. However, if you override (or modify) the Run Time Settings here, the changes will be effective only for the current scenario. If you remove the script and reload, or hit refresh (in Details View), you will lose any changes made. This will reload the Run Time Settings saved while creating the script.

You can also click on How to use Controller in LoadRunner button to open select VUser Group in VUGen.

If you wish to configure Load Generators (our next topic) you can click on How to use Controller in LoadRunner button.

Execution of a Goal-Oriented Scenario is same as Manual Scenario.

Configure Load Generators

There are two ways to configure Load Generators.

When you click Add Group ( to add a VUser Script), you will see below window:

How to use Controller in LoadRunner

You can click on Add corresponding to Load Generator Name and browse your Load Generators, or alternative, you can simply a type “localhost” and start using your controller machine as Load Generator.

If you click on “add…”, you will see below window:

How to use Controller in LoadRunner

You can click on More to see more settings related to Load Generator. Navigate through different tabs to build more understanding:

How to use Controller in LoadRunner

The above were configurations to Run-Time Settings. As you can see, a maximum of 50 users can be initialized at one time.

Below is configuration of VUser Limit.

How to use Controller in LoadRunner

Click Defaults if you wish to revert to default settings and lose any changes you’ve made. Click OK button to save changes and close window.

Another way of adding and configuring Load Generators is by clicking Scenario menu and click Load Generators.

How to use Controller in LoadRunner

This will lead to main window of Generators. Here you can see the status of all Load Generators.  The name refers to the name of the Generator. The Status is the current status, whether or not the generator is ready to be used. The Platform tells the Operating System of the generator which can be Windows or Unix only. The Type tells whether it’s local or Cloud based generator. Have a look at the below snapshot:

How to use Controller in LoadRunner

To add another generator, you need to click on Add button. Once you click add, you will see the same screen as already discussed above.  

Once generator has been configured, click Close button to close the screen.

Schedule a Group

Before you run your scenario, you need to configure schedule. Either you schedule by Scenario or by Group. Each of these, can further be categorized by Real-world Schedule or Basic Schedule, called Run Mode.

If you schedule by Scenario and create a Real-World Schedule, you will see below options appearing in Global Schedule area:

How to use Controller in LoadRunner

However, if you schedule a Scenario and create a Basic schedule, you will see below window. Can you find difference?

How to use Controller in LoadRunner

You can also Schedule by Group. This will apply the configuration to group level. This can further be categorized as Real-world and Basic Run Mode.

How to use Controller in LoadRunner

Likewise, you can change the Run Mode to Basic Schedule. Use your Test Designing skills to find the difference between the two. Here is a reference:

How to use Controller in LoadRunner

Did you notice a new icon appearing in the Scenario Schedule toolbar?

Here it is for your reference: How to use Controller in LoadRunner

The Rendezvous icon is appearing only in case of Group configurations.

Set-up the SLA(Service Level Agreement)

You may have signed a Service Level Agreement with your customers. The SLA in LoadRunner or Controller gives an opportunity to you to test your application against an SLA. Keep in mind, a regular (non-SLA) scenario gives you the opportunity to run various types of scenario in order to find the problems and root cause of problems;  whereas, your customers might like to simply test your application under an SLA to see whether it works assigned in contract or not.

From the main Design View of Controller, find the SLA toolbar; that is on the right top corner and looks like this:

How to use Controller in LoadRunner

Click the How to use Controller in LoadRunner button and following window will open up:

How to use Controller in LoadRunner

Click the How to use Controller in LoadRunner button.

Notice the new window. Here you can select the Measurement of the SLA. In our example, we’re taking Transaction Response Time. Have a look:

How to use Controller in LoadRunner

Click the How to use Controller in LoadRunner button.

In the next window, you can select the Transactions where the above Measurement will be applied. We’re using only main transaction i.e. 01_Signup

This will help remove opening main page and other not so important transactions to be excluded.

Have a look at the window:

How to use Controller in LoadRunner

Click the How to use Controller in LoadRunner button.

In the new window, you can select the percentile of the threshold value. If you’ve selected multiple transactions, you can click How to use Controller in LoadRunner button. Have a look at the below window:

How to use Controller in LoadRunner

Click the How to use Controller in LoadRunner button.

The next screen is a plain closure. Click the How to use Controller in LoadRunner button to close the SLA.  

How to use Controller in LoadRunner

After you click How to use Controller in LoadRunner, you will see the main, Design Window of Controller with an SLA appearing. Have a look:

How to use Controller in LoadRunner

You can click on the How to use Controller in LoadRunner buttons to view SLA details. The Following window will open up:

How to use Controller in LoadRunner

Click How to use Controller in LoadRunner button to close the above window.

If you wish to delete an existing SLA, you can click on the How to use Controller in LoadRunner button. Upon clicking, you will get to see below confirmation message:

How to use Controller in LoadRunner

If you click on the How to use Controller in LoadRunnerbutton, you will see Advance options of an SLA.

It is advisable that you work with default option i.e. Internally Calculated Tracking Period. Have a look at the snapshot:

How to use Controller in LoadRunner

If you work with Internally Calculated Tracking Period, Analysis automatically sets the tracking period at which SLA statuses will be determined. This option has minimum tracking period set to 5 seconds.

On the other hand, you select Tracking Period to the desired number of seconds. Simply select the next radio button.

When executing an SLA based scenario, the execution process remains exactly the same.

Video on Controller

Please be patient. The Video will load in some time. If you still face issue viewing video click here