运行单元测试用例时,Xcode单元测试会话退出错误

时间:2019-05-29 04:52:28

标签: ios xcode unit-testing cocoa-touch xctest

我正在使用XCTest执行单元测试用例,但是测试用例在未运行方法调用的情况下失败了。 在测试日志中显示以下错误。

  

测试会话没有完成就退出(45)。

下面是日志文件的内容。

10:13:51.477 Xcode[27399:424996] <IDETestOperationCoordinator: 0x7fec86f3a2d0>: parseConsoleOutputFromOriginalOutput: called, 78 bytes written out to StandardOutputAndStandardError
10:13:51.581 Xcode[27399:463189] Lost connection to the test daemon.
10:13:51.581 Xcode[27399:462510] Closing socket 69 to testmanagerd for Sim iPhone 5
10:13:51.582 Xcode[27399:462503] Closing socket 58 to testmanagerd for Sim iPhone 5
10:13:51.585 Xcode[27399:424996] Got death notice for pid 31596, removing from SimulatorSessionMap
10:13:51.585 Xcode[27399:424996] Checking to see if pid 31476 is valid: kill(pid, 0) = 0 (YES, it's still running)
10:13:51.585 Xcode[27399:424996] <IDETestOperationCoordinator: 0x7fec86f3a2d0>: parseConsoleOutputFromOriginalOutput: called, 0 bytes written out to StandardOutputAndStandardError
10:13:51.585 Xcode[27399:424996] <IDETestOperationCoordinator: 0x7fec86f3a2d0> is flushing delegate queue, count: 1
10:13:51.592 Xcode[27399:424996] Launch session LaunchSessionClaim_0x7fec86ee5630 relinquised claim on simulator 8678C2A5-960D-4E64-A1CC-9F485D7A1DFC
10:13:51.592 Xcode[27399:424996] Launch session LaunchSessionClaim_0x7fec86ee5630 relinquised claim on simulator 8678C2A5-960D-4E64-A1CC-9F485D7A1DFC
10:13:51.840 Xcode[27399:424996] <IDETestOperationCoordinator: 0x7fec86f3a2d0> finished receiving data from <IDEConsoleAdaptor: 0x7fec86a9fe30 'target' stdin: (null) 0 stdout: (null) 0 stderr: (null) 0>
10:13:51.840 Xcode[27399:424996] <IDETestOperationCoordinator: 0x7fec86f3a2d0>: _considerFlushingDelegateBlockQueue - nothing to flush
10:13:53.785 Xcode[27399:424996] Test operation failure: Test session exited(45) without completing.
10:13:53.785 Xcode[27399:424996] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Test session exited(45) without completing." UserInfo={NSLocalizedDescription=Test session exited(45) without completing.}

需要知道此错误的原因。

0 个答案:

没有答案
相关问题