Skip to content
mutastic

MutantResult

record in io.mutastic.api

record MutantResult(
Mutant mutant,
Status status,
List<String> coveredBy,
Optional<String> caughtBy,
Optional<String> failure,
Optional<String> failureOrigin,
int testsRun,
Optional<String> unconfirmed,
Map<String, List<Long>> inputs,
Optional<Suggestion> suggestion,
Duration took)

One mutant’s outcome.

Components

coveredBythe tests that reach the mutant’s line, fastest first
caughtBythe test that failed, if one did
failurewhat it failed with: the exception’s class
failureOriginwhere that came from: assertion (a check failed), test (the test’s own code threw) or code (the code under test threw)
testsRunhow many covering tests ran before the result was known
unconfirmeda test whose catch didn’t repeat when run again, if catches were confirmed
inputsthe whole numbers the covering tests passed to the mutant’s method, by parameter name: what the tests tried, so what they didn’t is plain
suggestiona call whose result the mutant changes, for a missed mutant, if one was found

Methods

notCovered

static MutantResult notCovered(Mutant mutant)

skipped

static MutantResult skipped(Mutant mutant)

alsoCoveredBy

MutantResult alsoCoveredBy(List<String> tests)

The same result, reached by tests too: another run’s, over the same mutant.

withSuggestion

MutantResult withSuggestion(Optional<Suggestion> found)

The same result with a suggested test.