如何清除 Xcode 中的单元测试结果?
我在 Xcode 4 中清除单元测试的测试结果时遇到问题。基本上,我运行的单元测试会产生正常的警告。但是,当我切换到常规捆绑包并运行构建时,单元测试结果仍然存在。
有什么方法可以从问题导航器中清除它们吗?
基本上,我想要一种清除问题导航器的方法。
I'm having trouble clearing the test results for unit tests in Xcode 4. Basically, I ran a unit test which results in normal warnings. But, when I switch to regular bundle and run a build, the unit test results are still sticking around.
Is there any way to clear them from the Issue Navigator?
Basically, I want a way to clear the Issue Navigator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
编写 Kiwi BDD 测试后,我必须完全关闭我的项目并重新打开它以清除测试导航器中的测试用例。
After writing Kiwi BDD tests I have to completely close my project and reopen it to clear test cases in the Test navigator.
从 Xcode 12.5 开始,“产品”菜单下有一个名为“清理测试结果”的新菜单项,默认键盘快捷键为 control-option-command-K。这将从所有测试中清除红色/绿色徽章。
As of Xcode 12.5, there's a new menu item under the Product menu called Clean Test Results with a default keyboard shortcut of control-option-command-K. That will clear the red/green badges from all tests.
回答我自己的问题。看来您必须切换回单元测试方案,清除构建文件夹,然后切换回项目以防止问题再次出现。
To answer my own question. It appears you have to switch back to the Unit Test scheme, clear the build folder, then switch back to the project to keep the issues from popping back up.
删除
~/Library/Developer/Xcode/DerivedData//Logs/Test
中的所有日志PS:最简单的快捷方式Xcode 中的文件夹为:
Delete all the logs in
~/Library/Developer/Xcode/DerivedData/<project>/Logs/Test
PS: the easiest way to shortcut to this folder within Xcode is: