Search code examples
iosxcodeios9

Why does Xcode's unit tests always pass?


I want to use TDD in Xcode, but every at every run, even a failing

- (void)testThatFails {
    XCTAssertTrue(FALSE, @"FAIL");
}

will result in a "Test Succeeded" message from Xcode.

Also, I have no feedback from the tests on the console, saying which test were executed, etc...

Anybody has ever experienced the same problem?

I am using Xcode 7.1.1 and iOS 9.1.


Solution

  • As said in one of my comments, from Nov 24 '15 at 7:53

    Ok, I restarted my iPhone and it is now working fine !

    Strange but that's the way it is.

    Also, I never had the problem again since, and it's been more than 2 months.