TestSelection
record in io.mutastic.api
record TestSelection( List<String> includes, List<String> excludes, List<String> includeTags, List<String> excludeTags)Which of a module’s tests its build runs: the test task’s or Surefire’s patterns and JUnit tags. mutastic runs the same tests, so a test the build leaves out (an integration test, a slow tag) neither catches nor misses a mutant.
Components
includes | class-file patterns, relative to a test class directory: globs as Ant writes them (**/*Test.class, where **/ also matches no directory), or regex: and a regular expression; empty includes every class |
|---|---|
excludes | class-file patterns to leave out, in the same form |
includeTags | JUnit tags (or tag expressions) a test must have; empty means any |
excludeTags | JUnit tags (or tag expressions) a test must not have |
Constants
ALL
static final TestSelection ALLEvery test, as when a build says nothing.
Methods
leavingOut
TestSelection leavingOut(List<String> classes)The same, leaving out these test classes as well: each by its name (RacyTest, in any
package) or its full name (com.example.RacyTest).
runs
boolean runs(String className)Whether the build runs the top-level test class className (com.example.PricingTest).