【问题标题】:Jacoco 0.8.2 and Android Gradle plugin 3.2.0 test coverageJacoco 0.8.2 和 Android Gradle 插件 3.2.0 测试覆盖率
【发布时间】:2018-12-19 22:57:30
【问题描述】:

我刚刚找到了一个由于 Android Gradle 插件 3.2.0 而导致的部分覆盖率报告问题

Jacoco 只为我的项目不到 10% 生成覆盖率报告。如果我恢复到 3.1.4,它将按预期运行。

AGP 3.2.+ 和 JaCoCo 测试覆盖率是否存在任何已知问题?

【问题讨论】:

    标签: android-gradle-plugin jacoco test-coverage android-gradle-3.0


    【解决方案1】:

    在没有Minimal, Complete, and Verifiable example 演示重现您的困难的步骤的情况下,只能猜测。

    Simple search in bugtracker of Android Gradle Plugin by word "JaCoCo"举例说明

    原因相同

    类文件的位置已更改在较新版本的 AGP 中。你需要 改变

    def debugTree = fileTree(dir: “${buildDir}/intermediates/classes/debug”,不包括:fileFilter)

    def debugTree = fileTree(dir: "${buildDir}/intermediates/javac/debug", 排除:文件过滤器)

    附:将旧报告与新报告并排比较也可以提供提示

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-05
      相关资源
      最近更新 更多