TeamCity在运行测试时无法识别calabash-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
答案 0 :(得分:1)
错误清楚地说明发生了什么:'calabash-android' is not recognized as an internal or external command, operable program or batch file.
,这意味着此程序不在PATH
变量中。
您的构建配置中应该this blog post env.PATH
变量的值与此类似:
%calabash_android_path%%teamcity.agent.jvm.file.separator%bin%teamcity.agent.jvm.path.separator%%env.PATH%
其中%calabash_android_path%
必须是一个变量,其中包含calabash-android
可执行文件夹的完整路径。