Francis Bacon
Francis Bacon

Reputation: 4755

How to get overall JaCoCo coverage locally?

I have an android project which has several modules. And the main module is app module.

Here is what I do and could get the separate report. no app/build report.

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

Could I get a visual report like what I see in the Jenkins report?

Upvotes: 1

Views: 724

Answers (1)

Cisco
Cisco

Reputation: 23042

You need to merge all reports into a single one.

There are many suggestions here: https://discuss.gradle.org/t/merge-jacoco-coverage-reports-for-multiproject-setups/12100/9

Upvotes: 1

Related Questions