V2EX  ›  英汉词典

Mutation Testing

Definition / 定义

Mutation testing(变异测试):一种用于评估测试用例质量的软件测试方法。它会对源代码做一些小的、故意的改动(称为“mutants/变异体”),然后运行现有测试;如果测试能发现并失败,说明测试更有效;如果测试仍通过,可能表示测试不够全面。常见于单元测试与质量保障。

Pronunciation / 发音

/ˈmjuːteɪʃən ˈtɛstɪŋ/

Examples / 例句

Mutation testing helps us see whether our unit tests can catch small bugs.
变异测试能帮助我们看出单元测试是否能抓住一些小错误。

After adding mutation testing to the CI pipeline, the team found several weak assertions that never failed.
把变异测试加入持续集成流水线后,团队发现了一些从不失败、力度不足的断言。

Etymology / 词源

mutation 来自拉丁语 mutare(“改变”),表示“变化/变异”;testing 来自 test(“检验”)。合在一起强调:通过对代码做“改变”,来检验测试是否真的能发现问题。该术语在软件工程领域常用,也有其他“mutation”含义(如生物学“基因突变”),但此处主要指代码层面的变异。

Related Words / 相关词

Literary Works / 文学作品

  • The Art of Software Testing(Glenford J. Myers 等):讨论测试有效性与缺陷发现思想,与变异测试的目标高度相关。
  • Software Testing: Principles and Practice(Srinivasan Desikan, Gopalaswamy Ramesh):涵盖多种测试技术,常提及变异测试作为评估测试集的方法。
  • Introduction to Software Testing(Paul Ammann, Jeff Offutt):软件测试教材中经常以 mutation testing 作为核心概念之一进行讲解。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   691 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 21:28 · PVG 05:28 · LAX 13:28 · JFK 16:28
♥ Do have faith in what you're doing.