Newly added unit files in Java are not being analyzed by sonar and shows 0.0 coverage in Report

Hi Team,
I have a query in Sonarqube report generation. We have added a new class and have covered testcases for the same but in the sonar report it says zero(0) lines have covered. Does that mean sonar scanner has not included this file for coverage.

Can any one guide on how to fix the issue of sonarqube uncovered lines, even though unit tests for the classes has been included.

Please find more details below

  • Sonar 7.9
  • I am trying to improve the code coverage to 80%
  • Added unit tests for the uncovered lines in java

Hello @yazhc,

Welcome to the SonarSource community. :wave: :christmas_tree:. Hope you’ll enjoy it.
Coverage is not imported completely by magic. You usually have to do a few things for it to be imported.
Please check out the multiple guides posted related to coverage import at:
https://community.sonarsource.com/search?q=jacoco%20category:22

Olivier