Xcode 10 UI Testing Parallel Builds

Xcode 10 UI Tests now have the feature of allowing parallel test execution to greatly speed up tests.

However, enabling this (via Product -> Scheme -> Edit Scheme -> Test -> Options), results in bitrise getting confused and failing with no obvious error message. Digging through the raw logs, I can find messages like:

MyAppTests-Runner.app encountered an error (DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (79CFCC8D-8047-4774-83FD-E439CAA58944))

The Clone 1 tests run ok, though the results are not reported.

For now, I’ll disable parallel tests, but I’m wondering what plans bitrise might have to support these? Thanks!

Hi @eggheadgames,
could you please attach your failed build log url?

Sure, here’s one from before we disabled parallel builds: https://app.bitrise.io/build/03210cbe70a3d3c6

Happy to test fixes, if that’s more convenient for you.

Hi @eggheadgames,

thanks for the url!

We need a sample app to reproduce the issue, we will reconfigure one of our sample apps, but to speed up the process it would be great if you could provide a sample app which can reproduce the issue.

Hi @eggheadgames !

Could you please try to set Output tool input in the Xcode Test for iOS step the from xcpretty to xcodebuild, and run a new build with parallel tests enabled?

It seems the xcpretty has an issue with logging multiple simulator test at the same time.
But the default xcodebuild should work.

As far as I can tell, the same error is still generated. See:

https://app.bitrise.io/build/4a14cc68947c449b

2018-10-22 17:26:46.774 xcodebuild[3028:24266] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7ff7b6e1f880>
Test case 'AboutTests.testNavigationBarTitle()' passed on 'Clone 1 of iPad Air - FooTests-Runner.app (3349)' (12.878 seconds)
2018-10-22 17:26:50.071 xcodebuild[3028:21304] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7ff7b712f0d0>
2018-10-22 17:28:08.499 xcodebuild[3028:20557] [MT] IDETestOperationsObserverDebug: 268.954 elapsed -- Testing started completed.
2018-10-22 17:28:08.499 xcodebuild[3028:20557] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2018-10-22 17:28:08.499 xcodebuild[3028:20557] [MT] IDETestOperationsObserverDebug: 268.954 sec, +268.954 sec -- end
2018-10-22 17:28:08.514 xcodebuild[3028:20557] Error Domain=com.apple.dt.AssetProviderService Code=99 "Failed to initiate service connection to simulator" UserInfo={NSUnderlyingError=0x7ff7b68aeb80 {Error Domain=DTiPhoneSimulatorErrorDomain Code=-1 "DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (830FF016-0A06-4157-9A1F-0061FE944B7F)" UserInfo={NSLocalizedDescription=DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (830FF016-0A06-4157-9A1F-0061FE944B7F), NSUnderlyingError=0x7ff7b68a43e0 {Error Domain=DTServiceHubClient Code=-11 "unable to contact local DTServiceHub to bless simulator connection" UserInfo={NSLocalizedDescription=unable to contact local DTServiceHub to bless simulator connection}}}}, NSLocalizedDescription=Failed to initiate service connection to simulator, NSLocalizedRecoverySuggestion=DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (830FF016-0A06-4157-9A1F-0061FE944B7F)}
2018-10-22 17:28:08.514 xcodebuild[3028:20557] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (830FF016-0A06-4157-9A1F-0061FE944B7F)" UserInfo={NSLocalizedDescription=DTServiceHubClient failed to bless service hub for simulator Clone 2 of iPad Air (830FF016-0A06-4157-9A1F-0061FE944B7F), NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /Users/vagrant/Library/Developer/Xcode/DerivedData/Foo-gewhzekhsopbesfofqckztpeajlv/Logs/Test/Run-Foo-2018.10.22_17-23-21--0700.xcresult}

However, perhaps it’s not related to parallel builds at all. Other variations seem to be running fine with “Clone 1” and “Clone 2”…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.