RFC: JMC-5657: Code coverage with Jacoco

Carmine Vincenzo Russo carusso at redhat.com
Tue May 7 08:35:29 UTC 2019

Hello everyone,

This patch adds Jacoco coverage over unit test in JMC.
The module covered in particular are: /core/tests and /application/tests.

The patch addresses the issue JMC-5657[0], but as noted by Klara Ward[1],
instead of adding Jcov, it's better to add Jacoco.

For the time being, each test group had a new module, report, where an
aggregate-report can be found.
You need to run 'mvn verify' in jmc root for /application/tests and in
/core for /core/tests to have the coverage report.

There are also some aspects that concern me, so: Is this what we are
looking for?
The report for /core[2] looks good and clean. The report for
/application/tests[3][4] has good results, although there are some 0%, and
that is ok, but also some N/A. Should we keep the modules in the report
with only N/A?

There are also some changes in /application/uitests when reading the patch,
they are not yet applied but I would like to add them to the next patch.
This brings me to my second concern: should the tests and uitests in
/application have a unique report or should I keep them separate?

Lastly, do we want coverage with every verify build or do we want a maven
profile/flag to have the coverage only in some occasions?

Overall, how does the patch look like? Do you think there are some more
modules that need to be covered? And do you have any suggestions on how to
improve what I've done?


[0] https://bugs.openjdk.java.net/browse/JMC-5657
[1] http://mail.openjdk.java.net/pipermail/jmc-dev/2019-March/000882.html
[2] https://imgur.com/hPyyLsQ
[3] https://imgur.com/fqdzGvH
[4] https://imgur.com/ozqNcAB

Carmine Vincenzo Russo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5657-0.patch
Type: text/x-patch
Size: 28850 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/jmc-dev/attachments/20190507/8d4917f1/5657-0-0001.patch>

More information about the jmc-dev mailing list