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

Chapter 10. Code Coverage and Testing

In this chapter, we will discuss how Sonar analyzes our unit tests, evaluating different code coverage criteria. The goal is to have Sonar identify untested code and guide developers as to what tests need to be written to improve the software quality. The platform leverages the functionality of popular Java code coverage engines and analyzes the collected coverage data taking into account other software measures such as complexity. Thus, Sonar enhances the monolithic code coverage analysis, as it adds more layers of information on top of percentile coverage results.

For example, low-complexity statements or blocks of untested code that are rarely executed pose a lesser threat than complex and frequently executed ...

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