Cobertura not showing coverage for inherited class

488 Views Asked by At

I am facing one issue with cobertura coverage in generated report.

mvn cobertura:cobertura

I have a class like

public class ChildClass extends
         ReqBuilder<ReqTo, ContextStatic, ContextDynamic>

This line I am not able to cover. Why we need to cover for class declaration is what my question is.Because of this it is effecting branch coverage. Any help would be appreciated.

I have configured maven with cobertura

Thanks Pradeep

1

There are 1 best solutions below

0
Arindam On

It looks like there is a bug in Cobertura on this. But there is a workaround to solve this issue. You need to write a Test class for ReqBuilder.

Please refer : https://sourceforge.net/p/cobertura/bugs/92/