This section describes exit codes that TestExecute returns. These codes report the result of the last test:
Note: To learn exit codes returned by TestExecute Lite that comes with Device Cloud Parallel package and enables you to run cross-platform web tests in parallel, see TestExecute Lite (Device Cloud Parallel) - Exit Codes.
|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.|
The test cannot be run because of an error. Some typical errors are:
The test engine also returns the code 3, if you run a project or project suite and the test was stopped with a call to the
|4||The test run was stopped by the timeout specified with the
|127||Unable to launch TestExecute, because some TestExecute files are missing or the installation is damaged.|
|1000||Unable to launch TestExecute, because another instance of TestExecute is already running.|
|1001||Unable to start TestExecute, because there is not enough free disk space.|
|-1||Unable to launch TestExecute because the license check has failed and TestExecute cannot obtain a license.
You can find information on TestExecute licensing in TestExecute 14 Licensing Guide that is shipped with TestExecute.
To resolve licensing problems, please use the Licensing Troubleshooter on our web site:
You can obtain codes different from those above. They are provided by your operating system, firewalls, or third-party applications and overwrite TestExecute exit codes.
The exit codes that TestExecute returns depend on whether the project is configured to rerun failed tests. See the Control Test Execution Flow section in the TestComplete documentation.
Normally, these codes are of use when TestExecute is launched from a batch file. Here is a simple example:
|Note:||The following example uses the 32-bit version of TestExecute. If you use the 64-bit version, the TestExecute executable is located in the <TestExecute>\x64\Bin folder.|
REM Launches TestExecute
REM executes the specified project
REM and closes TestExecute when the run is over
C:\TestExecuteFolder\Bin\TestExecute.exe C:\Projects\MyProj\MyProj.mds /run /exit
IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
IF ERRORLEVEL 1000 GOTO AnotherInstance
IF ERRORLEVEL 127 GOTO DamagedInstall
IF ERRORLEVEL 4 GOTO Timeout
IF ERRORLEVEL 3 GOTO CannotRun
IF ERRORLEVEL 2 GOTO Errors
IF ERRORLEVEL 1 GOTO Warnings
IF ERRORLEVEL 0 GOTO Success
IF ERRORLEVEL -1 GOTO LicenseFailed
ECHO There is not enough free disk space to run TestExecute
ECHO Another instance of TestExecute is already running
ECHO TestExecute installation is damaged or some files are missing
ECHO Timeout elapsed
ECHO The script cannot be run
ECHO There are errors
ECHO There are warnings
ECHO No errors
ECHO License check failed
|When launching TestExecute 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.|