2017-07-26 95 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