2snacc
2snacc

Reputation: 6353

iOS UnitTest target stopped running my SenTestCases, why?

I have a static library project with a UnitTest target using the built-in SenTestingKit framework. Whilst banging around the project, I toggled some setting and now when I build the UnitTest target, none of my test cases are run. What could be going wrong?

NOTE: I already solved this problem and am about to answer my own question, just hope that this saves someone else in the community some time.

Upvotes: 0

Views: 211

Answers (2)

Matt S.
Matt S.

Reputation: 1892

Just came across this old Q/A, and just to update, it's no longer true for the changes in iOS 7. You can run unit tests on device just fine, and Xcode Build Services in fact recommends this approach.

Upvotes: 0

2snacc
2snacc

Reputation: 6353

SenTestCases will only be discovered and run if you are building for Simulator. If you build for Device, it will look as if all the tests have passed, but in fact no tests have run at all. Toggle the build setting back to Simulator and the tests should run normally.

Upvotes: 1

Related Questions