[英]Jacoco for Android Instrumentation Test using AndroidJunit
I am facing an issue while creating an test report using jacoco for Android Instrumentation Test. 使用jacoco for Android Instrumentation Test创建测试报告时,我遇到问题。 I am using AndroidJUnit4 to create test cases.
我正在使用AndroidJUnit4创建测试用例。
Here is what I am doing: 这是我在做的事情:
Does anybody has idea how we can create reports using jacoco for test cases created using AndroidJunit4. 有谁知道我们如何使用jacoco为使用AndroidJunit4创建的测试用例创建报告。
Thanks 谢谢
Its very simple to get reports for just put the flag 只需标记一下即可获取报告非常简单
debug {testCoverageEnabled = true} 调试{testCoverageEnabled = true}
All other stuff will be taken care by gradle. 所有其他东西将由gradle照顾。 You can see the report under build/reports/coverage/buildType/
您可以在build / reports / coverage / buildType /下查看报告
I hope it will save somebody else's effort 我希望这可以节省别人的精力
可能是因为您给定的覆盖范围路径不正确-:使用gradle的prinln方法,还如下给出变量的打印值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.