gpt4 book ai didi

通过 JNLP 使用 Jenkins 时,iOS 测试不会在模拟器上运行

转载 作者:可可西里 更新时间:2023-11-01 02:59:38 25 4
gpt4 key购买 nike

我一直在尝试让 xcodebuild 测试在使用 Jenkins 的远程机器上运行。我遇到了无法通过 SSH 启动 GUI 的错误,并按照此处的建议通过 JNLP 启动从站解决了这个问题: Timeout when running xcodebuild tests under Xcode 6 via SSH .现在我收到一个新错误:

Error Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3 “由于等待测试进程 checkin 超时而取消测试...”

无论我在终端上还是通过 Jenkins 成功构建和运行测试,我也会遇到这些错误:

iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed." {NSLocalizedFailureReason=A connection to the simulator verification service could not be established., NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled., NSLocalizedDescription=Simulator verification failed.}

iPhoneSimulator: Unable to connect to "com.apple.instruments.deviceservice.lockdown" (Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown"

我已确保在安装 XCode 的位置启用了所有权,我已重置模拟器上的内容和设置,并将我的 plist 文件移至/Library/LaunchAgents。我尝试使用谷歌搜索这些错误,但找不到任何似乎与我的问题相关的内容。还有其他建议吗?

其他信息:

XCode 版本 6.2 (6C131e)

日志文件:

2015-03-24 12:14:10.719 Beginning test session with Xcode 6C131e
2015-03-24 12:14:10.720 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test -project proj.xcodeproj -scheme development -destination platform=iOS Simulator,name=iPad Air
2015-03-24 12:14:10.720 Testing on device: <DVTiPhoneSimulator: 0x7f8235cb3570> {SimDevice: SimDevice : iPad Air (625C9344-19B9-4F6C-B70B-8BDD3B753E17) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-Air } runtime={ SimRuntime : 8.2 (12D508) - com.apple.CoreSimulator.SimRuntime.iOS-8-2 }}
2015-03-24 12:14:10.720 Writing testing status log to /var/folders/mx/9d2jm4sj6t54sld_9cj1bgz40000gn/T/com.apple.dt.XCTest-status/Session-2015-03-24_12:14:10-QR746X.log.
2015-03-24 12:14:10.720 Initializing test infrastructure.
2015-03-24 12:14:10.749 Creating the connection.
2015-03-24 12:14:10.749 Listening for proxy connection request from the test bundle (all platforms)
2015-03-24 12:14:10.749 Resuming the connection.
2015-03-24 12:14:10.749 Test connection requires daemon assistance.
2015-03-24 12:14:10.933 Checking test manager availability..., will wait up to 120s
2015-03-24 12:14:10.936 testmanagerd handled session request.
2015-03-24 12:14:10.936 Waiting for test process to launch.
2015-03-24 12:14:15.951 Launch session started, setting a disallow-finish-token on the run operation.
2015-03-24 12:14:15.952 Waiting for test process to check in..., will wait up to 120s
2015-03-24 12:14:15.979 Adding console adaptor for test process.
2015-03-24 12:16:15.956 Unable to get debug console for logging target process thread state.
2015-03-24 12:16:15.956 Test operation failure: Canceling tests due to timeout in Waiting for test process to check in...
2015-03-24 12:16:15.956 _finishWithError:Error Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3 "Canceling tests due to timeout in Waiting for test process to check in..." UserInfo=0x7f8231c1dff0 {NSLocalizedDescription=Canceling tests due to timeout in Waiting for test process to check in...} didCancel: 1

最佳答案

您可以通过以下步骤解决“模拟器验证失败”错误(代码=53)。(对我来说,这个问题是由于命令行开发工具的冲突以及工具的 Mac OS 文件夹权限问题引起的)。

我能够按照这些解决它:

  1. 退出所有正在运行的 Xcode、Instruments 和 iOS 模拟器实例
  2. 删除开发者文件夹:/Library/Developer
  3. 删除所有 Xcode 安装:/Applications/Xcode.app,...
  4. 重启你的 Mac
  5. 从 Apple Developer Portal 下载 Xcode.dmg(不是来自 App Store)
  6. 重新安装 Xcode
  7. 启动 Xcode

可选,虽然不是最好的做法,但如果您想安装多个版本的 Xcode,请确保从 Xcode Preferences/Locations/Command-Line Tools 激活正确的 Xcode 版本,在构建您的项目之前。

希望这对您有所帮助。

关于通过 JNLP 使用 Jenkins 时,iOS 测试不会在模拟器上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29241877/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com