In general, the LoadComplete command line is as follows:
LoadComplete.exe [file_name [/run [/test:test_name] ]
[/RunBatch:BatchName [/Delay:"days:hours:minutes"] [/TimeLimit:"days:hours:minutes"] ] ]
[/exit] [/SilentMode] [/exportlog:File_name [/SkipOk] ] [/ForceConversion] [/ns]
Here the square brackets mean that an argument or a group of arguments is optional. Below is a description of command-line arguments accepted by the LoadComplete executable:
-
file_name - Launches LoadComplete and loads the specified project (.ltp file) into it.
-
/run (or /r) - Commands LoadComplete to execute a test specified by the Test_name argument (see below) and provided by the project specified by the file_name argument:
-
/test:Test_name - Used along with /run. Specifies the name of the test to be executed.
-
-
/RunBatch:BatchName - Commands LoadComplete to execute the specified batch. The batch must exist in your project. If the batch name includes spaces, enclose it in quotes.
LoadComplete runs the batch using the settings you specified in the batch run editor. If you enabled the Export summary or Export details setting for the batch, LoadComplete will export the result of each test to PDF and XML files. You can find them in the <YourProject>/Logs/<BatchName>_DateTime-of-the-Run folder.
The /RunBatch argument has a lower priority than /run. Also, LoadComplete ignores the /exportlog argument if /RunBatch is specified.
-
/Delay:"days:hours:minutes" - This argument must be used along with /RunBatch. It specifies the time that will pass after LoadComplete starts and before it runs the batch specified by the /RunBatch argument. Make sure the value is enclosed in quotes.
-
/TimeLimit:"days:hours:minutes" - This argument must be used along with /RunBatch. It specifies a timeout for the batch run. Make sure the value is enclosed in quotes.
-
-
/exit (or /e) - If this argument is used along with the /run or /RunBatch argument, LoadComplete will close after the test or batch execution is over. If the /run argument is not specified, /exit is ignored.
Note that if you run tests, the project file will be changed because it will contain a reference to the new log file. LoadComplete will display the dialog asking you to save the changes. To suppress displaying the dialog on exit, specify the /SilentMode command-line argument along with /exit.
-
/SilentMode - If this argument is specified, LoadComplete works in Silent mode. It neither displays dialogs, nor informs you about errors or warnings. It handles the dialogs and messages as if you press their default button. LoadComplete posts information about these dialogs and messages to the Silent.log file residing in --
-
<System_Drive>:\Users\<UserName>\AppData\Roaming\SmartBear\LoadComplete\4.0 (the file must not be read-only or locked by another application)
LoadComplete posts information on errors occurring during the test run to the test log.
-
-
/exportlog:File_name (or /el:File_name) - Exports the test run results to the .pdf, .mht, .xml (in plain XML format), .csv or .zip file specified by the File_name parameter.
It is recommended that File_name specify the fully-qualified file name. If this parameter contains the file name only (no path is specified), LoadComplete will save the file to the current LoadComplete folder (by default, it is the project folder).
For detailed information on the data the exported results contain, see Exporting Test Results.
/exportlog is ignored if /RunBatch is specified.
-
/SkipOk - Used along with /exportlog. If specified, the test run results exported to the .xml or .csv format will skip successful log items and contain errors and warnings only.
-
- /ForceConversion - If this argument is specified and LoadComplete is running in Silent mode, LoadComplete automatically converts projects created in earlier versions of the tool to the new format when they are opened.
- /ns - Opens LoadComplete without displaying the splash screen.
Remarks
-
It is not recommended to launch LoadComplete using the
runas
command, since this significantly slows down the test execution. -
Pay attention to the colon between the argument name and the element to which the argument refers. The colon separates the argument name and the element name. Do not insert spaces before or after the colon.
-
If the project, test or batch name includes spaces, it must be enclosed in double quotes: /test:"My test".
Note: Starting from version 4.90, LoadComplete automatically removes spaces at the beginning and end of project item names. To run projects created in earlier LoadComplete versions and containing items with spaces at the end of their name, from the command line, specify their name without trailing spaces.
-
The argument names can be shortened. /run can be replaced with /r, /test - with /t, /exit - with /e and /exportlog - with /el.
Examples
Below are several examples of running LoadComplete via the command line.
Note: | The sample command lines below may split into two or more lines. This is a visual effect that depends on the width of the help viewer’s window. When specifying a command line for LoadComplete, type all command-line arguments into the same line. |
-
The following command runs LoadComplete, loads the specified project (MyProject.ltp) and tells LoadComplete to execute the Test1 test:
"C:\Program Files (x86)\SmartBear\LoadComplete\Bin\LoadComplete.exe" "C:\My Projects\MyProject.ltp" /r /t:Test1
-
The following command runs LoadComplete, loads the specified project (MyProject.ltp) and tells LoadComplete to execute the Test1 test. LoadComplete waits until the run is over and then gets closed.
"C:\Program Files (x86)\SmartBear\LoadComplete\Bin\LoadComplete.exe" "C:\Work\My Projects\MyProject.ltp" /r /t:Test1 /e
-
The following command runs LoadComplete, loads the specified project (MyProject.ltp) and tells LoadComplete to execute the Test1 test. After the run is over, LoadComplete exports the test run results to the specified .pdf file and then gets closed.
"C:\Program Files (x86)\SmartBear\LoadComplete\Bin\LoadComplete.exe" "C:\Work\My Projects\MyProject.ltp" /r /t:Test1 /el:"C:\Test run results\Exported log.pdf" /e
-
The following command starts LoadComplete, loads the specified project and runs the batch My Batch 1. It delays the batch start for half an hour and sets 2 hours as the maximum execution time for the batch:
"C:\Program Files (x86)\SmartBear\LoadComplete\Bin\LoadComplete.exe" "C:\Work\My Projects\MyBatchRunProject.ltp" /RunBatch:"My Batch 1" /Delay:"00:00:30" /TimeLimit:"00:02:00" /e
Note that LoadComplete waits until the specified test is executed in all the examples above. However, the command line is ready to receive new commands right after LoadComplete has been launched.
If you want the command line to wait until the test execution is over, you can use the START
command, for example.
start /wait "LoadComplete" "C:\Program Files (x86)\SmartBear\LoadComplete\Bin\LoadComplete.exe" "C:\Work\My Projects\MyProject.ltp" /run /test:Test1 /exit /SilentMode
See Also
LoadComplete Exit Codes
Scheduling Test Runs
Exporting Load Test Report