In a Maven multi module project, is it expected that a class written in one module but tested in a different module does not have any code coverage information ? There are already a few topics here, but I’m not able to find the answer.
I’ve reproduced that in a small project. ModuleC depends on ModuleB, which in turn depends on ModuleA. Only one unit test, in ModuleC, instantiating classes from all modules. Analysis result in SonarQube shows that classes in ModuleA don’t have any coverage ; the only classes with coverage are in ModuleB and C (so same module and direct dependency). Is that the expected result, or am I missing something ? Property
sonar.coverage.jacoco.xmlReportPaths is to my mind correctly set.
Reproduced on SonarQube 8.1 / JaCoCo 1.1.0. Analysis is executed with
mvn clean verify sonar:sonar.