Mutation Testing Flashcards
What is fault seeding? What does it achieve?
Inserting representative or typical faults into your program. This allows you to measure how many bugs your test suite kills
In mutation testing, how do you measure effectiveness?
killed/ # seeded
What are 3 issues with fault seeding?
Finding representative faults
Putting in enough faults for the test to be meaningful
Forgetting to remove the faults afterwards
What is a mutant?
A valid program that behaves differently than the original
When does test t kill a mutant m?
If t produces a different outcome on m than the original program
What are 4 classes of unhelpful mutants?
Still born (not compilable)
Trivial (killed by most test cases)
Equivalent (indistinguishable from original program)
Redundant (indistinguishable from other mutants)
A mutant should contain only one _______ from the original program
change
What kind of mutation mimics statement coverage? How about input classes?
Bomb()s
failOnZero(x)s
Because of equivalent mutants, what is the update mutation score formula? What is this formula with duplicates taken into account?
killed/ (# mutants - # equivalent)
killed - #killed dupes) / (# mutants - # equivalent - # dupes
Why are equivalent mutants equivalent?
- Mutation must be reachable
- Does the mutation create a different program state? (infection)
- Is the program state difference visible? (Propagation)
Equivalents mutants don’t have propagation, but they could infect the program or they might not be reachable
Finding ________ mutants is one of the most expensive aspects of this type of testing
equivalent
What are mutation operators? Why might they be language dependent?
Changes that are applied to produce mutants
Languages may or may not have co-routines, list comprehensions, hierarchies, etc
REVIEW EDGE COVERAGE SECTION
REVIEW EDGE COVERAGE SECTION
What is scalar variable replacement? Give an example
Replacing each variable use with another compatible variable. An example would be replacing a long with a short
What are some interprocedural mutation operators?
Changing parameter values
Changing call target
Changing dependencies