म्यूटेशन टेस्टिंग हे टेस्ट स्यूटची गुणवत्ता मूल्यांकन करते ज्या द्वारे कोडमध्ये जाणूनबुजून छोटे बग ("mutants") सादर केले जातात आणि परीक्षा त्यांना पकडतात की नाही हे तपासले जाते. हे मोजते की परीक्षा वास्तविकपणे दोषांचा पता लावण्यात किती चांगल्या आहेत — कव्हरेज जाते ज्या केवळ कार्यान्वयन मापन करते.
म्यूटेशन टेस्टिंग कसे कार्य करते
1. A tool makes small changes (MUTATIONS) to the code, e.g.:
→ change + to -, > to >=, true to false, remove a statement, change a constant
→ each mutation = a deliberate "bug" (a MUTANT version of the code)
2. Run the TEST SUITE against each mutant:
→ tests FAIL → the mutant is "KILLED" (good — tests caught the bug) ✓
→ tests PASS → the mutant "SURVIVED" (bad — tests DIDN'T catch the bug) ✗
3. MUTATION SCORE = % of mutants killed → measures how good the tests are at catching bugs
