2

Tools :

Jacoco maven plugin

Issue :

I am working on a multi-module project. The project structure is described as below -

Module1

Module1Test

Module2

Module2Test

I am able to generate the jacoco report for the Test module . The jacoco report was not coming due to " Skipping JaCoCo execution due to missing classes directory" . But I managed to solve that error by following here . I copied source class files into target of test module.

Now report gets generated successfully. But I am yet not able to navigate to individual source files through report generated . The individual methods are not navigable to see which lines are covered and which are not.

Can anybody please advice what needs to be done to get navigation to source files enabled ? Do I need to copy source files also in Test Folder ?

Atul
  • 1,560
  • 5
  • 30
  • 75
  • Atul, I assume you are using Jacoco Plugin (within Jenkins) to publish the Code Coverage report. If that's the case, then you'll have to make sure that the boxes for class files should only store the path for main classes (i.e. src/java/main --> build/classes/main in Gradle or target/classes/main) so you'd use "build/classes/main" (if you use gradle) in the classes box. For source path box, you have to use "the main source code path i.e. src/java/main (i.e. where the source code is). see `?` help for each box. – AKS May 07 '18 at 18:59

0 Answers0