Xcode 5.1打破了一些testing

由于更新到Xcode 5.1,我试图运行unit testing(XCTestSuite)时遇到了错误。 当我运行单独的testing方法时,在控制台上Error while reading test scope bundle时出现Error while reading test scope bundle并且没有结果。 当我运行testing文件的完整实现时,我看到:

 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)" 

然后testing似乎开始按预期运行。

如果您有一个名为MyApp Tests(注意空白)的testing目标,请尝试将该目标上的产品名称更改为MyApp_Tests。 产品名称将是MyApp_Tests.xctest,而不是MyApp Tests.xctest。

看起来像这是一个path问题。

我无法通过使用hjaltij的方法来运行单个testing,但添加了一个新的testing目标为我工作

TestNavigator>添加新的testing目标(加button)

然后在这个目标下创build新的testing类