-
Notifications
You must be signed in to change notification settings - Fork 14
MTMatrix
A MTMatrix represents the results of some mutations against some tests. A blue box means the test fails for the mutation.
There are 4 ways to create a MTMatrix depending on the situation:
- using a collection of classes (when the test classes simply have the suffixe "Test"):
-
matrix := MTMatrix forClasses: { MTAuxiliarClassForMatrix }
-
- using collections of classes and tests:
-
matrix := MTMatrix forClasses: { UUID } andTests: { UUIDTest. UUIDPrimitivesTest }
-
- using a collection of packages (when the test packages simply have the suffixe "-Tests"):
-
matrix := MTMatrix forAPackage: { 'Athens-Core' }
-
- using collections of packages and test packages:
-
matrix := MTMatrix forAPackage: { 'Network-UUID' } andTestPackage: { 'Network-Tests' }
-
Now that you have your matrix, you can get several information about the mutations of your subject with it.
But before that you need to build it with:
-
matrix build
You can generate a matrix like the one above:
matrix generateMatrix
You can also generate a heat map, where mutants are grouped by operator and tests by classes:
matrix generateHeatmap
These are the information you can get:
Mutants killed by every tests:
matrix trivialMutants inspect
Mutants that are killed by the exact same tests.
equivalentMutants
returns all sets of mutants mutually equivalent:
matrix equivalentMutants inspect
For a given mutant, all mutants that are killed by the same tests as the given mutant or part of those tests, and no others.
includedMutants
returns a dictionary of all mutants and their included mutants:
matrix includedMutants inspect