知识卡片
测试金字塔平衡范围和成本
测试金字塔以大量快速、隔离的单元测试为基础,向上加入范围更广的服务测试与少量端到端测试。范围越大越能观察组件协作,但定位失败、执行与维护成本通常也更高。测试替身是由测试控制、代替外部依赖的对象,用来维持单元测试隔离。它是分配测试投资的参考,不应把“端到端最接近真实”误读成应由端到端测试包揽全部验证。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
The test automation pyramid shows the trade-offs that exist in terms of confidence, isolation, and scope. By testing small parts of the codebase, you have better isolation and faster tests; however, this does not give confidence that the whole application is working. By testing the entire application in its ecosystem, the opposite is true.
参考来源
- 位置:《Mastering API Architecture》第2章《Testing APIs》之《Test Pyramid》(源文件:_epub-src/OEBPS/ch02.xhtml)
- 结论依据:原文比较小范围测试的速度与隔离性、全系统测试的协作信心和维护成本,并列出单元、服务、端到端三层。
- 原始内容:The test automation pyramid shows the trade-offs that exist in terms of confidence, isolation, and scope. By testing small parts of the codebase, you have better isolation and faster tests; however, this does not give confidence that the whole application is working. By testing the entire application in its ecosystem, the opposite is true.