[英]Xcode test cases shows no test coverage
I'm having problem with getting code coverage in Xcode. 我在Xcode中获取代码覆盖率时遇到问题。 It was working at some point of time, however after sometime it has just stopped showing coverage. 它在某个时间点工作,但是在一段时间后它刚刚停止显示覆盖范围。 I've checked both the schemes and test coverage plane for the appropriate settings. 我已经检查了方案和测试覆盖平面以获得适当的设置。
This is how my scheme looks like: 这是我的计划的样子:
This is what my test coverage plane shows after running test cases: 这是我的测试覆盖平面在运行测试用例后显示的内容:
I tried many many things to get this fixed. 我尝试了很多东西来解决这个问题。 Finally I ended up deleting all Xcode I had in the Mac, and cleared all the meta-data from /Users/bbirani/Library/Developer/
. 最后,我最终删除了Mac中的所有Xcode,并清除了/Users/bbirani/Library/Developer/
所有元数据。 After all this clean-up, I re-installed Xcode and VOILAA!! 在完成所有这些清理之后,我重新安装了Xcode和VOILAA !! it started working. 它开始工作了。
It happens to me a lot. 它发生在我身上很多。 Try restarting your xcode as well as the simulator(if you are using one). 尝试重新启动您的xcode以及模拟器(如果您使用的是)。 It seems like an xcode issue. 这似乎是一个xcode问题。
Maybe try using Slather instead? 也许尝试使用Slather代替? https://cocoacasts.com/how-to-generate-code-coverage-reports-in-xcode-with-slather https://cocoacasts.com/how-to-generate-code-coverage-reports-in-xcode-with-slather
You can try some of this 你可以试试其中一些
I hope your problem gets solved, I got stuck to the same problem before and it was frustrating to solve that, and you never know which way might work. 我希望你的问题得到解决,我之前遇到了同样的问题,解决这个问题令人沮丧,你永远不知道哪种方式可行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.