Skip to content

Test selection strategies

DurieuxPol edited this page Apr 10, 2024 · 5 revisions

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

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

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