Mutation Testing
1 Mutation Testing Idea
- How "good" are the tests? Suppose we alter the source code, and apply the same tests. Do the results change?
- Simple Source Code Mutations
- Ex: Replace && in boolexp with ||
- Ex: Replace if B then S fi with while B do S od
- Exchange parameters/args (of the same type)
- Does a test distinguish actual software S from a mutated S'.
2 Plugins
- IntelliJ IDEA + Eclipse plugin http://pitest.org/quickstart/mutators/
- Eclipse Plugin http://muclipse.sourceforge.net/. Inactive 2011.
- http://cs.gmu.edu/~offutt/mujava/ is "a mutation system for Java programs. It automatically generates mutants for both traditional mutation testing and class-level mutation testing. muJava can test individual classes and packages … encapsulated in methods in JUnit classes."