Good news, just solved it by luck. sbt doesn't recognize junit tests so we are using junit-interface as a dependency in build.sbt for making them detectable. It turns out that junit-interface 0.9 that I was using, wasn't collaborating well with jacoco plugin, but I solved the issue just by downgrading to junit-interface 0.8.
0% code coverage jacoco4sbt 2.0.0, sbt 0.12.2
質問
I have an sbt scala project, but actually I have only java code, and I am using junit for testing. I added the jacoco4sbt 2.0.0 plugin, but I am in the following situation:
in project_folder/src/test/java i have the following test packages: ftest, map, util
- When I am running sbt test, all my tests are run and compiled (55 in total)
- When I run jacoco:cover in sbt only the 13 tests included in the util package are run, and have a percentage greater than 0 in my jacoco html report, the rest of the tests part of ftest and map package have a 0% coverage.
Any idea why is this happening?
Thanks!
解決
所属していません StackOverflow