我在 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 来开发应用程序。