O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required