

The Breaking Point is the right metric to prioritize issues fix. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issue. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issue unfixed costs as much as the estimated effort to fix it. The Severity of an issue is estimated through thresholds from the Annual Interest. The amount of Debt is not a measure to prioritize the effort to fix issues, it is an estimation of how far the team is from clean code that abides by the rules set.įor each issue the Annual Interest estimates the annual cost to leave the issues unfixed.

The Debt Rating and Debt Ratio are also shown for informational purpose. Since untested code often generates a lot of Debt, the type size and percentage coverage is shown (just uncomment t.PercentageCoverage in the query source code once you've imported the coverage data). This query lists types with most Debt, or in other words, types with issues that would need the largest effort to get fixed.īoth issues on the type and its members are taken account. To achieve high coverage and low risk, make sure that new and refactored classes gets 100% covered by tests and that the application and test code contains as many checks/assertions as possible.

These are indicative thresholds and in practice the more the better. This quality gate defines a warn threshold (80%) and a fail threshold (70%). The important part is that a test must fail explicitely when a check gets unvalidated during the test execution. These checks can be done both in test code, and in application code through assertions. But coverage is not enough the team needs to ensure that results are checked at test-time. A program with high code coverage, measured as a percentage, has had more of its source code executed during testing which suggests it has a lower chance of containing undetected software bugs compared to a program with low code coverage.Ĭode coverage is certainly the most important quality code metric. Code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite.
