How to Achieve Aggregation of Similar Packages in Jacoco

27 views
Skip to first unread message

Samrat Chakraborty

unread,
Apr 8, 2025, 1:48:40 AMApr 8
to JaCoCo and EclEmma Users
Currently I am using Jacoco and it lists all the packages but lets say I want to group similar packages together is there a way jacoco does that. Also the group should show the aggregated coverage percentage.

Example:

I have three Packages:
- A.x
- A.y
- A.z

Can I group these 3 Packages under A and when I click on A in the report then it should expand and show all three packages.

Marc Hoffmann

unread,
Apr 8, 2025, 1:51:58 AMApr 8
to jac...@googlegroups.com
Hi,

as Java packages are technically independent JaCoCo’s HTML report does not support this. Only the numbers for the classes in A will be shown when you select package A. There is no option to render it differently.

Regards,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jacoco/7b340913-1192-4c59-b249-239428c42c6dn%40googlegroups.com.

Sushma Suresh

unread,
Apr 9, 2025, 4:09:19 PMApr 9
to JaCoCo and EclEmma Users
I have question in similar lines what about classPaths in a single package. Example if we have a classpaths like org.a.b.c and other are like org.a.b.d in this case will it be able to provide tree structure till org.a.b?
and in org.a.b you have c and d's coverage reports. We have seen this working when you add jacoco as a library dependency to packages but not when generating html reports, so wondering what is the difference in the two methods. 
Reply all
Reply to author
Forward
0 new messages