知识卡片
测试覆盖率不能代替可信度
覆盖率工具常只统计某些测试形式,无法代表压力、故障或数据库测试质量。评估可依赖性时应同时看稳定通过率、测试类型与关键契约覆盖,不能只凭一个百分比放行迁移。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第5章《Assessments》(源文件:`_epub-src/OPS/ch05.xhtml`,归一化正文 [50294:54500))
- 结论依据:原文说单一覆盖率分数忽略压力、混沌、数据库及配置测试,也可能混淆测试种类。
- 原始内容:What is more important: a 100% pass rate or 100% test coverage? Trick question: 100% test coverage is a myth. Tools that give you a simple score for your test coverage typically only judge simple test types like unit tests, contract tests, and integration tests implemented in common frameworks like JUnit ( https://junit.org/junit5/ ).