JMuTE is a tool for Mutation Testing in Eclipse. The project is in alpha phase and we are still developing it. However, JMuTE has already some functionality.
The tool introduces 5 different mutations into java source code.
The mutations are introduced on the
syntax level. Thanks to this we are sure, that the mutated source
code will be properly compiled.
This mutations are:
- IPC - Explicit call of a parent's constructor deletion. The IPC operator
deletes super constructor calls, causing the default constructor of the
parent class to be called.
Example:
class MyClass extends ParentClass {
public MyClass() {
super();
...
}
...
}
is converted into
class MyClass extends ParentClass {
public MyClass() {
...
}
...
}
- JSI - Static modifier insertion. The JSI operator adds the static
modifier to change instance variables to class variables.
Example:
class MyClass extends ParentClass {
public List integerList;
...
}
is converted into
class MyClass extends ParentClass {
public static List integerList;
...
}
- ASR - Short - Cut Assignment Operator Replacement. Replace short - cut
assignment operators with other short - cut operator s of the same kind.
Example:
a *= b;
is converted into
a += b;
- COI - Conditional Operator Insertion. Insert unary conditional
operators. To if statement "true ||" condition is add (so that the if statement is always true.
Example:
if(a > b) {...}
is converted into
if(true || a > b) {...}
- AOR - Arithmetic Operator Replacement. Replace basic unary
arithmetic operators with other unary arithmetic operators. The preincrement operator is replaced by predecrement operator.
Example:
--a;
is converted into
++a;
After introducing avaiable mutations into the source code, all provided tests are run.
Afterwards the HMTL report with results is generated. From ths report we can see which mutants stayed alive and witch one were killed.