Mutation Testing

Mutation testing is used to design new software tests and evaluate the quality of existing software tests.
Contributed by

Sebastien Wains

Published July 25, 2022
Collection
1

概要

Mutation testing involves modifying a program in small ways.

Each mutated version is called a mutant and tests detect and reject mutants by causing the behavior of the original version to differ from the mutant. This is called killing the mutant.

メリット

The goals of mutation testing are multiple:

  • identify weakly tested pieces of code (those for which mutants are not killed)
  • identify weak tests (those that never kill mutants)
  • compute the mutation score, the mutation score is the number of mutants killed / total number of mutants.
  • learn about error propagation and state infection in the program

実施方法

Python

C#, Scala, Javascript

実施例

参考

Mutation Testing をチームや顧客、ステークホルダーと実施するにあたりより詳細にお知りになりたい場合は、以下のリンクを参照してください。


Except where noted, content on this site is licensed under a Creative Commons Attribution 4.0 International license. This site is graciously hosted by Netlify