cancel
Showing results for 
Search instead for 
Did you mean: 

How to get TestExecute exit codes

SOLVED
Highlighted
Frequent Contributor

How to get TestExecute exit codes

Hi,

I am running my TestComplete tests via TestExecute using a batch file (on TeamCity). I want to be able to get information if a test failed. For this I am trying to get the exit codes shown here:

https://support.smartbear.com/testexecute/docs/running/automating/command-line/exit-codes.html

I am not sure how to get these exit codes. I tried running the batch file via a command prompt, but did not see any exit codes. I checked in the cmd window, exported log file. 

My command line:

"C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestExecute.exe" C:\svn\TestComplete\myProject\myProject.mds /run /project:Reg360 /test:"Smoke Tests|SmokeTest_04" /SilentMode /ExportLog:C:\Reg360_smoke_tests\Export_Logs\SmokeTest_04\SmokeTest_04_log.html /exit /Timeout:180

Thank you!

Regards,

Sameer

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: How to get TestExecute exit codes

Hi @sameerjade,

 

In the article you specified I see an example that works with the ERRORLEVEL variable. It looks like it contains the exit code

C:\TestExecuteFolder\Bin\TestExecute.exe C:\Projects\MyProj\MyProj.mds /run /exit

IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
IF ERRORLEVEL 1000 GOTO AnotherInstance
---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

2 REPLIES 2
Highlighted
Community Manager

Re: How to get TestExecute exit codes

Hi @sameerjade,

 

In the article you specified I see an example that works with the ERRORLEVEL variable. It looks like it contains the exit code

C:\TestExecuteFolder\Bin\TestExecute.exe C:\Projects\MyProj\MyProj.mds /run /exit

IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
IF ERRORLEVEL 1000 GOTO AnotherInstance
---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

Highlighted
Frequent Contributor

Re: How to get TestExecute exit codes

Thank you. That works!

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors