Running Scenarios Using the wlrun Command

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

Invoking the Controller using the wlrun command

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

Note: Before invoking Controller using wlrun, you should be familiar with the rules relating to command line arguments. For details, see Notes about running tests using 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 to invoke Analysis upon scenario termination. If this argument is not specified, LoadRunner uses 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 integration with Application Lifecycle Management. For more information about the LoadRunner Application Lifecycle Management integration, see Managing Scenarios Using Application Lifecycle Management.

ConnectToQC
Specifies whether the 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_60_SP1_247"
Note: The ResultCycle and ResultCleanNamearguments are required if you wish to store the results within the Application Lifecycle Management database.

Back to top

Notes about running tests using 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 will always overwrite results.

  • Controller will automatically terminate upon scenario termination and results will be 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: