Command Line Options - WinRunner

Following is a description of each command line option.

-addins list of add-ins to load

Instructs WinRunner to load the specified add-ins. In the list, separate the add-ins by commas (without spaces). This can be used in conjunction with the -addins_select_timeout command line option.

(Formerly -addons.)

-addins_select_timeout timeout

Instructs WinRunner to wait the specified time (in seconds) before closing the Add-In Manager dialog box when starting WinRunner. When the timeout is zero, the dialog box is not displayed. This can be used in conjunction with the -addins command line option.

(Formerly -addons_select_timeout.)

-animate

Instructs WinRunner to execute and run the loaded test, while the execution arrow displays the line of the test being run.

-app path

Runs the specified application before running WinRunner. This can be used in conjunction with the -app_params, -app_open_win, and -WR_wait_time command line options.

Note that you can also define a startup application in the Run tab of the Test Properties dialog box. For more information, see “Setting Properties for a Single Test.”

-app_params param1[,param2,...,paramN]

Passes the specified parameters to the application specified in -app.

-app_open_win setting

Determines how the application window appears when it opens.

The following are the possible values for setting:

possible values for setting

-auto_load {on | off}

Activates or deactivates automatic loading of the temporary GUI map file.

(Default = on)

-auto_load_dir path

Determines the folder in which the temporary GUI map file (temp.gui) resides. This option is applicable only when auto load is on.

(Default = M_Homedat)

-batch {on | off}

Runs the loaded test in Batch mode.

(Default = off)

You can also set this option using the Run in batch mode check box in the Run category of the General Options dialog box as described in “Setting Test Run Options”.

Note that you can use the getvar function to retrieve the value of the corresponding batch testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-beep {on | off}

Activates or deactivates the WinRunner system beep.

You can also set this option using the corresponding Beep when checking a window check box in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding beep testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-capture_bitmap {on | off }

Determines whether WinRunner captures a bitmap whenever a checkpoint fails. When this option is on (1), WinRunner uses the settings from the Run > Settings category of the General Options dialog box to determine the captured area for the bitmaps.

(Default = off)
You can also set this option using the Capture bitmap on verification failure check box in the Run > Settings category of the General Options dialog box, as described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding capture_bitmap testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-create_text_report {on | off}

Instructs WinRunner to write test results to a text report, report.txt, which is saved in the results folder.

-create_unirep_info {on | off}

Generates the necessary information for creating a Unified Report (when WinRunner report view is selected) so that you can choose to view the Unified Report of your tests at a later time.

(Default = on)

You can also set this option using the corresponding Create unified report information option in the Run category of the General Options dialog box as described in “Setting Test Run Options”.

-cs_fail {on | off}

Determines whether WinRunner fails a test when Context Sensitive errors occur. A Context Sensitive error is the failure of a Context Sensitive statement during a test. Context Sensitive errors are often due to
WinRunner’s failure to identify a GUI object.

For example, a Context Sensitive error will occur if you run a test containing a set_window statement with the name of a non-existent window. Context Sensitive errors can also occur when window names are ambiguous.

(Default = off)
You can also set this option using the corresponding Fail test when Context Sensitive errors occur check box in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding cs_fail testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-cs_run_delay non-negative integer

Sets the time (in milliseconds) that WinRunner waits between executing Context Sensitive statements when running a test.

(Default = 0 [milliseconds])

You can also set this option using the corresponding Delay between execution of CS statements box in the Run > Synchronization category of the General Options dialog box, described in “Setting Run Synchronization Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding cs_run_delay testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-def_replay_mode {verify | debug | update}

Sets the run mode that is used by default for all tests .

Possible values:

  • Update—Used to update the expected results of a test or to create a new expected results folder.
  • Verify—Used to check your application.
  • Debug—Used to help you identify bugs in a test script.

(Default = Verify)

You can also set this option using the Default run mode option in the Run category of the General Options dialog box as described in “Setting Test Run Options”.

-delay_msec non-negative integer

Directs WinRunner to determine whether a window or object is stable before capturing it for a bitmap checkpoint or synchronization point. It defines the time (in milliseconds) that WinRunner waits betweenconsecutive samplings of the screen. If two consecutive checks produce the same results, WinRunner captures the window or object. (Formerly -delay, which was measured in seconds.)

(Default = 1000 [milliseconds])

(Formerly -delay.)

You can also set this option using the corresponding Delay for window synchronization box in the Run > Synchronization category of the General Options dialog box, described in “Setting Run Synchronization Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding delay_msec testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-dont_connect

If the Reconnect on startup option is selected in the Connection to Test Director dialog box, this command line enables you to open WinRunner without connecting to Test Director.

To disable the Reconnect on startup option, select Tools > TestDirector Connection and clear the Reconnect on startup check box as described in “Running Tests from the Command Line”.

-dont_quit

Instructs WinRunner not to close after completing the test.
-dont_show_welcome

Instructs WinRunner not to display the Welcome window when starting
WinRunner.

-email_service

Determines whether WinRunner activates the e-mail sending options including the e-mail notifications for checkpoint failures, test failures, and test completed reports as well as any email_send_msg statements in the test.

(Default = off)

You can also set this option using the corresponding Activate e-mail service check box in the Notifications > E-mail category of the General Options dialog box as described in “Setting E-mail Notification Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding email_service testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-exp expected results folder name

Designates a name for the subfolder in which expected results are stored. In a verification run, specifies the set of expected results used as the basis for the verification comparison.

(Default = exp)

You can also view this setting using the corresponding Expected results folder box in the Current Test tab of the Test Properties dialog box, described in “Reviewing Current Test Settings”.

Note that you can use the getvar function to retrieve the value of the corresponding exp testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-fast_replay {on | off}

Sets the speed of the test run for tests recorded in analog mode. on sets tests to run as fast as possible and off sets tests to run at the speed at which they were recorded.

Note that you can also specify the analog run speed using the Run speed for Analog mode option in the Run category of the General Options dialog box as described in “Setting Test Run Options”.

(Default = on)

-f file name

Specifies a text file containing command line options. The options can appear on the same line, or each on a separate line. This option enables you to circumvent the restriction on the number of characters that can be typed into the Target text box in the Shortcut tab of the Windows Properties dialog box.

-fontgrp group name

Specifies the active font group when WinRunner is started.

You can also set this option using the corresponding Font group box in the Record > Text Recognition category of the General Options dialog box, described in “Setting Text Recognition Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding fontgrp testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-ini initialization test name

Defines the wrun.ini file that is used when WinRunner is started. This file is read-only, unless the -update_ini command line option is also used.

-min_diff non-negative integer

Defines the number of pixels that constitute the threshold for an image mismatch.

(Default = 0 [pixels])

You can also set this option using the corresponding Threshold for difference between bitmaps box in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding min_diff testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-mismatch_break {on | off}

Activates or deactivates Break when Verification Fails before a verification run. The functionality of Break when Verification Fails is different than when running a test interactively: In an interactive run, the test is paused; For a test started from the command line, the first occurrence of a comparison mismatch terminates the test run.

Break when Verification Fails determines whether WinRunner pauses the test run and displays a message whenever verification fails or whenever any message is generated as a result of a Context Sensitive statement during a test that is run in Verify mode.

For example, if a set_window statement is missing from a test script, WinRunner cannot find the specified window. If this option is on, WinRunner pauses the test and opens the Run wizard to enable the user to locate the window. If this option is off, WinRunner reports an error in the Test Results window and proceeds to run the next statement in the test script.

(Default = on)

You can also set this option using the corresponding Break when verification fails check box in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding mismatch_break testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-rec_item_name {0 | 1}

Determines whether WinRunner records non-unique ListBox and ComboBox items by name or by index.

(Default = 0)

You can also set this option using the corresponding Record non-unique list items by name check box in the Record category of the General Options dialog box, described in “Setting Recording Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding rec_item_name testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-run

Instructs WinRunner to run the loaded test. To load a test into the WinRunner window, use the -t command line option.

-run_minimized

Instructs WinRunner to open and run tests with WinRunner and the test minimized to an icon. Note that specifying this option does not itself run tests: use the -t command line option to load a test and the -run command line option to run the loaded test.

-search_path path

Defines the directories to be searched for tests to be opened and/or called. The search path is given as a string.

(Default = startup folder and installation folderlib)

You can also set this option using the corresponding Search path for called tests box in the Folders category of the General Options dialog box, described in “Setting Folder Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding searchpath testing option from within a test script, as described in “Setting Testing Options from a TestScript.”

-single_prop_check_fail {on | off}

Fails a test run when _check_info statements fail. It also writes an event to the Test Results window for these statements. (You can create _check_info statements using the Insert > GUI Checkpoint > For Single Property command.)

You can use this option with the setvar and getvar functions.

(Default = on)

You can also set this option using the corresponding Fail test when single property check fails option in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding single_prop_check_fail testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-speed {normal | fast}

Sets the speed for the execution of the loaded test.

(Default = fast)

You can also set this option using the corresponding Run Speed for Analog Mode option in the Run category of the General Options dialog box, described in “Setting Test Run Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding speed testing option from within a test script, as described in “Setting Testing Options from a Test Script.”
(Formerly -run_speed.)
-start_minimized {on | off}

Indicates whether WinRunner opens in minimized mode.

(Default = off)

-t test name

Specifies the name of the test to be loaded in the WinRunner window. This can be the name of a test stored in a folder specified in the search path or the full pathname of any test stored in your system.
-td_connection {on | off}

Activates WinRunner’s connection to TestDirector when set to on.

(Default = off)

(Formerly -test_director.)

Note that you can connect to TestDirector from the TestDirector Connection dialog box, which you open by choosing Tools > TestDirector Connection. For more information about connecting to TestDirector, see “Managing the Testing Process.”

-td_cycle_name cycle name

Specifies the name of the current test cycle. This option is applicable only when WinRunner is connected to TestDirector.

Note that you can use the corresponding td_cycle_name testing option to specify the name of the current test cycle, as described in “Setting Testing Options from a Test Script.”

(Formerly -cycle.)
-td_database_name database path

Specifies the active TestDirector database. WinRunner can open, execute, and save tests in this database. This option is applicable only when WinRunner is connected to TestDirector.

Note that you can use the corresponding td_database_name testing option to specify the active TestDirector database, as described in “Setting Testing Options from a Test Script.”

Note that when WinRunner is connected to TestDirector, you can specify the active TestDirector project database from the TestDirector Connection dialog box, which you open by choosing Tools > TestDirector Connection. For more information, see “Managing the Testing Process.”

(Formerly -database.)

-td_password password

Specifies the password for connecting to a database in a TestDirector server.

Note that you can specify the password for connecting to TestDirector from the TestDirector Connection dialog box, which you open by choosing Tools > TestDirector Connection. For more information about connecting to TestDirector, see “Managing the Testing Process.”

-td_server_name server name

Specifies the name of the TestDirector server to which WinRunner connects. Note that you can use the corresponding td_server_name testing option to specify the name of the TestDirector server to which WinRunner connects, as described in “Setting Testing Options from a Test Script.”

In order to connect to the server, use the td_connection option.

(Formerly -td_server.)

-td_user_name user name

Specifies the name of the user who is currently executing a test cycle.
Note that you can use the corresponding td_user_name testing option to specify the user, as described in “Setting Testing Options from a Test Script.”

Note that you can specify the user name when you connect to TestDirector from the TestDirector Connection dialog box, which you open by choosing Tools > TestDirector Connection. For more information about connecting to TestDirector, see “Managing the Testing Process.”

(Formerly -user_name or user.)

-timeout_msec non-negative integer

Sets the global timeout (in milliseconds) used by WinRunner when executing checkpoints and Context Sensitive statements. This value is added to the time parameter embedded in GUI checkpoint orsynchronization point statements to determine the maximum amount of time that WinRunner searches for the specified window or object. (Formerly timeout, which was measured in seconds.)

(Default = 10,000 [milliseconds])

(Formerly -timeout.)

You can also set this option using the corresponding Timeout for checkpoints and CS statements box in the Run > Settings category of the General Options dialog box, described in “Setting Run Setting Options”.

Note that you can use the setvar and getvar functions to set and retrieve the value of the corresponding timeout_msec testing option from within a test script, as described in “Setting Testing Options from a Test Script.”

-tslinit_exp expected results folder

Directs WinRunner to the expected folder to be used when the tslinit script is running.

-update_ini

Saves changes to configuration made during a WinRunner session when the wrun.ini file is specified by the -ini command line option.

-verify verification results folder name

Specifies that the test is to be run in Verify mode and designates the name of the subfolder in which the test results are stored.

-WR_wait_time non-negative integer

Specifies the number of milliseconds to wait between invoking the application and starting WinRunner.

(Default = 0 [milliseconds])

You can also set this option using the Run test after box in the Run tab of the Test Properties dialog box, described in “Setting Properties for a Single Test.


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

WinRunner Topics