Multimodule Coverage in Intellij
I am working on a large multimodule project with dozens of projects that have internal dependencies. In order to see the true coverage of a class I need to run coverage on multiple projects. As it is now I have to memorize the dependencies and manually run coverage on each project one at a time. This takes an inordinately long time to do.
Is there any (reasonable) way to run coverage on a (maven) multimodule project?
Please sign in to leave a comment.
I would suggest to use Jacoco: "JaCoCo version 0.7.7 implemented a new maven goal jacoco:report-aggregate. This report aggregates coverage data across Maven modules." see https://github.com/jacoco/jacoco/wiki/MavenMultiModule for the details. It's supported by idea (but currently project must be compiled to see coverage data)
I have used Jacoco for SonarQube integration, but I was hoping to run and view coverage in my favorite IDE (hence the post here.)
Even if I update my POMs for JaCoCo and manually run jacoco:report-aggregate from the command-line, I still can't get the output to load into the ide. Is there a setting I need to get Intellij to parse the JaCoCo file?
Run | Show Coverage Data should be able to load jacoco *.exec files. Regarding report-aggregate, this discussion on generating exec files can be helpful https://groups.google.com/g/jacoco/c/bFJlLT0sROk