Mutation testing yana auna ingancin saitin gwaje ta hanyar tsira abin da ba daidai ba ("mutants") a cikin lambar kuma bincika ko gwajin sun kama su. Yana auna menene gwajin suke da kyau a gani-gani masu lahani — waje da kewaye, wanda kawai ya auna jinkirin aiki.
Yadda mutation testing ke aiki
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
