I have a Utility class, which consists of certain Strings and a private constructor. Using Reflections I have tested that constructor as well and these strings are used in turn in other classes for which tests are there. Jacoco shows full code coverage. When I run it in Sonar, the coverage shows these constructors and Strings are not covered. Why is it so? Sonar picks up the Jacoco reports for showing up coverage( If I am right). Then why is this inconsistency. Thanks in Advance
Asked
Active
Viewed 314 times
0
-
1Check the versions of jacoco and sonar-java plugin and have a look at https://stackoverflow.com/questions/49879009/what-is-the-difference-between-jacoco-branch-coverage-and-sonar-condition-covera/49903432#49903432 – Gerald Mücke May 30 '18 at 13:28
-
Sonar Java version is 5.2.0.13398 and uses Jacoco 0.8.1 and Jacoco version I am using is also 0.8.1. Still shows a different coverage – Chinniah Annamalai Jun 01 '18 at 05:32
-
@GeraldMücke still I am facing the issue, any idea what's the fix, versions look similar – Chinniah Annamalai Jun 14 '18 at 06:27
-
not really, maybe you could try the community forum to get any help – Gerald Mücke Jun 14 '18 at 07:42