How to display ERRORLEVEL value in test execute run
Hi,
I'm running tests with Test Execute and use echo to display any info. on the console.
I have some conditions for ERRORLEVEL in bat files. But, I am not able to display ERRORLEVEL value using echo ERRORLEVEL, this is to check the value and apply a required action if that error happens.
Example code:
TestExecute.exe "C:\Work\SmartBear\TestExecute\Projects\My\MySuite.pjs" /r /p:MyProj
echo ERRORLEVEL
if ERRORLEVEL 4 (goto Block1)
if ERRORLEVEL 3 (goto Block2)
I know the codes provided by Smart Bear website, but there's something missing in the code, my test run stops so that means the ERRORLEVEL is not 3 or 4. Please note that I have disabled/unchecked 'Show Notification when exception occurs' option in Test Complete properties thinking I wouldn't need to manually press OK on exception dialog while test execute is running.
Thanks
You can do,
echo %ERRORLEVEL%