如何在本地获得JaCoCo的整体报道?

时间:2019-11-13 02:33:25

标签: gradle jacoco gradle-plugin jacoco-maven-plugin

我有一个包含多个模块的android项目。而主要模块是应用程序模块。

这就是我要做的,可以得到单独的报告。没有应用/构建报告。

zgong$ ./gradlew jacocoTestReport
zgong$ ls -la */build/reports/jacoco/jacocoTestReport/html/index.html
account/build/reports/jacoco/jacocoTestReport/html/index.html
bootstrap/build/reports/jacoco/jacocoTestReport/html/index.html
cards/build/reports/jacoco/jacocoTestReport/html/index.html
common/build/reports/jacoco/jacocoTestReport/html/index.html
explore/build/reports/jacoco/jacocoTestReport/html/index.html
launcher/build/reports/jacoco/jacocoTestReport/html/index.html
payment/build/reports/jacoco/jacocoTestReport/html/index.html
runtime/build/reports/jacoco/jacocoTestReport/html/index.html
settings/build/reports/jacoco/jacocoTestReport/html/index.html
transactions/build/reports/jacoco/jacocoTestReport/html/index.html
uibase/build/reports/jacoco/jacocoTestReport/html/index.html
widget/build/reports/jacoco/jacocoTestReport/html/index.html

我能得到像詹金斯报告中看到的那样的视觉报告吗?

1 个答案:

答案 0 :(得分:0)

您需要将所有报告合并为一个报告。

这里有很多建议:https://discuss.gradle.org/t/merge-jacoco-coverage-reports-for-multiproject-setups/12100/9