0

I have problem with running my unit test in Xcode 5.0. In logs every message is doubled, but checking with breakpoint show that every test runs once.

Test Suite 'Multiple Selected Tests' started at 2013-11-06 07:56:23 +0000
Test Suite 'Multiple Selected Tests' started at 2013-11-06 07:56:23 +0000
Test Suite 'ProjectTests.xctest' started at 2013-11-06 07:56:23 +0000
Test Suite 'ProjectTests.xctest' started at 2013-11-06 07:56:23 +0000
Test Suite 'ColorResourcesTests' started at 2013-11-06 07:56:23 +0000
Test Suite 'ColorResourcesTests' started at 2013-11-06 07:56:23 +0000
Test Case '-[ColorResourcesTests test_createDarkGrayColor_Should_ReturnDarkGray]' started.
Test Case '-[ColorResourcesTests test_createDarkGrayColor_Should_ReturnGray]' started.
Test Case '-[ColorResourcesTests test_createDarkGrayColor_Should_ReturnGray]' passed (0.000 seconds).

Test Case '-[ColorResourcesTests test_createDarkGrayColor_Should_ReturnGray]' passed (0.000 seconds).

KamilPyc
  • 376
  • 1
  • 5
  • XCTests are pretty buggy atm. Try restarting Xcode and run the tests again. – Mikael Nov 06 '13 at 08:33
  • Already restarted multiple times, also checked that on multiple Macs. It is not big issue but it break my Jenkins build... – KamilPyc Nov 06 '13 at 08:42
  • What happens if you only run one test? If it still doesn't work you should probably file a bug. – Mikael Nov 06 '13 at 08:44
  • I was using code coverage fix from this question http://stackoverflow.com/questions/19136767/generate-gcda-files-with-xcode5-ios7-simulator-and-xctest, problem was with ** XCTestLog** in user defaults – KamilPyc Nov 06 '13 at 10:05
  • Cool, add that as an answer to your question :) – Mikael Nov 06 '13 at 10:08

1 Answers1

0

I was using code coverage fix from this question stackoverflow.com/questions/19136767/…, problem was with XCTestLogin user defaults. (Generate gcda-files with Xcode5, iOS7 simulator and XCTest)

#ifdef DEBUG
    + (void)initialize {
        [[NSUserDefaults standardUserDefaults] setValue:@"XCTestLog,GcovTestObserver"
                                                 forKey:@"XCTestObserverClass"];
    }
#endif
Community
  • 1
  • 1
KamilPyc
  • 376
  • 1
  • 5