[英]AndroidStudio: JaCoCo code coverage report's 0% for coverage
I've recently brought code coverage into my project. 我最近把代码覆盖带到了我的项目中。 It creates a report, which I can view, and it seems to be working great.
它创建了一个我可以查看的报告,它看起来效果很好。
The only problem is it is missing my tests - I don't have GREAT code coverage right now, but it reports 0% coverage for all classes and other files. 唯一的问题是它缺少我的测试 - 我现在没有GREAT代码覆盖率,但它报告所有类和其他文件的0%覆盖率。
I can see the tests being run, and can see them passing, but they aren't being counted. 我可以看到正在运行的测试,并且可以看到它们通过,但它们没有被计算在内。
My configuration is: 我的配置是:
android {
compileSdkVersion 18
buildToolsVersion '21.1.1'
...
debug {
minifyEnabled false
testCoverageEnabled = true
}
}
This might be related to this issue: 这可能与此问题有关:
https://code.google.com/p/android/issues/detail?id=170607 https://code.google.com/p/android/issues/detail?id=170607
It's working (again) with 它正在(再次)工作
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.