如何在 Xcode 7 中使用代码覆盖率?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31096924/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use code coverage in Xcode 7?
提问by Bart?omiej Semańczyk
I know about new feature in Xcode 7 - Code Coverage. I know how to turn it on:
我知道 Xcode 7 中的新功能 - Code Coverage。我知道如何打开它:
go to Edit scheme-> Test-> Infotab -> enable Gather coverage data.
转到编辑方案->测试->信息选项卡 -> 启用收集覆盖数据。
I did it, run tests, and... Where is Test Reportfor my tests?
我做到了,运行了测试,然后……我的测试的测试报告在哪里?
回答by Bart?omiej Semańczyk
Since you turned it on in your scheme, and then build and test:
既然你在你的方案中打开了它,然后构建和测试:
Go to your Report navigator
转到您的报告导航器
Then select your last test:
然后选择你的最后一个测试:
Finally choose Coverage tab:
最后选择 Coverage 选项卡: