我有一个用 Swift 编写的项目,有一个主要目标和两个测试目标:一个用于使用 quick 进行单元测试框架,它有 3 KIF测试。
另一个目标有 XCUITests。
因此,每当我运行 Xcode bot 与我们的 Xcode CI Server 集成时,我都会收到以下错误:
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。
最佳答案
我遇到了同样的错误(尽管我使用 faSTLane 来运行我的 UI 测试)。
问题是由于模拟器卡在 UI 测试未处理的系统警报上。在那之后,我的所有测试都失败了,随后的运行继续失败,因为模拟器没有响应。
我登录机器并在中断警报上单击“确定”,一切都恢复正常。
在我的情况下,警报出现是因为应用程序试图注册 APNS 和
显示“应用名称”想要启用通知警报。跳过 UI 测试的 APNS 注册可防止问题再次出现。
关于Xcode bot 错误 : Early unexpected exit, 操作从未完成引导,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36312500/