13

我有一个用 Swift 编写的项目,它有一个主要目标和两个测试目标:一个用于使用快速框架进行单元测试,它有 3 个KIF测试。另一个目标具有 XCUITests。

所以每当我运行 Xcode bot 与我们的 Xcode CI 服务器集成时,我都会收到以下错误:

Bot Issue for Acceptance Bot (error)
Integration #63 of Acceptance Bot
Open in Xcode: xcbot://iosci/botID/1229919cecfcd510f090e37aed014a23/integrationID/16a3709d3ae008a68a65ff2fe9bb5a7b

Assertion: Test target MyUITests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
File: (null):(null)

Introduced 2 integrations ago

Full logs for this integration are attached.

当我将它运行到模拟器集成中时出现此错误,尽管当我将 CI 服务器与物理设备连接并运行它时它运行良好。

注意:我使用 Xcode 7.3 和 Carthage 0.11。

4

1 回答 1

9

我遇到了同样的错误(尽管我使用 fastlane 来运行我的 UI 测试)。

问题是由于模拟器卡在 UI 测试未处理的系统警报上。之后我的所有测试都失败了,随后的运行继续失败,因为模拟器没有响应。

我登录机器并在中断警报上单击“确定”,一切都恢复正常。

在我的情况下,由于应用程序试图注册 APNS 和

显示“应用程序名称”要启用通知警报。跳过 UI 测试的 APNS 注册可防止问题再次出现。

于 2016-03-31T13:20:21.407 回答