to test the coverage of junit tests by applying small changes to java programs under test ("mutants") and checking, whether the junit tests keep track of these changes.
Mutation testing is an approach to evaluate the quality of automated tests (e.g. like junit tests). The idea of mutation testing is to change the source code of an existing program and to run its unit tests afterwards. These unit tests should report an error as the program behavior differs from the original (unmutated) program. The following requirements need to be considered when using this approach in practice: On the one hand, it should only generate mutants which can be compiled (valid mutants). On the other hand, the mutated program should have a different behaviour than the original program (non-equivalent mutant).
The Type Constraint Inverter (TCI) is a tool that consecutively creates mutants for an existing java project and runs the junit tests afterwards. It is facing the described requirements (valid and non-equivalent mutants) by the use of type constraints. Type constraints are typically used by refactoring tools to ensure the preservation of program behaviour. This tool inverts type constraints to cause the opposite effect leading to a high rate of non-equivalent mutants.
The TCI is implemented as an Eclipse view. After installation (see below) it is available via the view category "General".
The tool offers the selection of a java project which is inside the actual workspace and its associated testsuite. The mutant creation can be started and stopped via the corresponding buttons.
The created mutants are presented inside the results list. It shows whether the mutant was killed by the testsuite or not (column "Result"). Also, information about the performed mutation, the mutated element and the inverted type constraint is presented. The source code of the performed mutation can be viewed by first selecting one line inside the results list and afterwards clicking "Show original" (to see the original source code) or "Show mutant" (to see the mutated source code).
The Type Constraint Inverter plugin is updateable from http://www.fernuni-hagen.de/ps/prjs/tci/update/.