当前位置: 代码迷 >> 综合 >> [敏捷开发培训] SonarQube中的Metric Definition — Tests
  详细解决方案

[敏捷开发培训] SonarQube中的Metric Definition — Tests

热度:27   发布时间:2024-01-15 19:04:55.0

SonarQube中的 Metric Definition — Tests

度量指标 算法和说明
条件覆盖率 Condition coverage(branch_coverage)

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

Condition coverage = (CT + CF) / (2*B)
where

  • CT = conditions that have been evaluated to 'true' at least once
  • CF = conditions that have been evaluated to 'false' at least once
  • B = total number of conditions

新代码的条件覆盖率

Condition coverage on new code (new_branch_coverage)

与条件覆盖率相同,但仅限于新的/更新的源代码。

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

条件覆盖命中率

Condition coverage hits</

  相关解决方案