Distribute Vusers among Vuser groups

This task describes how to distribute Vusers in a performance test among the Vuser groups.

Vuser distribution methods

You distribute Vusers according to the Vuser distribution method you selected for the workload.

You select a Vuser distribution method for a performance test from the Workload Types dialog box. The type of workload you choose determines the type of schedule by which the test runs, and how the Vusers are distributed at runtime.

You can distribute the Vusers by number, by percentage (manually), by percentage using the relative distribution method, or by goal.

When distributing Vusers by percentage, you can use Smart Vuser allocation to provide better load balancing for your load generators. For details, see Smart Vuser allocation.

Note:  

  • If you change the workload, Scheduler settings are lost.

  • In workloads with group schedules, you can distribute Vusers by number only.

Back to top

Select a workload type

This task describes how to select a workload type for distributing Vusers in a performance test.

To select a workload type:

  1. Open the Workload Types dialog box:

    • In the Performance Test Designer window, select the Groups and Workload tab. Click the workload type dropdown.

    • In the LoadRunner Enterprise masthead, click the module name or the dropdown arrow and select Create a test.

  2. Select a workload type.

    You select a workload depending on the type of schedule and schedule run mode you want to use to run your test, and depending on how you want to distribute the Vusers among the Vuser groups in your test. For details on the different run modes, see Schedule run modes.

    Basic schedule, by test

    Select to configure all the Vuser groups to run together on the same test schedule, in the basic run mode.

    Vusers can be distributed:

    • By number. The Vusers are distributed by number.

    • By percentage. The Vusers are distributed by percentage.

    Basic schedule by group

    Select to configure each Vuser group to run on its own test schedule, in the basic run mode.

    In group schedules, Vusers are always distributed by number.

    Real-world schedule, by test

    Select to configure all the Vuser groups to run together on the same test schedule, in the real-world run mode.

    Vusers can be distributed:

    • By number. The Vusers are distributed by number.

    • By percentage. The Vusers are distributed by percentage.

    Real-world schedule, by group

    Select to configure each Vuser group to run on its own test schedule, in the real-world run mode.

    In group schedules, Vusers are always distributed by number.

    Goal-Oriented Schedule

    Select to define the goals you want your test to achieve. You can specify the number of Vusers to run simultaneously, or the number of Hits or Transactions Per Second. LoadRunner Enterprise automatically builds a schedule based on the selected goals. For details, see Distribute Vusers by goal.

    Note: When you select this workload type, the Goal Definition pane is displayed in the Performance Test Designer (the Scheduler is hidden).

Back to top

Distribute Vusers by number

This section describes the schedules that you can choose when distributing Vusers by number.

Basic schedule

In the Performance Test Designer window, in the Groups grid, select a group, and in the Vusers column, enter the number of Vusers to allocate to that group.

Real-world schedule

You define the number of Vusers when you define the test schedule. For details, see Define a schedule for the test.

For both run modes, the total number of the Vusers assigned to all the Vuser Groups is displayed in the Groups pane toolbar.

Note:  

  • This procedure assumes that you selected By number when you selected the workload for the test. For user interface details, see Vuser distribution methods.

  • The maximum number of Vusers you can distribute in the basic run mode is 2147483647.

Back to top

Distribute Vusers by percentage (manually)

This task describes how to distribute Vusers by percentage.

Note: This procedure assumes that you selected By percentage when you selected the workload for the test. For user interface details, see Vuser distribution methods.

To distribute Vusers by percentage:

  1. In the LoadRunner Enterprise masthead, click the module name or the dropdown arrow and selectTest Management. Select a performance test in the test management tree and click Edit Test.
  2. In the Performance Test Designer window, select the Groups and Workload tab.

  3. In the Groups pane, enter the percentage of the total number of Vusers to allocate to the group in the Vusers-100% column for each group. The total of all the groups' percentages must be exactly 100% for the test to be valid.

  4. Allocate a total number of Vusers to run in the test:

    Basic mode In the Groups pane, enter the number of Vusers in the Total Vusers box.
    Real-world mode You define the number of Vusers when you define the test schedule. For details, see Define a schedule for the test.

Back to top

Distribute Vusers by percentage (relative distribution)

This task describes how to distribute Vusers by percentage using the relative distribution method.

To distribute Vusers by percentage using relative distribution:

  1. In the LoadRunner Enterprise masthead, click the module name or the dropdown arrow and select Test Management (under Testing). Select a performance test in the test management tree and click Edit Test.

  2. In the Performance Test Designer window, select the Groups and Workload tab.

  3. In the Groups pane, select More > Relative Distribution.

  4. In the Relative Distribution dialog box, enter the following:

    Target Group Name The name of the target Vuser group.
    Ratio

    The part of total number of Vusers to distribute to the corresponding Vuser group.

    Example: To distribute 200 Vusers among the groups at a ratio of 1:1:3, type 1 for group1, 1 for group2, and 3 for group3.

    20% of the Vusers are assigned to group1, 20% to group2, and 60% to group3. That is, 40 Vusers are assigned to group1, 40 Vusers to group2, and 120 Vusers to group3.

  5. LoadRunner Enterprise calculates the percentage of Vusers to distribute to each Vuser group.

Back to top

Distribute Vusers by goal

This task describes how to distribute Vusers by goal. In a goal-oriented schedule, you define the goals you want your test to achieve, and LoadRunner Enterprise automatically builds a schedule for you based on these goals.

Note: You cannot run Network Virtualization while using a Goal-Oriented schedule.

To distribute Vusers by goal:

  1. Prerequisites

    Before setting up the test, decide which goal you want the test to reach.

    Goal Type Description
    Vusers Tests if your application can run a specified number of Vusers simultaneously. Running this type of goal-oriented schedule is similar to manually distributing Vusers by number.
    Hits per Second or Transactions per Second

    These goals test the strength of your server.

    When you define one of these goal types, the Controller divides the target defined by the minimum number of Vusers specified, and determines the target number of hits/transactions per second that each Vuser should reach.

  2. Assign each script a percentage of the total test target

    1. In the LoadRunner Enterprise masthead, click the module name or the dropdown arrow and select Test Management (under Testing). Select a performance test in the test management tree and click Edit Test.
    2. In the Performance Test Designer window, select the Groups and Workload tab.

    3. In the Groups grid, enter the percentage of the total goal you want each script to reach during the test in the Vusers-100% column for each group.

    Note: The total of all the groups' percentages must be exactly 100% for the test to be valid.

  3. Define a goal for the test

    1. In the Schedule tab, click the Goal definition for drop-down arrow, and select a goal type.

    2. Configure the goal settings:

      Reach Goal

      Enter the desired goal (number of Vusers to run, Hits Per Second, or Transactions Per Second).

      For the Transactions per Second goal type, you also specify a transaction name.

      Vusers

      Enter a minimum-maximum range of Vusers for the scheduler to run.

      Note: Available for Hits/Transactions Per Second only.

      Duration

      The amount of time (in days, hours, minutes, and seconds) to run the test after the target has been achieved.

      Goal Missed

      The action to be taken if the target cannot be reached.

      • Stop the test. Note that if you want to save results, you need to collate the results for the test run. For details, see Manage test results.

      • Continue test without reaching goal.

  4. Configure test options (optional)

    By default, LoadRunner Enterprise runs the test using the think time recorded in the script (this might require running additional Vusers in your test in order to reach your target). If necessary, you can disable this setting for the test. For details, see Configure general test options.

How LoadRunner Enterprise determines whether your goals were reached

After running each batch of Vusers, LoadRunner Enterprise evaluates whether the target for the batch was achieved.

If batch target not reached

LoadRunner Enterprise recalculates the target number of hits, transactions, or pages per Vuser, and readjusts the number of Vusers for the next batch to be able to achieve the defined goal. By default, a new batch of Vusers is released every two minutes.

If goal not reached after Controller has launched the maximum number of Vusers

LoadRunner Enterprise attempts to reach the defined target once more by recalculating the target number of hits or transactions, and running the maximum number of Vusers simultaneously.

Goal assigned failed status

A Hits/Transactions per Second goal-oriented schedule is assigned a Failed status if:

  • The Controller has twice attempted to reach the goal using the maximum number of Vusers specified, and the goal could not be reached.
  • No hits/transactions per second were registered after the first batch of Vusers was run.
  • The number of hits/transactions per second did not increase after the Controller ran a certain number of Vuser batches.
  • All the Vusers that ran failed.
  • There were no available load generators for the type of Vusers you attempted to run.

Back to top

See also: