📜  条件覆盖率测试

📅  最后修改于: 2020-12-04 06:05:29             🧑  作者: Mango


什么是条件覆盖率测试?

条件覆盖率也称为谓词覆盖率,其中每个布尔表达式都被评估为TRUE和FALSE。

if ((A || B) && C)
{
  << Few Statements >>
}
else
{
   << Few Statements >>
}

结果

为了确保上述示例的完整条件覆盖标准,应针对“ true”和“ false”至少评估一次A,B和C。

So, in our example, the 3 following tests would be sufficient for 100% Condition coverage testing.
A = true  | B = not eval | C = false
A = false | B = true     | C = true
A = false | B = false    | C = not eval