Reputation: 6143
I am now doing for UITesting with Xcode and I got this error.
* Assertion failure in void _XCTFailInCurrentTest(NSString *, ...)(), /Library/Caches/com.apple.xbs/Sources/XCTest_Sim/XCTest-10112/XCTestFramework/Classes/XCTestCase.m:63 2016-05-13 22:31:54.961 XCTRunner[15428:168507] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_XCTFailInCurrentTest should only be called while a test is running. Failure description: Failed to receive completion for
I have seen other similar post here.
Cannot run Xcode (7.3) UI tests in Jenkins
I am using Jenkins but for now, I am directly running from Xcode and I can't even run from Xcode. How shall I do?
Upvotes: 4
Views: 529
Reputation: 1243
We tried the tips from the other responses, which did not work for us.
A complete reinstall of Xcode 7.3 fixed our issue.
Upvotes: 0
Reputation: 9649
By some reason simulator got corrupted. In my case it was not possible to launch any test once get at the same point. In my case what it worked was reset simulator (Menu Simulator|Reset Contents and Settings...) or switch to any other simulator.
Upvotes: 0
Reputation: 2174
Background
After 30 seconds the test times out with:
XCTRunner[36260:489138] Continuing to run tests in the background with task ID 1
2016-05-18 16:17:25.720 XCTRunner[36260:489138] *** Assertion failure in void _XCTFailInCurrentTest(NSString *, ...)(), /Library/Caches/com.apple.xbs/Sources/XCTest_Sim/XCTest-10112/XCTestFramework/Classes/XCTestCase.m:63
2016-05-18 16:17:25.723 XCTRunner[36260:489138] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_XCTFailInCurrentTest should only be called while a test is running.
Failure description: Failed to receive completion for <XCDeviceEvent:0x7fddc241f970 page 12 usage 64 duration 0.01s within 30.0s'
The fix that worked for me was:
After following these steps, Xcode was able to install the app prior to the test, recording worked, and the error went away.
Upvotes: 4