Skip to content

Test selection strategies

DurieuxPol edited this page Oct 18, 2024 · 6 revisions

Test selection strategies are ways to select the tests to be run during the evaluation of a mutant.
There are 2 strategies:

MTSelectingFromCoverageTestSelectionStrategy

This is the default test selection strategy used by the analysis.
This strategy selects only the tests that cover the mutant to be evaluated. Doing this makes the analysis faster, as fewer tests will be run for each mutant.
To use this strategy:

analysis testSelectionStrategy: MTSelectingFromCoverageTestSelectionStrategy new

MTAllTestsMethodsRunningTestSelectionStrategy

This strategy selects all the tests from the analysis. It means that all the tests provided will be run for each mutant.
To use this strategy:

analysis testSelectionStrategy: MTAllTestsMethodsRunningTestSelectionStrategy new