2017-07-26 55 views
0

當運行測試時,TeamCity無法識別calabash-android。TeamCity無法識別葫蘆android-

我有以下的運行自定義腳本

calabash-android run myorg.myapp.android.dev-Signed.apk --format html --out test_report.html --format pretty 

但在運行測試構建步驟的命令行亞軍型失敗,退出代碼1顯示該日誌

[14:17:37]Step 1/1: Run UI Tests (Command Line) 
[14:17:38][Step 1/1] Starting: C:\BuildAgent\temp\agentTmp\custom_script2560166106056025753.cmd 
[14:17:38][Step 1/1] in directory: C:\BuildAgent\work\8cb09469a30da521 
[14:17:38][Step 1/1] 'calabash-android' is not recognized as an internal or external command, 
[14:17:38][Step 1/1] operable program or batch file. 
[14:17:38][Step 1/1] Process exited with code 1 
[14:17:38][Step 1/1] Step Run UI Tests (Command Line) failed 

回答

1

這個錯誤清楚地說:發生了什麼事情:'calabash-android' is not recognized as an internal or external command, operable program or batch file.,這意味着這個程序不在PATH變量中。

你應該create一個env.PATH變量生成配置與此相似的值:

%calabash_android_path%%teamcity.agent.jvm.file.separator%bin%teamcity.agent.jvm.path.separator%%env.PATH% 

其中%calabash_android_path%必須是完整路徑與calabash-android可執行文件的文件夾的變量。

+0

想通了,我把它在用戶路徑而不是系統路徑。將其移至系統路徑解決了該問題。謝謝 – pixel

+0

順便說一句,你提供的路徑看起來很奇怪,你能解釋一下嗎?謝謝 – pixel