ミューテーションテスト (Mutation Testing) - CI/CD用語集の定義
ミューテーションテストは、バグを仕込み、テストがどれだけ捉えるかを測定することで、テストの品質を評価します。
ミューテーションテスト (Mutation Testing) は、コードに意図的に小さな欠陥 (mutant) を導入し、テストスイートが失敗するかどうかを確認します。生き残った mutant は、弱いまたは欠けている assertions を明らかにします。
実行されたものだけを示すカバレッジと異なり、ミューテーションテストはテストが実際に振る舞いを検証しているかどうかを示します。ツールには Stryker、PIT、mutmut があります。
CI での扱い
ミューテーションテストは mutant ごとにテストを再実行するため高コストです。そのためチームは、push のたびではなく、変更されたファイルに対して、またはスケジュールで実行することがよくあります。
関連ガイド
Mutation Score - CI/CD Glossary DefinitionMutation Score: Mutation score is the percentage of introduced mutants that the test suite detected (killed)…
Test Coverage - CI/CD Glossary DefinitionTest Coverage: Test coverage is the percentage of your code (lines, branches, or functions) that is executed…
Property-Based Testing - CI/CD Glossary DefinitionProperty-Based Testing: Property-based testing checks that a property holds for many automatically generated…