Skip to end of metadata
Go to start of metadata

Description / Features

Total Quality plugin combines four domain measures (architecture, design, code, and tests) in order to calculate a global and unified project quality health. Plugin provides metrics at project level only.

The default formula is:

TQ = 0.25*ARCH + 0.25*DES + 0.25*CODE + 0.25*TS

or 

TQ = 0.25*ARCH + 0.25*DES + 0.25*CODE + 0.25*OVERALL_TS (if computing Quality with IT Tests is enabled)

where:

Architecture (ARCH)

ARCH = 100 - TI

TI = Tangle Index

Design (DES)

DES = 0.15*NOM + 0.15*LCOM + 0.25*RFC 0.25*CBO + 0.20*DIT

NOM = (1 - (class_complexity - 12) / (acel * 12)) * 50 + (1 - (method_complexity - 2.5) / (acel * 2.5)) * 50

LCOM = (1 - (lack_of_cohesion_of_method - 1) / (acel * 1)) * 100

RFC = (1 - (response_for_class - 50) / (acel * 50)) * 100

CBO = (1 - (efferent_coupling - 5) / (acel * 5)) * 100

DIT = (1 - (depth_of_inheritance_tree - 5) / (acel * 5)) * 100

acel is an accelerator factor whose value can be configured in the Sonar settings page.
The default threshold for each metric can be also configured (for instance, 50 is the default response_for_class threshold).

Code (CODE)

Code = 0.15*DOC + 0.45*RULES + 0.40*DRYNESS

DOC = Documented API density

RULES = Rules compliance index

DRYNESS = 100 - Duplicated lines density

Test (TS)

Testing quality is based on coverage metric family (coverage, and test success).

Test = 0.80*COV + 0.20*SUC

COV = Code coverage

SUC = Unit Tests success density

Overall Test (OVERALL_TS)

Testing quality is based on coverage metric family (coverage, and test success).

Test = 0.60*TS + 0.40*IT_COV

TS = Test Quality of Unit Tests

IT_COV = Integration Tests coverage

Installation

  1. Install the Total Quality plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server

Usage

Run an analysis on the project to compute the Total Quality metrics.

Every threshold and every formula should be configured with administration view.
If you want to remove a metric just do,

"ARCH=0.25 DESIGN=0.25 CODE=0.50 TESTS=0.00"

To enable the computation of IT Tests in Test Quality metric you need to enable it by setting "true" the sonar.tq.it_tests.enabled property at global or project level.

TODO

Change Log

Release 1.1 (2 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-2591 Remove calls to deprecated Sonar API Major
New Feature SONARPLUGINS-1314 Integrate Total Quality plugin with JaCoCo plugin Major

 

Release 1.0.2 (1 issues)
Type Key Summary Priority
Task SONARPLUGINS-772 Use sonar-plugin packaging Major

 

Release 1.0.1 (1 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-537 Some metrics are currently not reported in Views Major

 

Release 1.0 (6 issues)
Type Key Summary Priority
Bug SONARPLUGINS-427 Total Quality metrics should be calculated only at project level Major
New Feature SONARPLUGINS-421 Add a widget to report on the dashboard Major
Bug SONARPLUGINS-419 Coverage for test index Major
Task SONARPLUGINS-418 prefer "org.sonar.plugins.totalquality" as a package name for plugin Major
Task SONARPLUGINS-417 Reformat your code according to Sonar code-style Major
New Feature SONARPLUGINS-416 Total Quality Basic Features Major

Labels
  • None