Joel Fischer
Joel Fischer

Reputation: 6597

Xcode 5.1 breaks some tests

Since updating to Xcode 5.1, I have been encountering errors while attempting to run unit tests (XCTestSuite). When I run an individual test method, I get the error Error while reading test scope bundle on the console and no result. When I run the full implementation of the test file, I see:

Unable to get entitlements for client task. Error: Error Domain=NSPOSIXErrorDomain Code=-1 "The operation couldn’t be completed. (POSIX error -1 - Unknown error: -1)"

Then the tests appear to start running as expected.

Upvotes: 6

Views: 1742

Answers (2)

Matt Key
Matt Key

Reputation: 95

I couldn't get it to run single tests by using hjaltij's method but adding a new test target worked for me

TestNavigator > Add New Test Target (Plus Button)

Then create new test classes under this target

Upvotes: 1

hjaltij
hjaltij

Reputation: 885

If you have a test target named something like MyApp Tests (notice the whitespace) try changing the product name on that target to MyApp_Tests instead. The product name will then be MyApp_Tests.xctest instead of MyApp Tests.xctest.

Seems like this is a path issue.

Upvotes: 4

Related Questions