This Blog will help you to get an idea about performance Testing & Engineering concepts
Add Script Dialog Box
This dialog box enables you to add Vuser scripts to a scenario.
To access |
Use one of the following:
|
Important information |
While a scenario is running, you can add scripts to the scenario and enable them. However, if you add a script after all the Vusers in the scenario have started running, the added script will not run in the scenario.
|
Relevant tasks | |
See Also |
User interface elements are described below:
UI Element
|
Description
|
---|---|
Enables you to add Vuser scripts to the list of scripts. | |
Opens VuGen for recording a new Vuser script. For more information, see Record a Vuser Script.
| |
Use existing LoadRunner script |
Lists the available scripts that have been added to the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select Show Paths.
|
Use a Noise Generator script with the following URL |
The URL to which you want to apply noise testing. You can provide a server name, IP address, or a full URL. After a URL is used once, it appears in a dropdown list.
LoadRunner automatically generates a script name using the following format:Noise_<domain>_<index>, e.g. Noise_HP_1.
Note: There is no built-in validation, so you must verify that the URL you provide is operational.
|
Add Group Dialog Box
This dialog box enables you to add Vuser groups to participate in a scenario.
To access |
Manual scenario > Design tab > Scenario Groups/Scripts pane > Add Group
|
Important information |
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 started running, the new group will not run in the scenario.
|
Relevant tasks | |
See also |
User interface elements are described below:
UI Element
|
Description
|
---|---|
Enables you to add Vuser or JMeter scripts to the list of scripts.
| |
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see Record a Vuser Script.
| |
Group Name |
The name of the Vuser group.
When you select a script the Vuser group is automatically given the same name as the script. You can modify the group name.
Note: The name is limited to a maximum of 55 characters.
|
Vuser Quantity |
The number of Vusers to add to the group. The default value is 1.
|
Load Generator Name |
The load generator assigned to the Vuser group.
To add a load generator to this list, select Add from the list. For user interface details, see Add New Load Generator/Load Generator Information Dialog Box.
|
Use existing LoadRunner Script |
Lists the available scripts that have been added to the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select Show Paths.
Note: If a script uses Unique file parameterization, running more than one Vuser group with that script in the same scenario may cause unexpected scenario results. For more information about Unique file parameterization, see Data Assignment Methods for File-Type Parameters.
|
Use a Noise Generator script with the following URL |
The URL to which you want to apply noise testing. You can provide a server name, IP address, or a full URL. After a URL is used once, it appears in a dropdown list.
LoadRunner automatically generates a script name using the following format:Noise_<domain>_<index>, e.g. Noise_HP_1.
Note: There is no built-in validation, so you must verify that the URL you provide is operational.
|
Vuser Statuses
The following table describes the possible statuses of Vusers before, during, and after a scenario run.
Down
|
The Vuser is down.
|
Pending
|
The Vuser is ready to be initialized and is waiting for an
available load generator, or is transferring files to the load generator. The Vuser will run when the conditions set in its scheduling attributes are met. |
Initializing
|
The Vuser is being initialized on the remote machine.
|
Ready
|
The Vuser already performed the init section of the script and is ready to run.
|
Running
|
The Vuser is running. The Vuser script is being executed on a load generator.
|
Rendezvous
|
The Vuser has arrived at the rendezvous point and is waiting to be released by LoadRunner.
|
Done.Passed
|
The Vuser has finished running. The script passed.
|
Done.Failed
|
The Vuser has finished running. The script failed.
|
Error
|
A problem occurred with the Vuser. Check the Status field on the Vuser dialog box or the output window for a complete explanation of the error.
|
Gradual Exiting
|
The Vuser is completing the iteration or action it is running (as defined in Tools > Options > Runtime Settings) before exiting.
|
Exiting
|
The Vuser has finished running or has been stopped, and is now exiting.
|
Stopped
|
The Vuser stopped when the Stop command was invoked.
|
Relative Paths for Scripts
You can specify a relative location for a script in your scenario. The location can be relative to the current scenario folder, or relative to the LoadRunner installation folder.
When you run a scenario, the script is automatically copied from this relative location to a temporary folder on the load generator running the script. This enables the load generator to access the script locally instead of over a network.
To specify a path relative to the current scenario director, type either of the following notations at the start of the script path:
.\
|
Indicates that the path is relative to the location of the scenario folder
|
..\
|
Indicates that the path is relative to the location of the parent folder of the scenario folder
|
For example, if the current scenario is located at
F:\scenarios
, to specify that the script, user1, is located in F:\scenarios\scripts
, you could type:.\scripts\user1
To specify a path relative to the LoadRunner installation folder, type a percent sign (
%
) at the beginning of the script path. For example, if the LoadRunner installation folder is located at F:\LoadRunner
, to specify that the script, user1, is located in F:\LoadRunner\scripts
, you could type:%\scripts\user1
How to View/Modify Scripts in the Scenario
This section describes how to view and modify scripts used in your load test scenario.
You view/modify the details of the scripts in the Group Information dialog box (see Group Information Dialog Box) or in the Script Information dialog box (see Script Information Dialog Box).
In this topic:
- View script details
- Modify a script's runtime settings
- Modify multiple scripts' runtime settings
- View/Edit a script in VuGen
- Specify command line options
- View rendezvous points included in the script
- View Vusers associated with the script
- View files associated with the script
View script details
You can view the details of a script by right-clicking the script in the Scenario Groups/Scripts pane and selecting Details.
In the Group/Script Information dialog box that opens, you can:
- View details about the script, including:
Note: If you do not see some of the details listed below, click More.
- Script path
- Command line options
- Rendezvous points included in the script
- Vusers associated with the script
- Files associated with the script
- Open the script in VuGen by clicking the View Script button
- View the script's runtime settings by clicking the Runtime Settings button
Modify a script's runtime settings
- To view or modify a script's runtime settings, in the Scenario Groups/Scripts pane right-click the script and select Runtime Settings.
- To view or modify runtime settings of a script associated with a particular Vuser, in the Vusers dialog box (Scenario Groups pane > Vusers ) right-click the Vuser and select Runtime Settings.
Modifying the runtime settings for one Vuser in a group modifies the runtime settings for all the Vusers in that group that are using the same script.
Modify multiple scripts' runtime settings
This section describes how to modify runtime settings of multiple scripts or of a Vuser group that includes multiple scripts.
- In the Scenario Groups/Scripts pane select multiple scripts or the Vuser group that includes multiple scripts.
- Right-click the selection and select Runtime Settings.
- In the Multiple runtime settings Mode dialog box that opens:
- To modify runtime settings for all of the scripts simultaneously, click Shared RTS.
- To modify runtime settings per script, click Individual RTS.For user interface details, see Multiple Runtime Settings Mode Dialog Box.
- For details about specific runtime settings, see Runtime Settings Overview.
- When you modify the runtime settings from the Controller, LoadRunner runs the script using the modified settings.
View/Edit a script in VuGen
To view/edit a script included in your scenario, right-click the script and select View Script. The script opens in VuGen. For more information on editing scripts, see the Debugging Overview.
Specify command line options
You can specify command line options to use when running a script.
- In the Scenario Groups/Scripts pane, right-click the script and select Details.
- In the Group/Script Information dialog box that opens, if Command line is not displayed near the bottom, click More.
- Enter a command in the command line, for example:
-x value -y value.
For information about passing command line argument values to a script, see Enhance a Java Script.
View rendezvous points included in the script
- In the Scenario Groups/Scripts pane, right-click the script and select Details.
- In the Group/Script Information dialog box, if the Rendezvous tab is not displayed near the bottom, click More.If there are rendezvous points included in the script, they are displayed in the Rendezvous tab. For details about rendezvous points, see Rendezvous Points Overview.
- In the Scenario Groups/Scripts pane, right-click the script and select Details.
- In the Group/Script Information dialog box, if the Vusers tab is not displayed near the bottom, click More.The Vusers tab displays the Vusers associated with the script.
View files associated with the script
- In the Scenario Groups/Scripts pane, right-click the script and select Details.
- In the Group/Script Information dialog box, if the Files tab is not displayed near the bottom, click More.
By default, the Files tab lists all the files in the script's folder (only after your script has been added to the script list). These files include the configuration settings file, the init, run, and end portions of the script, the parameterization definitions file, and the .usr file. To add a file to the list, click Add.
Example:
To run Visual C++ Vusers on a remote load generator, you must add the .dll of the Vuser to the list of files.
You can delete the files that you add, but not the other files listed.
How to Change the Scenario Mode (Manual Scenario)
This task describes how to change a manual scenario from Vuser group mode to percentage mode, and vice versa.
For details about the scenario modes and the effects of changing from one to another, see Manual Scenarios.
- To convert the scenario from Vuser group mode to percentage mode, select Scenario > Convert Scenario to the Percentage Mode.
- To convert the scenario from percentage mode to Vuser group mode, select Scenario > Convert Scenario to the Vuser Group Mode.
Note: By default, every time you convert from one mode to another, a message appears warning you that scenario and schedule settings may change. To show/hide this warning message, select Scenario > Show Convert Scenario Mode Warning.
How to Design a Manual Scenario
This task describes how to design a manual scenario.
In this topic:
- 1. Prerequisites
- 2. Open a scenario, or create a new one
- 3. Add load generators to the scenario
- 4. Add Vuser groups/scripts to the scenario - Vuser group mode
- 5. Add Vuser groups/scripts to the scenario - Percentage mode
- 6. Define a virtual location for the scenario - optional
- 7. Define a schedule for the scenario
- 8. Define service level agreements for the scenario - optional
1. Prerequisites
- When designing a manual scenario, plan how you want to distribute the Vusers in the scenario. For more details, see Manual Scenarios.
- Before you start designing the scenario, record the VuGen scripts that will run in the scenario. For details, see Record a Vuser Script.
2. Open a scenario, or create a new one
- On the main Controller toolbar, click the New Scenario button .
- In the New Scenario dialog box, select Manual Scenario.
- (Optional) To distribute the Vusers by percentage, select the Use the Percentage mode... option.
- (Optional) Select scripts to participate in the scenario. If you do not select the scripts here, you can select them later on.Note: If a script was created in a version of VuGen or TruClient that is later than the Controller version, the script may not run. In this case you may be prompted whether to allow the script to run. A notice will be put in the Load Generator log.
Note: You can convert from one scenario mode to another at any time. For details, How to Change the Scenario Mode (Manual Scenario).
When you click OK, the scenario opens in the Design tab.
3. Add load generators to the scenario
Click the Load Generators button . In the Load Generators dialog box that opens, click Add and enter the details of the load generator you are adding. For details about adding load generators, see Add New Load Generator/Load Generator Information Dialog Box.
4. Add Vuser groups/scripts to the scenario - Vuser group mode
- In the Scenario Groups pane, click the Add Group button .
- In the Add Group dialog box:
- Give the group a name and assign a number of Vusers to the group.
- Select a load generator on which to run the Vusers.
- Select a Vuser script.
5. Add Vuser groups/scripts to the scenario - Percentage mode
- Click the Add Group button and select a Vuser script from the list. Repeat this step for all scripts that you want to include inthe test.
- In the Scenario Scripts pane's Load Generator column, select load generators on which to run the scripts.
- In the Scenario Scripts pane's % column, assign a percentage of the total number of Vusers for each script. Assign percentages to the scripts starting with the first script in the table and moving down the list.
6. Define a virtual location for the scenario - optional
If you have Network Virtualization installed, click in the Virtual Location column, and select a location. For details, see Network Virtualization Locations.
Back to top7. Define a schedule for the scenario
Define a schedule by which to run the Vusers in the scenario. For details, see How to Define a Schedule for the Scenario.
Back to top8. Define service level agreements for the scenario - optional
You can define service level agreements (SLAs) to measure scenario goals over time intervals, or over a whole scenario run. When you later analyze the run using LoadRunner Analysis, this data is compared against the SLAs and SLA statuses are determined for the defined measurements. To define SLAs, see How to Define Service Level Agreements.
Subscribe to:
Posts (Atom)