sbt / sbt-jacoco

an sbt plugin for JaCoCo Code Coverage
https://scala-sbt.org/sbt-jacoco/
Eclipse Public License 1.0
123 stars 67 forks source link

Coverage for java code files #179

Open plouf142 opened 3 years ago

plouf142 commented 3 years ago

Expected vs Actual Behaviour

It should have coverage report for all source, java source AND scala source.

Instead it, I get a voerage report only for scala source.

Steps to Reproduce

Any Play Framework with Java language and unit tests...

And run sbt jacoco.

Examine the html report. Only scala files are listed.

Environment

plouf142 commented 2 years ago

After various tests, I found a clue for this issue in the Jacoco FAQ, question Why does a class show as not covered although it has been executed? I followed the various suggestions, without success.

But now I wonder if this is really the way to go. In any case, the java classes are well instrumented, it is only when generating the report that there is a loss.

jonvnieu commented 2 years ago

Our project is running into the exact same issue. Are there any updates or known workarounds for this?