测试目标 `MyAppTests` 遇到错误(提前意外退出,操作从未完成引导 - 不会尝试重新启动) [英] Test target `MyAppTests` encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)

查看:13
本文介绍了测试目标 `MyAppTests` 遇到错误(提前意外退出,操作从未完成引导 - 不会尝试重新启动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在设备上运行机器人时,持续集成会出现问题.

Problem arise with continuous integration when try to run bot on device.

测试目标 MyAppTests 遇到错误(提前意外退出,操作从未完成引导 - 不会尝试重新启动)

Test target MyAppTests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)

你知道为什么会这样吗?有什么想法吗?

Do you know why it happens? Any ideas?

推荐答案

以下对我有用.
不知道有没有可以跳过的步骤,所以全部贴出来.

The following worked for me.
I don't know if some of the steps can be skipped, so I'm posting all of it.

  1. 将 CocoaPods 更新到最低版本.开发机器和服务器上的 1.1.0 sudo gem update cocoapods.
  2. 根据 CocoaPods 期间的终端输出,在项目设置中将 Always Embed Swift Standard Libraries 设置为 No.我是针对主要、测试和 UI 测试目标进行的.
  3. 将 OS X Server 升级到最新版本(见下文).
  4. 在开发机器和服务器上将 Xcode 升级到最新版本.
  5. 再次通过服务器应用选择 Xcode.
  6. 以 UI 测试所需的测试用户 Xcode 创建并登录.(故障排除如下)
  7. 在服务器上打开 Xcode 并安装缺少的组件(它会在启动时询问).
  8. 重启服务器.
  1. Update CocoaPods to version min. 1.1.0 on both dev machine and server sudo gem update cocoapods.
  2. As per terminal output during CocoaPods set Always Embed Swift Standard Libraries to No in the projects settings. I did it for the main, test and UI test targets.
  3. Upgrade OS X Server to latest version (see more below).
  4. Upgrade Xcode to latest version both on dev machine and server.
  5. Select Xcode through server app again.
  6. Create and log in as the test user Xcode required for UI tests. (trouble shooting below)
  7. Open Xcode on the server and install missing components (it will ask on launch).
  8. Reboot server.

我的集成后来做了升级,你提到的错误消失了.

My integrations did an upgrade afterwards and the errors you mentioned were gone.

我应该提到,在我的机器人上,我有一个预集成脚本,可以在服务器上重新安装我的所有 CocoaPods.我还在每次构建之前清理解决方案.

I should mention that on my bots I have a pre-Integration Script that re-installs all of my CocoaPods on server. I also clean solution before each build.


将 OS X 升级到最新版本.
升级到应用程序的最低目标操作系统版本可能会侥幸成功.这可能是您的 UI 测试失败的原因.我跟踪了我的日志并找到了 Bot 的输出文件夹.该应用程序无法启动,因为目标操作系统版本高于服务器本身.


Upgrade OS X to latest version.
You might get away with upgrading to your minimum target OS version of your app. This might be the reason for your UI test failures. I traced my logs and found the output folder for the Bot. The app was not launch-able as the target OS version was greater than the server itself.


排查 Xcode Server 用户断开连接".
我遇到了用户断开连接"并且用户会话上的 Xcode 服务挂在刷新"状态的问题.



Troubleshooting Xcode Server user is "disconnected".
I had an issue where the user was "Disconnected" and the Xcode service on the user session was hanging on "Refreshing".


我不得不在服务器应用程序中重新选择 Xcode 并创建一个新的 Xcode 服务器用户进行单元测试.之后问题立即消失.如果有人知道如何修复现有用户,请告诉我.

I had to re-select Xcode in the server app and create a new Xcode Server user for unit testing. The problem went away immediately after that. If someone knows how to fix the existing user, please let me know.

这篇关于测试目标 `MyAppTests` 遇到错误(提前意外退出,操作从未完成引导 - 不会尝试重新启动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆