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

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</

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值