Search code examples
rubyteamcitycalabash-android

TeamCity not recognizing calabash-android


TeamCity not recognizing calabash-android when running tests.

I have following Command Line runner type in build steps that is running Custom script

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

But running the test fails with Exit code 1 showing this in log

[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

Solution

  • The error clearly says what's happened: 'calabash-android' is not recognized as an internal or external command, operable program or batch file., which means that this program is not in PATH variable.

    You should create a env.PATH variable in your build configuration with the value alike this:

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

    where %calabash_android_path% must be a variable with full path to the folder with calabash-android executable.