[英]Code coverage for Developer pod unit tests
Right now I'm unit testing my Developer CocoaPods which is working fine. 现在我正在测试我的Developer CocoaPods,它运行正常。 Tests are running and working inside the Example project. 测试正在Example项目中运行并运行。
However, the code coverage only takes coverage of the project files, not the Developer pod files: 但是,代码覆盖率仅覆盖项目文件,而不是Developer pod文件:
I'm looking for a way to give feedback about the pod code coverage. 我正在寻找一种方法来提供有关pod代码覆盖率的反馈。 Any ideas? 有任何想法吗?
This problem is known and a solution is given on Cocoapod's github . 这个问题是已知的,并且在Cocoapod的github上给出了解决方案。
The solution should be to enable code coverage on the library as well. 解决方案应该是在库上启用代码覆盖。 But this doesn't work for my new pod. 但这不适用于我的新吊舱。 However, testing the library by adding the test target to its "Test" actions does work. 但是,通过将测试目标添加到其“测试”操作来测试库确实有效。 But I also see coverage for others pods, which is not what I want. 但是我也看到了其他豆荚的报道,这不是我想要的。
Also, we have another project which, by running tests on the demo app's scheme, shows the code coverage for the pod's files, as expected. 此外,我们还有另一个项目,通过在演示应用程序的方案上运行测试,按预期显示pod文件的代码覆盖率。 Can't find the differences between the two projects. 找不到两个项目之间的差异。
So this is a "search in progress" bug. 所以这是一个“正在搜索”的错误。
Update: this answer worked for me. 更新: 这个答案对我有用。
Dummy guide for @teriiehina's answer. @ teriiehina答案的虚拟指南。
Test
单击Test
Click Build
单击Build
Click +
in the lower-left corner. 单击左下角的+
。 Select the development pod target 选择开发窗格目标
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.