shortstuffsushi
shortstuffsushi

Reputation: 2330

Xcode 5 -- Test target did not finish

Since earlier today, I cannot get my tests to pass when running them from Xcode 5. I know all the tests are passing, because I can run them from command line (well, a CI Job) and they're all passing there.

Have I accidentally changed some project setting or something to cause this? I can't figure out any way to get back to a good state -- I've tried dropping back several versions in our Git history, so I know it's not a code change...

Edit: After uninstalling and re-installing the application, all of the tests are running to completion, but my question still remains -- How did it get to this state?

Upvotes: 9

Views: 1570

Answers (6)

Prateek baheti
Prateek baheti

Reputation: 23

Maybe a little late now, but this is what worked for us : Go to build settings and under code signing - Set Debug and Release to "Don't Code sign" if you do not have a valid developer certificate.

Upvotes: 0

KoCMoHaBTa
KoCMoHaBTa

Reputation: 1519

For me, it appeared to be an issue with 64-bit Simulator. None of the tests could run on 64-bit, but when i switched to 32-bit, they started to run.

Upvotes: 1

Pellet
Pellet

Reputation: 2427

I managed to fix this by removing my call to the freopen() function which was redirecting the logs to a file. I also fixed it for a test by removing a couple of NSLog() calls which were printing large amounts of data to the console. Xcode must read the log as it is coming in to the window for checking if a test has finished or not and the huge amount of data being printed out must have broken its parser.

Upvotes: 0

tracy
tracy

Reputation: 384

I also had this issue. For me, the change that fixed it was to convert the Wrapper Extension in Build Settings from octest to xctest, as @owenfi answered here: XCTest did not finish in Xcode 5

Upvotes: 2

JP Hribovsek
JP Hribovsek

Reputation: 6707

I was having the same problem, in my case the problem arised after creating multiple targets/renaming targets.

To solve it, I had to select the test target in the 'target browser'(whatever the name is for that), then on the 'General' tab there is a single dropdown box labeled 'target'. Mine was set to 'none', which caused nothing to be tested. I had to re-set it to one of my valid targets for the tests to run.

Upvotes: 1

shortstuffsushi
shortstuffsushi

Reputation: 2330

Without receiving a better answer after a couple weeks, I'm going to answer my own question with the solution that seems to have worked for me.

A simple uninstall/reinstall from the simulator seems to fix the problem, though I've yet to determine what causes it, or why this fixes it.

Upvotes: 3

Related Questions