0

I installed calabash on a new machine, but tests that I ran on my old machine will not run.

As far as I can tell, both machines are set up the same way. They pull the project from the same repository, which includes a Gemfile with calabash-cucumber version 0.18.0. I set the same BUNDLE_ID, DEVICE_ENDPOINT, and DEVICE_TARGET values and use the same physical device.

When I try to run the tests in the console on the new machine, I get this:

$ bundle exec calabash-ios console
Running irb...
irb(main):001:0> start_test_server_in_background
ArgumentError: Could not find a device with a UDID or name matching 'com.my.apps.bundle.id'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/run_loop-2.1.1/lib/run_loop/device.rb:126:in `device_with_identifier'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/run_loop-2.1.1/lib/run_loop/device.rb:160:in `detect_device'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/run_loop-2.1.1/lib/run_loop/core.rb:71:in `run_with_options'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/run_loop-2.1.1/lib/run_loop.rb:134:in `run'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/calabash-cucumber-0.18.0/lib/calabash-cucumber/launcher.rb:718:in `block in new_run_loop'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/calabash-cucumber-0.18.0/lib/calabash-cucumber/launcher.rb:716:in `times'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/calabash-cucumber-0.18.0/lib/calabash-cucumber/launcher.rb:716:in `new_run_loop'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/calabash-cucumber-0.18.0/lib/calabash-cucumber/launcher.rb:584:in `relaunch'
    from /Users/rjones/gambit/gemstubs/ruby/2.1.0/gems/calabash-cucumber-0.18.0/lib/calabash-cucumber/core.rb:943:in `start_test_server_in_background'
    from (irb):1
    from /Users/rjones/.rbenv/versions/2.1.5/bin/irb:11:in `<main>'

Any ideas why this isn't working?

Randy Jones
  • 118
  • 1
  • 5
  • Does the bundle id in your app match what you have set in config? "com.my.apps.bundle.id" looks pretty generic but perhaps you just replaced it here... – Lasse Apr 21 '16 at 03:58
  • Yes, I did replace it here. But, it is formatted like com.company-name.app-name, which is nothing like the UDID for my device. – Randy Jones Apr 21 '16 at 04:03

2 Answers2

1

Please update to 0.19.0.

Can you also paste the exact command you are using to start the

irb(main):001:0> start_test_server_in_background
ArgumentError: Could not find a device with a UDID or name matching
'com.my.apps.bundle.id'

It looks like you set your DEVICE_TARGET to the bundle id? If not, then you have found a bug. It is possible that 0.18.0 is not compatible with run-loop 2.1.1. Downgrade to run_loop 2.0.9 if you want to verify that this is the problem.

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • It looks like there is an incompatibility between calabash-cucumber 0.18.0 and run_loop 2.1.1. I can run calabash 0.18.0 with run_loop 2.0.9 or calabash 0.19.0 with run_loop 2.1.1. But, it fails when I run calabash 0.18.0 with run_loop 2.1.1. – Randy Jones Apr 21 '16 at 16:54
  • You should updated to Calabash 0.19.0 or the most recent version available. – jmoody Apr 24 '16 at 10:27
0

I experienced the same issue, when updating cucumber gem from version 1.3.19 to version 2.3.3. I also run tests on physical devices

edit: Sorry, forgot to mention, that I updated run_loop too from version 2.0.6 to 2.1.3

So the versions:

run_loop (2.1.3) calabash-cucumber (0.18.1) I guess these are the two that could affect this part, and cucumber was not involved

I found a solution, by setting the variable DEVICE instead of DEVICE_TARGET

For example:

BUNDLE_ID=<bundle_id> DEVICE=<dev_udid> DEVICE_ENDPOINT=<dev_ip> cucumber

Instead of

BUNDLE_ID=<bundle_id> DEVICE_TARGET=<dev_udid> DEVICE_ENDPOINT=<dev_ip> cucumber

Krumons
  • 61
  • 7