可以在批處理文件中使用TC的這些退出代碼,例如:
REM Clears the screen
CLS
@ECHO OFF
REM Launches TestComplete,
REM executes the specified project
REM and closes TestComplete when the run is over
START \W C:\TestCompleteFolder\Bin\TestComplete.exe /r /e C:\TestCompleteFolder\Projects\MyProj\MyProj.mds
IF ERRORLEVEL 3 GOTO CannotRun
IF ERRORLEVEL 2 GOTO Errors
IF ERRORLEVEL 1 GOTO Warnings
IF ERRORLEVEL 0 GOTO Suclearcase/" target="_blank" >ccess
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
命令行參數
TC的命令行參數如下所示:
TestComplete.exe [file_name [/run [(/project:project_name) | (/project:project_name /projectitem:item_name) | (/project:project_name /unit:unit_name /routine:routine_name)] [/exit]][/SilentMode][/ns]
可以指定運行整個TC項目,也可以指定執行某個單元的某個腳本程序,運行模式可以是安靜模式,還可以指定啟動TC時是否顯示Splash界面。
原文轉自:http://www.anti-gravitydesign.com