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

Sonar Code Quality Testing Essentials
By :

When unit tests fail and success rate falls below 100 percent, the code coverage widget highlights the percentage value to notify us that something did not test as expected. Below the percentile value, you can view the number of total test failures. A failure means that a method inside a test annotated with @Test
did not pass the assertion check. Click on the percentage value or the failures number to get an overview of the affected classes. From there you can drill down from package level to class level and pinpoint the failing test. The numbers next to packages, classes, or methods are the total number of failures at the respective level.
![]() |
When you click on test class, the Sonar source viewer opens below the drill down panel with focus on the Tests tab. The header of the tab includes the following information from left to right:
Test success rate as percentile value
Total number of tests executed
Total number of failures
Total test duration in seconds
![]() |
In this...
Change the font size
Change margin width
Change background colour