-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Sonar Code Quality Testing Essentials
By :

After a Sonar analysis, the first place to review testing coverage is within the project dashboard. A dedicated widget reports total coverage in percentage form, breaking down to line and branch coverage as shown in the following screenshot:
![]() |
Click on any metric from the left widget section to drill down to package level. Packages are listed along with the coverage metric as a percentage and clicking on them lists their respective classes and coverage value on the right side of the panel.
![]() |
Click on a class to open the Sonar source viewer with focus on the coverage tab. You can view a summary of the following metrics at the top of the tab for the corresponding class. Below the metrics, you can select from the menu on the right which parts of the source are displayed, for example, the lines or branches to cover.
Line coverage—in percentage
Branch coverage—in percentage
Uncovered lines—absolute values
Uncovered branches—absolute values
Statements reached by a unit...
Change the font size
Change margin width
Change background colour