Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replace Branch coverage by Condition coverage

...

NameKeyDescription

New issues

new_violations

Number of new issues.

New xxxxx issues

new_xxxxx_violations

Number of new issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

Issues

violations

Number of issues.

xxxxx issues

xxxxx_violations

Number of issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

False positive issuesfalse_positive_issuesNumber of false positive issues
Open issuesopen_issuesNumber of issues whose status is Open
Confirmed issuesconfirmed_issuesNumber of issues whose status is Confirmed
Reopened issuesreopened_issuesNumber of issues whose status is Reopened

Anchor
metricWeightedViolations
metricWeightedViolations
Weighted issues

weighted_violations

Sum of the issues weighted by the coefficient associated to each severity (Sum(xxxxx_violations * xxxxx_weight)).
To set the weight of each severity, log in as an administrator, go to Settings > General Settings > General > General and set the Rules weight property. The default value is:
( (Blocker_violatons * 10) + (Critical_violations * 5) + (Major_violations * 3) + Minor_violations )

Rules compliance

violations_density

Rules compliance index (RCI) = 100 - (Weighted issues / Lines of code * 100)
If the value is negative, it is rounded to 0%. 

Technical debtsqale_indexEffort in days to fix all issues. The measure is stored in minutes in the DB.

Severity

SeverityDescription
BlockerOperational/security risk: This issue might make the whole application unstable in production. Ex: calling garbage collector, not closing a socket, etc.
CriticalOperational/security risk: This issue might lead to an unexpected behavior in production without impacting the integrity of the whole application. Ex: NullPointerException, badly caught exceptions, lack of unit tests, etc.
MajorThis issue might have a substantial impact on productivity. Ex: too complex methods, package cycles, etc.
MinorThis issue might have a potential and minor impact on productivity. Ex: naming conventions, Finalizer does nothing but call superclass finalizer, etc.
InfoNot known or yet well defined security risk or impact on productivity.

...

MetricKeyDescription
Anchor
metricBranchCoverage
metricBranchCoverage
Branch Condition coverage
branch_coverage

On each line of code containing some boolean expressions, the branch condition coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible branches conditions in flow control structures that have been followed during unit tests execution.

Code Block
BranchCondition coverage = (CT + CF) / (2*B)

where

CT = branchesconditions that have been evaluated to 'true' at least once
CF = branchesconditions that have been evaluated to 'false' at least once

B = total number of branchesconditions
Branch Condition coverage on new codenew_branch_coverage

Identical to Branch Condition coverage but restricted to new / updated source code.

To be computed this metric requires the SCM Activity plugin.

Branch Condition coverage hitsbranch_coverage_hits_dataList of covered branchesconditions.
Condition coverage see Branch Condition coverage
Conditions by lineconditions_by_lineNumber of conditions by line.
Covered conditions by linecovered_conditions_by_lineNumber of covered conditions by line.
Anchor
metricCoverage
metricCoverage
Coverage
coverage

It is a mix of Line coverage and Branch Condition coverage. Its goal is to provide an even more accurate answer to the following question: How much of the source code has been covered by the unit tests?

Code Block
Coverage = (CT + CF + LC)/(2*B + EL)

where

CT = branchesconditions that have been evaluated to 'true' at least once
CF = branchesconditions that have been evaluated to 'false' at least once
LC = covered lines = lines_to_cover - uncovered_lines

B = total number of branchesconditions
EL = total number of executable lines (lines_to_cover)
Coverage on new codenew_coverage

Identical to Coverage but restricted to new / updated source code.

To be computed this metric requires the SCM Activity plugin .

Anchor
metricLineCoverage
metricLineCoverage
Line coverage
line_coverage

On a given line of code, Line coverage simply answers the following question: Has this line of code been executed during the execution of the unit tests?. It is the density of covered lines by unit tests:

Code Block
Line coverage = LC / EL

where

LC = covered lines (lines_to_cover - uncovered_lines)
EL = total number of executable lines (lines_to_cover)
Line coverage on new codenew_line_coverageIdentical to Line coverage but restricted to new / updated source code.
Line coverage hitscoverage_line_hits_dataList of covered lines.
Anchor
metricLinesToCover
metricLinesToCover
Lines to cover
lines_to_coverNumber of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).
Lines to cover on new codenew_lines_to_coverIdentical to Lines to cover but restricted to new / updated source code.
Skipped unit testsskipped_testsNumber of skipped unit tests.
Anchor
metricUncoveredBranches
metricUncoveredBranches
Uncovered branchesconditions
uncovered_conditionsNumber of branches conditions which are not covered by unit tests.
Uncovered branches conditions on new codenew_uncovered_conditionsIdentical to Uncovered branches conditions but restricted to new / updated source code.
Anchor
metricUncoveredLines
metricUncoveredLines
Uncovered lines
uncovered_linesNumber of lines of code which are not covered by unit tests.
Uncovered lines on new codenew_uncovered_linesIdentical to Uncovered lines but restricted to new / updated source code.
Anchor
metricUnitTests
metricUnitTests
Unit tests
testsNumber of unit tests.
Unit tests durationtest_execution_timeTime required to execute all the unit tests.
Anchor
metricUnitTestErrors
metricUnitTestErrors
Unit test errors
test_errorsNumber of unit tests that have failed.
Anchor
metricUnitTestFailures
metricUnitTestFailures
Unit test failures
test_failuresNumber of unit tests that have failed with an unexpected exception.
Unit test success density (%)test_success_densityTest success density = (Unit tests - (Unit test errors + Unit test failures)) / Unit tests * 100

...