- 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(连接到设备,未连接到设备等)
- 将设备连接到我的机器托管的私人 wifi
以上所有都给出了相同的结果。
据我所知,ping_app 方法没有返回 200,因此状态变为 connected=true。当我使用休息客户端通过端口 37265 手动 ping 应用程序时,我得到返回的 http 状态为 405。
我的机器/网络设置中是否缺少某些东西会阻止 ping_app 方法给出预期的响应?