Search code examples
androidjacocoandroid-jacoco

merge report.xml generated by jacoco to one report


I have an android project with many modules, we run our unit tests in PRs just for changed modules, so our generated jacoco report is at the module level, but now I need a aggregated report,
is it possible to merge all report.xml after generating? so far I found a few ways that you can create an aggregated report for the whole project, but since I don't run my unit tests for all modules in the project for each PR is there any way to create an aggregated report for some modules in a project?


Solution

  • Jacoco provides report-aggregate goal to generate a merged reports from multiple Maven modules. Check the documentation for more details.