0

テストサーバーを起動しようとしていますが、以下のエラーが発生しています。どなたか解決策を教えてください。gem バージョンのさまざまな組み合わせを試しましたが、うまくいきませんでした。これに関する迅速なヘルプに感謝します。

私は次のようなコマンドを使用しています

DEVICE_TARGET='iPhone 5 (9.2)' calabash-ios console


irb(main):001:0> start_test_server_in_background

ArgumentError: /Users/test/.rvm/gems/ruby-2.0.0-p353/gems/run_loop-2.1.1/lib/run_loop/device.rb から「iPhone」に一致する UDID または名前を持つデバイスが見つかりませんでした:126: device_with_identifier' from /Users/test/.rvm/gems/ruby-2.0.0-p353/gems/run_loop-2.1.1/lib/run_loop/device.rb:160:in/Users/test/.rvm/gems/ruby-2.0.0-p353/gems/run_loop-2.1.1/lib/run_loop/core.rb からの detect_deviceで:71: run_with_options' from /Users/test/.rvm/gems/ruby-2.0.0-p353/gems/run_loop-2.1.1/lib/run_loop.rb:134:in/Users/ からの実行でtest/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.18.1/lib/calabash-cucumber/launcher.rb:718:in block in new_run_loop' from /Users/test/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.18.1/lib/calabash-cucumber/launcher.rb:716:intimes' from /Users/test/.rvm/gems /ruby-2.0.0-p353/gems/calabash-cucumber-0.18.1/lib/calabash-cucumber/launcher.rb:716:in new_run_loop' from /Users/test/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.18.1/lib/calabash-cucumber/launcher.rb:584:inrelaunch' from /Users/test/.rvm/gems/ruby-2.0.0 -p353/gems/ひょうたんキュウリ-0.18.1/lib/ひょうたんキュウリ/core.rb:943:in start_test_server_in_background' from (irb):1 from /Users/test/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in'

4

1 に答える 1

0

アップデート

あなたのコメントから、シミュレーターではなく、物理デバイスで起動しようとしているようです。「iPhone 5 (9.2)」はシミュレータと同じ命名規則であるため、これは紛らわしいです。

物理デバイスをターゲットにする場合は、デバイスの UDID を使用する必要があります。これは、次の出力の最初の数行で確認できますinstruments

$ xcrun instruments -s devices
stern [4AFA58C7-5D39-54D0-9733-04302E7XXXXX]
neptune (9.3.1) [43be3f89d9587e9468c24672777ff6241bdXXXXX]
uranus (9.3.1) [6c3ed5434b5dfc29758f8835644b55bd43XXXXX]
Apple TV 1080p (9.0) [D6875A98-2C0E-4138-85EF-841025A54DE0] (Simulator)
# the rest are simulators.

上記の例では:

* stern is the host computer.
* neptune and uranus are physical devices.

海王星をターゲットにするには:

$ DEVICE_TARGET=43be3f89d9587e9468c24672777ff6241bdXXXXX \
  DEVICE_ENDPOINT=http://<ip of your device>:37265 \
  calabash-ios console

デバイスに賢明な名前を付ける場合は、次のこともできます。

$ DEVICE_TARGET=neptune \
  DEVICE_ENDPOINT=http://<ip of your device>:37265 \
  calabash-ios console

物理デバイス名がシミュレーター名と正確に一致するため、Calabash はターゲットにするデバイスについて混乱していると思われます。

要約すると、次の 2 つのオプションがあります。

 1. Use the UDID you get from instruments.
 $ DEVICE_TARGET=43be3f89d9587e9468c24672777ff6241bdXXXXX \
   DEVICE_ENDPOINT=http://<ip of your device>:37265 \
   calabash-ios console

 2. Rename your device to something like "iphone5"
 $ DEVICE_TARGET=iphone5 \
   DEVICE_ENDPOINT=http://<ip of your device>:37265 \
   calabash-ios console

Testing on Physical Devices wiki ページが役に立つかもしれません。

前の回答

引用符を試しました"か?

$ DEVICE_TARGET="iPhone 5 (9.2)" calabash-ios console

ArgumentError:「iPhone」に一致する UDID または名前を持つデバイスが見つかりませんでした

何らかの理由で、run-loop に文字列の「5 (9.2)」の部分がありません。

他に考えられる唯一のことは、iPhone 5 iOS 9.2 シミュレーターがインストールされていないことです。Xcode に表示されますか?

UDID を直接使用することもできます。

# List the available simulators
$ xcrun instruments -s devices
<snip>
iPhone 6 Plus (9.3) [D6AFEDFE-2E02-4A33-AEC8-740053DDC6DE] (Simulator)

 # Use the UDID directly.
 $ DEVICE_TARGET="D6AFEDFE-2E02-4A33-AEC8-740053DDC6DE" calabash-ios console
于 2016-05-11T11:09:52.410 に答える