3

Possible Duplicate:
Some of my unit tests tests are not finishing in XCode 4.4

I've just upgraded to XCode 4.4. I've created a new project and included unittesting. When running the tests I get a warning "All tests did not finish".

Colleagues with clean installs of xcode 4.4 have exactly the same problem. They did not type a single letter of code and only created a new project that included unittests.

What did we do wrong and how can we solve the problem?

enter image description here

Community
  • 1
  • 1

4 Answers4

1

Have seen this. It was caused by a bug in the code ("unrecognized selector sent to instance"), which caused the tests to hang.

oliver
  • 111
  • 1
  • 4
0

I was having the same problem. I noticed that my original test class (MyAppTests), inserted by Xcode, had no tests. So in the test output I had

Test Suite 'MyAppTests' started at 2012-08-18 14:30:27 +0000
Test Suite 'MyAppTests' finished at 2012-08-18 14:30:27 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds

I then inserted

- (void)testNothing {
}

into MyAppTests.m and the warning went away.

Rik Renich
  • 774
  • 6
  • 12
0

I am seeing a similar issue.

Scenario: Create a new iOS single-view app with unit tests. Xcode generates an Tests class with a testExample method. testExample has an unconditional STFail(), so the tests should always fail. Running the tests via Command+U, 9 times out of 10 Xcode says "Test Succeeded". About 50% of the times 10 the toolbar also says "No Issues", the other 50% it displays an error while still saying "Test Succeeded".

Looking at the log, there is always a "All tests did not finish" warning.

This looks like a timing issue: If I add an [NSThread sleepForTimeInterval:3] in testExample, the test target consistently fails, as expected.

agherardi
  • 103
  • 4
0

See my answer to this (duplicate) question for a possible workaround: Some of my unit tests tests are not finishing in XCode 4.4

Community
  • 1
  • 1
Sam Deane
  • 1,553
  • 1
  • 13
  • 17