Use calabash-android to execute Android UI tests but occurred an error in env.rb file in iOS folder


When using calabash to do UI tests, I encountered an error:

Running calabash-android test…
$ calabash-android “run” “/bitrise/deploy/app-release-unsigned.apk”

No test server found for this combination of app and calabash version. Recreating test server.
Done signing the test server. Moved it to test_servers/0d8ca8aeb60b15c9e203ec3f0d843fac_0.9.0.apk
cannot load such file – calabash-cucumber/cucumber (LoadError)
/usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require’
/bitrise/src/features/ios/support/env.rb:5:in <top (required)>' /usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in load’
/usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in load_code_file' /usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in load_file’
/usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in block in load_files!' /usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in each’
/usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in load_files!' /usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in load_step_definitions’
/usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in run!' /usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in execute!’
/usr/local/lib/ruby/gems/2.3.0/gems/cucumber-2.4.0/bin/cucumber:8:in <top (required)>' /usr/local/bin/cucumber:22:in load’
/usr/local/bin/cucumber:22:in `’
Failed to run command, error: exit status 1

This is strange. I do an Android UI tests but an error of iOS env.rb occurred.
I test my calabash testing in my local mac machine and is totally fine to work.

This is my calabash folder structure:

Can someone helps me to solve this problem?


Hi @andrewliecowork,

sorry for my late response!
Could you please use bundler to specify the calabash-android gem version to use?
The issue may appears because of gem version differences.

You can read more in How to do Calabash UITesting on Bitrise article.

1 Like

Hi godreikrisztian,

After viewing the source code of Calabash Android UI test,
I add “-p android” parameter at the end of this command
calabash-android "run" "/bitrise/deploy/app-release-unsigned.apk"
and UI tests work fine for me.

Best Regards,

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.