-
Notifications
You must be signed in to change notification settings - Fork 14
MTMatrix
DurieuxPol edited this page Oct 18, 2024
·
11 revisions
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: { UUID. UUIDGenerator }
-
- 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
-
matrix generateMatrix
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