Run scenarios with wlrun command

You can run scenarios from the command line using the wlrun command.

Use the wlrun command to invoke Controller

You can invoke Controller from the command line by typing wlrun in the command line, followed by the relevant arguments.

Note: Before invoking Controller using wlrun, you should be familiar with the rules relating to command line arguments. For details, see Notes for test runs with the wlrun command.

For example, to run the Scenario.lrs scenario, enter the following command:

wlrun -TestPath C:\LoadRunner\scenario\Scenario.lrs -Run

Back to top

wlrun runtime arguments

General arguments

These arguments specify the runtime related scenario settings. For more information on scenario settings, see Before running your scenario.

TestPath
Path to the scenario, for example, C:\LoadRunner\scenario\Scenario.lrs
This argument can also be used for a scenario residing in an Application Lifecycle Management database. For example, "[TD]\Subject\LoadRunner\Scenario1"
If the path includes blank spaces, use quotation marks.
Run
Runs the scenario, dumps all output messages into res_dir\output.txt, and closes Controller
InvokeAnalysis
Instructs LoadRunner Professional to invoke Analysis upon scenario termination. If this argument is not specified, LoadRunner Professional ses the scenario default setting.
SilentMode Suppresses the pop-up message which normally appears in the UI when Analysis is automatically invoked upon scenario termination.
ResultName
Full results path. For example, "C:\Temp\Res_01"
ResultCleanName
Results name. For example, "Res_01"
ResultLocation
Results folder. For example, "C:\Temp"

Application Lifecycle Management arguments

These arguments define the LoadRunner Professional integration with Application Lifecycle Management. For more information about this integration, see Managing scenarios using Application Lifecycle Management.

ConnectToQC
Specifies whether Controller should connect to ALM on startup (0/1 or ON/OFF)
QCServer
Application Lifecycle Management server name. Must be a machine where Application Lifecycle Management is installed
QCDB
Application Lifecycle Management database name. Use the format: <Domain name>.<Project name>.
UserName
User name for connecting to Application Lifecycle Management
Password
Password corresponding to the user name
TestPath
Path to scenario in Application Lifecycle Management database. For example,
"[TD]\Subject\LoadRunner\Scenario1"
If path includes blank spaces, use quotation marks.
TestId
Test ID (used by ALM only)
ResultCleanName
For use with ResultCycle only. Example: "Res1"
ResultCycle
Application Lifecycle Management cycle. For example, "LR_20_SP1_247"
Note: The ResultCycle and ResultCleanName arguments are required if you want to store the results within the Application Lifecycle Management database.

Back to top

Notes for test runs with the wlrun command

When you invoke Controller from the command line using wlrun, consider the following:

  • Only one instance of Controller can run at a time.

  • The arguments are case sensitive.

  • If Controller is invoked with no arguments in the command line, Controller uses its default settings.

  • Controller always overwrites results.

  • Controller automatically terminates upon scenario termination and results are collected. If you don't want Controller to automatically terminate upon scenario termination, add the flag -DontClose to the command line.

  • Controller launched through the command line behaves normally except when using the -Run option. Using the -Run option, dialogs and message boxes that usually open and require the user to close them in a usual launch, do not open in a command line launch.

  • When Analysis is started from the command line, use the -SilentMode argument to suppress the pop-up message which normally appears in the UI.

  • Controller's settings are loaded from wlrun7.ini, located in the <LoadRunner installation>\config folder.

Back to top

See also: