您可以通过许多方法来测量代码覆盖率:通过评估代码行或语句的覆盖面、条件覆盖面、分支覆盖面等等。
You can measure code coverage in several ways: by assessing line or statement coverage, condition coverage, branch coverage, and so on.
还必须考虑测试的类型,结合成功路径和边界条件,来获得尽可能好的覆盖率。
You have to also consider the types of tests, with both happy paths and boundary conditions, to have the best possible coverage.
报告分支覆盖的工具试图度量决策点(比如包含逻辑AND或OR的条件块)的覆盖率。
Tools that report branch coverage attempt to measure the coverage of decision points, such as conditional blocks containing logical ANDs or ORs.
应用推荐