2
  • xcode のインストール場所: /Applications/Xcode.app/Contents/Developer
  • Xcode バージョン: 6.0.1
  • ひょうたんバージョン: 0.11.0
  • calabash.framework バージョン: 0.10.2
  • ファイアウォールを有効にしていません
  • これをシミュレーターで実行しても問題ありません

コンソール出力:

$ DEVICE_TARGET=xxxx DEVICE_ENDPOINT=192.168.2.2 BUNDLE_ID=xxxx CALABASH_FULL_CONSOLE_OUTPUT=1 DEBUG=1 MAX_CONNECT_RETRY=2  calabash-ios console
Running irb...
irb(main):001:0> start_test_server_in_background

INFO: Using uia strategy: 'preferences'
Sending 'QUIT' to instruments process '57313'
Waiting for instruments '57313' to terminate
Preparation took 1.071744 seconds
{
                    :app => "xxxx",
                   :args => [],
:bundle_dir_or_bundle_id => "xxxx",
              :bundle_id => "xxxx",
                 :device => "xxxx",
          :device_target => "xxxx",
          :launch_method => :instruments,
         :launch_retries => 5,
               :log_file => "/var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/run_loop.out",
              :no_launch => false,
                :no_stop => false,
                  :reset => false,
            :results_dir => "/var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1",
      :results_dir_trace => "/var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/trace",
                 :script => "/var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/_run_loop.js",
            :sdk_version => nil,
                   :udid => "xxxx",
           :uia_strategy => :preferences,
                  :xcode => "6.0.1",
             :xcode_path => "/Applications/Xcode.app/Contents/Developer"
}

### Starting on xxxx App: xxxx ###
2014-10-06 16:56:06 +0100 xcrun instruments -w "xxxx" -D     "/var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/trace" -t "Automation" "xxxx" -e UIARESULTSPATH /var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1 -e UIASCRIPT /var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/_run_loop.js  &> /var/folders/gy/qpky9m857fxcvf_y35m30_s80000gp/T/run_loop20141006-57357-15h8el1/run_loop.out
Launching took 3.630218 seconds
Waiting for App to be ready
Timed out after 30 secs, trying to connect to Calabash server...
Will retry 1
Timed out after 30 secs, trying to connect to Calabash server...
Will retry 0
#<RuntimeError: Timed out connecting to Calabash server after 2 retries. Make sure it is  linked and App isn't crashing>
RuntimeError: Unable to make connection to Calabash Server at 192.168.2.2
Make sure you don't have a firewall blocking traffic to 192.168.2.2.

    from /Users/xxx/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/launcher.rb:778:in `rescue in ensure_connectivity'
from /Users/xxx/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/launcher.rb:740:in `ensure_connectivity'
from /Users/xxx/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/launcher.rb:608:in `relaunch'
from /Users/xxx/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/core.rb:838:in `start_test_server_in_background'
from (irb):1
from /Users/xxx/.rbenv/versions/2.0.0-p247/bin/irb:12:in `<main>'

デバイスに表示される内容:

  • アプリが完全に起動します。

私が試したこと:

  • マシンとデバイスを複数回再起動する
  • 複数の USB ポートでデバイスを試す
  • さまざまな状態(デバイスに接続されている、デバイスに接続されていないなど)でxcodeを試す
  • 自分のマシンでホストされているプラ​​イベート Wi-Fi にデバイスを接続する

上記のすべてで同じ結果が得られます。

私が知る限り、ping_app メソッドは 200 を返さないため、ステータスは connected=true になります。ポート 37265 経由でレスト クライアントを使用して手動でアプリに ping を実行すると、http ステータスの 405 が返されます。

ping_app メソッドが予期した応答を返すのを妨げている、マシン/ネットワークの設定に欠けているものはありますか?

4

4 に答える 4

0

Calabash が使用するポート番号 37265 を追加する必要があります。また、デバイスとマシンが両方とも同じルーター上にあり、ファイアウォールがないことを確認してください。私は Mac を使用しているので、自分のマシンで新しいネットワークを作成し、自分のデバイスでそれに参加するだけです。お役に立てれば。

このリンクを確認して、設定が正しいことを確認してください。https://github.com/calabash/calabash-ios#installation-details

于 2014-10-07T10:51:29.447 に答える
0

実際のデバイスでひょうたんの iOS テストを起動するには、次のようにSettings--> Developer--> Enable UI Automationセットに移動する必要があります。ON

于 2015-06-16T10:20:06.647 に答える
0

役立つヒント:

  • デバイス エンドポイント: 末尾に :37265 が必要です (ひょうたんサーバー)

  • iTunes でデバイスに名前を付ける場合: myPhone のように、 Device Endpoint= http://myPhone.local:37265を設定できます。デバイス名に _ または . を使用することはできません。

  • Mac とデバイスが同じ Wi-Fi に接続されていることを確認してください

于 2015-07-01T14:20:14.953 に答える