“确保在测试套件运行过程中将APP_BUNDLE_PATH设置为此模拟器版本支持的版本”错误

时间:2015-05-27 10:51:27

标签: ios iphone cucumber calabash calabash-ios

我在Teamcity9.0中运行了近30个黄瓜测试。每个方案都设置为RESET_BETWEEN_SCENARIOS = 1

大多数时候我发现在套件中间运行了很多次,以下错误出现在30次测试中的4-5次测试

 Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported  by this simulator version
[04:28:47][Step 3/3]  Calabash::Cucumber::Launcher::StartError: Time out  waiting for UIAutomation run-loop Instruments failed to launch app:   'FBSOpenApplicationErrorDomain error 8. 
[04:28:47][Step 3/3]   Logfile /Users/teamcity/TeamCity/buildAgent/temp/buildTmp/run_loop20150527-41162-cdivr0/run_loop.out 
[04:28:47][Step 3/3]  
[04:28:47][Step 3/3]   Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier 'com.worldremit.ios.dev'
[04:28:47][Step 3/3]  
[04:28:47][Step 3/3]   (Calabash::Cucumber::Launcher::StartError)
[04:28:47][Step 3/3]  /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/launcher.rb:766:in `new_run_loop'
[04:28:47][Step 3/3]  /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/launcher.rb:631:in `relaunch'
[04:28:47][Step 3/3]  /Users/teamcity/TeamCity/buildAgent/work/12ed2ac462eef269/functional-tests/features/ios/support/01_launch.rb:7:in `Before'

Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
[04:28:48][Step 3/3] Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
[04:28:48][Step 3/3] Failing... Errno::ECONNREFUSED
[04:28:48][Step 3/3]       Connection refused - connect(2) (http://localhost:37265) (Errno::ECONNREFUSED)
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `initialize'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `new'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `create_socket'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:747:in `block in connect'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:746:in `connect'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:612:in `query'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:164:in `query'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:1191:in `do_get_block'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:974:in `block in do_request'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:1082:in `protect_keep_alive_disconnected'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:969:in `do_request'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:822:in `request'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/httpclient-2.6.0.1/lib/httpclient.rb:713:in `get'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/http_helpers.rb:60:in `block in make_http_request'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/http_helpers.rb:50:in `times'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/http_helpers.rb:50:in `make_http_request'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/http_helpers.rb:29:in `http'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/connection_helpers.rb:11:in `http'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/failure_helpers.rb:24:in `screenshot'
[04:28:48][Step 3/3]       /Users/teamcity/.rvm/gems/ruby-2.0.0-p598/gems/calabash-cucumber-0.14.1/lib/calabash-cucumber/failure_helpers.rb:52:in `screenshot_embed'
[04:28:48][Step 3/3]       /Users/teamcity/TeamCity/buildAgent/work/12ed2ac462eef269/functional-tests/features/ios/support/hooks.rb:4:in `After'

知道怎么解决吗?

xcode-select -p
/Applications/Xcode.app/Contents/Developer

Details
xcode 6.3.1
buildagent:- Mac mini Yosemite 10.10.3
calabash ios version 0.14.1
simulator iphone 5s 8.3 OS

profile I am using for running the tests in cucumber.yml
<%
  common = "-r features/support -r features/step_definitions"
  ios_smoke_specific = "-r features/ios/support -r features/ios/pages      RESET_BETWEEN_SCENARIOS=1 PLATFORM=ios APP_BUNDLE_PATH=\"../abc.app\" --tags @smoke -f pretty -f html -o test-result/ios/smoke/default_device/ios_test_result.html"
%>

ios5s_smoke_teamcity: DEVICE_TARGET="iPhone 5s (8.3 Simulator)" <%= common   %> <%= ios_smoke_specific %>

我们使用Xmarin开发应用程序。

1 个答案:

答案 0 :(得分:0)

+1用于报告您系统的详细信息。

  

Calabash :: Cucumber :: Launcher :: StartError:超时等待UIAutomation运行循环乐器无法启动应用程序:&#39; FBSOpenApplicationErrorDomain错误8.

我们讨论了这个问题on the Calabash iOS Hot Topics page。可以找到血腥的详细信息in this GitHub issue

至少尝试updating your run-loop version 1.3.1。

如果您已经在使用run-loop&gt; = 1.3.1,请使用您的support / 01_launch.rb更新您的问题。如果此问题仅出现在TeamCity上,我最好的猜测是TeamCity在管理iOS模拟器时遇到问题。这是CI系统(Travis,Jenkins等)的常见问题。我对TeamCity没有任何建议。