Unit Test Coverage

Unit Test Coverage

Overview

Overview

Definition (Hover Text)

is a measurement of the amount of code that is run by unit tests - either lines, branches, or methods

Source Tools

SonarQube, Sonar Cloud

Graph type

Multiple Lines

Filters

Sonar Project

Hover Format on KPI

Date Range: << Percentage Value>>

Fields on Explore

  • Project

  • Job Name

  • Unit test Coverage

  • Week

Business Logic

Calculation Formula

The calculation is done directly in Sonarqube

Trend

Higher the percentage, better is the Quality

Maturity Levels

M1 - <20%

M2 - 20-40%

M3 - 40-60%

M4 - 60% - 80%  

M5 - > 80%

Instance level thresholds

-

Configurations

Processor Fields

NA

Mandatory fields

NA

How to Validate KPI

Suggested ways of working

 

Sample JQLs

 

Benefits of KPI

How does the KPI help

The Unit Test Coverage KPI is a vital metric that aids teams in enhancing code quality, minimizing bugs, and boosting development efficiency by evaluating the proportion of code that is tested through unit tests. This KPI promotes early detection of bugs, supports effective refactoring, and facilitates the successful adoption of continuous integration and delivery practices.

© 2022 Publicis Sapient. All rights reserved.