Creating Vuser Groups - LoadRunner

A scenario consists of groups of Vusers that emulate human users interacting with your application. When you run a scenario, the Vusers generate load on the server, and LoadRunner monitors the server and transaction performance. Vuser groups are used to organize the Vusers in a scenario into manageable groups. You create Vuser groups that contain Vusers with shared or similar characteristics. For example, you can create a Vuser group for all Vusers that run the same Vuser script.

Understanding the Manual Scenario Mode Design Tab

When you create a manual scenario, the Controller displays the Scenario Schedule and Scenario Groups panes in the Design tab.

Understanding the Manual Scenario Mode Design TabUnderstanding the Manual Scenario Mode Design Tab

The Scenario Schedule pane displays information regarding the schedule profile: its name, the schedule mode, the duration of the scenario, and the load behavior. Load Preview displays a graph of the scenario schedule you defined. The Scenario Groups pane lists all enabled and disabled Vuser Groups, their paths, the number of Vusers assigned to each group, and the load generator machines. You can perform the following actions on a Vuser group or scenario:

  • Define the Group Name, Vuser Quantity, Load Generator machine(s), and Script(s) for the Vuser group
  • Add one or more load generator machines to the Vuser group and configure the load generator(s)
  • Add and configure one or more scripts to the Vuser group
  • Enable or disable a Vuser group for the scenario
  • Remove a Vuser group from the scenario
  • Schedule the Vuser group/scenario
  • Run the scenario
  • Stop the scenario
  • Reset the scenario
  • Configure scenario result settings

Adding a Vuser Group

Vuser groups can be created and added to a scenario using the Add Group dialog box.

To create Vuser Groups:

  1. Click the Add Group button to the right of the Scenario Groups pane. The Add Group dialog box opens:

    To create Vuser Groups

  2. In the Group Name box, enter a name for the Vuser group.
  3. From the Vuser Quantity box, select the number of Vusers that you want to create in the group.
  4. Select a load generator from the Load Generator Name list. To use a load generator that does not appear, select Add from the Load Generator Name list.

The Add New Load Generator dialog box opens:

New Load Generator dialog box

Type the name of the load generator in the Name box. In the Platform box, select the type of platform on which the load generator is running. By default, LoadRunner stores temporary files on the load generator during scenario execution, in a temporary directory specified by the load generator’s TEMP or TMP environment variables. To override this default for a specific load generator, type a location in the Temporary Directory box. To allow the load generator to take part in the scenario, checkEnable load generator to take part in the scenario.

Click More to expand the dialog box and show the Add Load Generator tabs. Click OK to close the Add New Load Generator dialog box.

  1. Select a script from the script list.
    To use a script that does not appear, click Browse. Browse to select the path and file name of the new script.
  2. Click OK to close the Add Group dialog box. The new group’s properties appear in the Scenario Groups pane.

Understanding the Add Group Dialog Box

Use the Add Group dialog box to insert a new group into the scenario.

Group Name: Enter the name of the new group you want to add. Note that the name is limited to a maximum of 55 characters.
Vuser Quantity: Select the number of Vusers you want to add to the group.

Load Generator Name: Select the name of the load generator machine for the new group. Choose a previously existing load generator from the list or create a new load generator by choosing Add. The Add Load Generator dialog box opens.

Select Script: Displays the available scripts in the current directory. The list contains all scripts that you previously added to the scenario.

  • Script Name: Select the script you want the Vuser group you are creating to use. The script appears in the Script Name column
  • Script Path: Displays the script directory’s path.
  • Browse: Select the path and file name of a script from a different directory. To use a VB Vuser script, select the .usr file.
    Note: When you specify the location of a script, you can specify a location that is relative to the current scenario directory.
  • Record: Opens the Virtual User Generator so that you can begin recording a script. For more information on recording scripts, see the Mercury Virtual User Generator User’s Guide.

Note: While a scenario is running, you can add Vuser groups to the scenario and enable them. However, if you add a Vuser group after all the Vusers in the scenario have been ramped up, the new group will not run in the scenario.

Deleting a Vuser Group

To delete a Vuser group, click the Remove Group button to the right of the Scenario Groups pane, or right-click the Vuser group and selectRemove Group.

Disabling a Vuser Group

By default, all the Vuser groups displayed in the Scenario Groups pane are enabled to run in the scenario. To disable a Vuser group, click the box to the left of the Vuser group name. The color of the group changes to gray, indicating that the group will not take part in the scenario. To re-enable the Vuser group, select the same box again.

Modifying a Vuser Group from the Scenario Groups Pane

You can modify the script, vuser quantity, and load generator for a Vuser group directly from the Scenario Groups pane of the Controller, or by using the Group Information dialog box.

To modify a Vuser Group directly from the Scenario Groups pane:

  1. Select the Group Name, Script Path, Quantity, or Load Generator you want to modify.
  2. Enter or select another name or number for the property.
  3. To modify a Vuser group script’s run-time settings, click the Run-TimeSettings button to the right of the Scenario Groups pane.
  4. To edit a Vuser group’s script, click the View Script button to the right of the Scenario Groups pane. LoadRunner’s script generation tool, VuGen, opens.

Modifying a Vuser Group Using the Group Information Dialog Box

The Group Information dialog box displays details about a Vuser group, and lets you modify the settings of a group.

To modify a Vuser Group using the Group Information dialog box:

  1. Click the Details button to the right of the Scenario Groups pane, or rightclick the property you want to modify and selectDetails. The Group Information dialog box opens.

    modify a Vuser Group using the Group Information dialog box

  2. In the Group Name box, enter the Vuser group name.
  3. From the Vuser Quantity box, select the number of Vusers that you want to run in the group.
  4. Select a load generator from the Load Generator Name list.
    To use a load generator that does not appear, select Add from the Load Generator Name list and add a new load generator using the Add Load Generator dialog box.
  5. To modify the run-time settings you specified while recording a script using VuGen, click Run-Time Settings.
  6. To edit a Vuser group’s script, click View Script. LoadRunner’s script generation tool, VuGen, opens.
  7. Click OK to close the Group Information dialog box.

Understanding the Group Information Dialog Box

Use the Group Information dialog box to display details about a Vuser group, and modify the settings of a group.

Group Name: Displays the current group name. To modify the name, type a new name in the Group Name box.

Load Generator Name: Displays the name of the selected Vuser’s load generator. To specify a different load generator, select one from the Load Generator Name list. Select Add from the Load Generator Name list to specify a new load generator.

Vuser Quantity: Displays the number of Vusers in the group.

Script: Displays details of the selected script.

  • Name: Displays the name of the script.
  • Path: Displays the script directory’s path.
  • Type: Displays the type of script.
  • View Script: Opens the Virtual User Generator, so that you can edit the script. For more information on editing scripts, see the Mercury Virtual User Generator User’s Guide.
  • Run-Time Settings: Opens the Run-Time Settings dialog box, enabling you to edit the script run-time settings you previously set using VuGen. If you did not set run-time settings for a script in VuGen, the default VuGen settings are displayed for all but the Log and Think Time tabs, which display the default Controller settings. For information on the run-time settings, see the VuGen Help.
    Refresh: Click this button and select Script to update the script details in the scenario, if you make any changes to a script while the Controller is running. Select Run-Time Settings to restore the initial run-time settings, if you modify the run-time settings from the Controller.
    More/Less: Reveals/hides the following:
  • Command Line: Type any command line options to use when running the script for example: -x value -y value. For information about passing command line argument values to a script, refer to the Mercury Virtual User Generator User’s Guide.
  • Rendezvous: Displays the rendezvous points defined for the selected script.
  • Vusers: Displays all Vusers associated with the selected script.
  • Files: Displays all files used by the script. To exclude a file from the list, clear the check box adjacent to it.
    Add: Click this button and select Add File orAdd Directory. Browse to the file or directory that you want to add to this list and click Open. The selected files/directories are added to the files list.
    Note: To run Visual C++ Vusers on a remote load generator machine, you must add the .dllof the Vuser to the Files used by script list.

Sorting Vuser Groups in the Scenario Groups Pane

Once you have created your Vuser groups, you can sort them by group name, script name, quantity of Vusers assigned to the group, or load generator name.

To sort Vuser groups:

  • Select the column by which you want to sort the groups. Click the column header.
  • Alternatively, you can right-click anywhere within the column you want to sort, and select Sort GroupsChoose to sort by name, path, quantity, or generator
  • To instruct the Controller to automatically sort a new Vuser group entry, right-click the entry and selectAuto Sort.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

LoadRunner Topics