Open Ja4pp opened 6 months ago
Changes since Nico's last review:
default-mutation-levels.js
to a .ts file and used the spread operator to make it clearer that one level extends the othermutationName
with mutationOperator
any
type from ReplacementConfigurationincludedMutations
property
What?
We've added support for mutation levels to improve the performance of Stryker. It includes mutation operators, mutation groups, mutation levels, documentation and tests. In addition, we have PRs for the reporters in stryker-mutator/mutation-testing-elements and stryker-mutator/stryker-dashboard. Those PR's are still a work in progress.
Why?
Currently, Stryker, by default, executes a comprehensive mutation testing suite on your project, offering maximum efficacy. However, this default setting demands substantial computational resources. Alternatively, users can leverage mutation levels for a more resource-efficient testing experience, ranging from level 1 (optimized for speed) to level 3 (prioritizing efficacy). For more background information, see the Calisto research (https://research.infosupport.com/callisto/).
How?
For a tailored configuration, Xavier allows the adjustment of mutation levels by specifying inclusion and exclusion fields. In the configuration file, mutation operators can be precisely designated by their literal names, while mutator groups and mutation levels are denoted with the
@
prefix (e.g.,@ArithmeticOperator
or@level1
). For instance, to refine level 2 by selectively retaining theAdditionOperatorNegation
mutation operator and excluding all other operators within theArithmeticOperator
group, the configuration would be expressed as follows:Testing?
We have made modifications to the ignore-project in the e2e test folder to support mutation levels as it had excluded mutations already in its configuration file. Moreover, we added unit tests for all mutator operators. We tested a subset of operators, an empty level and an undefined level.