Reviewing test results in Sonar

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 ...

Get Sonar Code Quality Testing Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.