LoadComplete Exit Codes

Applies to LoadComplete 4.97, last modified on May 20, 2019

LoadComplete.exe provides the following exit codes, which report on the results of the last test:

Exit Code Description
0 The last test did not produce errors or warnings.
1 The last test results include warnings but no errors.
2 The last test results include errors.
3 The test cannot be run because of an error. Some typical errors are:
  • The project path is specified incorrectly.
  • The test name is specified incorrectly.
  • LoadComplete is already running (only one instance of LoadComplete can be run at once on a single computer).
  • The specified project cannot be opened because the current user does not have appropriate permissions for this.

Normally, these codes are of use when LoadComplete is launched from a batch file:

REM Clears the screen
CLS
@ECHO OFF
REM Launches LoadComplete,
REM executes the specified test
REM and closes LoadComplete when the run is over
"C:\LoadCompleteFolder\Bin\LoadComplete.exe" "C:\LoadCompleteProjects\MyProj\MyProj.ltp" /test:Test1 /run /exit
IF ERRORLEVEL 3 GOTO CannotRun
IF ERRORLEVEL 2 GOTO Errors
IF ERRORLEVEL 1 GOTO Warnings
IF ERRORLEVEL 0 GOTO Success
 
:CannotRun
ECHO The script cannot be run
GOTO End
 
:Errors
ECHO There are errors
GOTO End
 
:Warnings
ECHO There are warnings
GOTO End
 
:Success
ECHO No errors
GOTO End
 
:End

When launching LoadComplete from a command line or batch file, it is not recommended to use the RunAs command, since this will significantly slow down the script execution.

See Also

LoadComplete Command Line
Scheduling Test Runs

Highlight search results