No Coverage despite unit tests on an open source project


I love and I have 2 open source projects there (thank you!). Unfortunately, one of them does not seem to report any coverage despite having some unit tests running.

I must have stuffed up my pom.xml for Flatpack but I cannot see it and this is driving me nuts.

As you can see, one project reports coverage and the other one (Flatpack) does not.

Any pointer toward my mistakes would be greatly appreciated.


Hi Benoit,

If you try to generate native JaCoCo report ( report goal of jacoco-maven-plugin ) , I’m pretty sure that this one will also be empty. To me seems that reason is that JaCoCo agent is not actually used during execution of tests and this is pretty common mistake described in JaCoCo documentation - see JaCoCo - jacoco:prepare-agent , which states:

If your project already defines VM arguments for test execution, be sure that they will include property defined by JaCoCo.

define “argLine” as a Maven property rather than as part of the configuration of maven-surefire-plugin:

  <argLine>-your -extra -arguments</argLine>
    <!-- no argLine here -->

However you do exactly opposite

Hope this helps.


Wow Evgeny… thank you for that! It seems to work.