Xcode

I have serious trouble with unit-tests in XCode. I use XCode 6.4 Build version 6E35b on OS X Yosemite and OS X Capitan.

As a result I have such an error:

_finishWithError:Error Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3 "Test session exited(-1) without checking in." UserInfo=0x7fbfea2b60b0 {NSLocalizedDescription=Test session exited(-1) without checking in.} didCancel: 1

There are already some posts on stack (for instance, Xcode Server CI Bot Test Session exited(-1)), but solution was not found.

I tried to run unit-tests from XCode and from command-line, but too often I had that error. In last case I did 3 steps:

1. Deleting everything from DERIVED_DATA_PATH
2. Installing pods
3. Ran unit-tests with command: xcodebuild test -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 5s,OS=8.2' -derivedDataPath 'temp-build-dir' 2>&1

It is a great trouble for me, because I use these tests in common automatic build flow with UI-tests and if they fail, the whole flow fails.

In release notes for XCode 6 there was information from Apple about that bug, and their workaround was to simply rerun tests. It is unacceptable for me, because they run automatically with other tests and it seems to be bad idea to rerun them until they pass or simply run without that error.


Possible solution

Launch this command in the terminal

sudo /usr/sbin/DevToolsSecurity --enable

What is probably causing the problem

If you launched the tests not on a headless terminal you would see this dialog:

开发人员工具Access需要控制另一个进程以便继续进行调试。输入你的密码以允许这个。

链接地址: http://www.djcxy.com/p/27612.html

上一篇: 压缩Git中的前两个提交?

下一篇: Xcode中