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

Sonar Code Quality Testing Essentials
By :

To better understand how Sonar works and to be in a position to better evaluate code coverage results, it is necessary to take a closer look at how code coverage tools analyze tests and calculate total coverage. The result of the coverage analysis process, although expressed as a single percentage number in Sonar, is based on many different coverage metrics.
Next, we will examine four fundamental coverage metrics used by all code coverage tools supported by Sonar:
Statement coverage
Branch coverage (also known as decision coverage)
Condition coverage
Path coverage
Statement coverage is the most basic metric of the analysis process. It is the building block element for the rest of the metrics. The metric reports whether a statement was encountered during test execution. Usually, statements and lines coincide, thus the metric is also known as line coverage. Once a line of code is encountered, it is considered as covered. This has the side effect of not...
Change the font size
Change margin width
Change background colour