Skip to content
mutastic

Java edition

mutastic next

Show the missed mutant most worth a test first, and why. The missed mutants as a queue, one line's at a time, in the order a run ranks them: its card, why it's first, and the command that says when it's done. --top shows the first few, spread over the code. With a baseline, new misses come before the baseline's. While the code under test is the same, it runs only the mutants the last next left uncaught, so any a new test catches drop out. For an agent, one task, and to run next again after it.

Usage

Terminal window
mutastic next [DIR] [:MODULE] [OPTIONS]

A coding agent's hooks run it as the command: the build plugins don't.

Exit status

0 when nothing missed is left; 1 while something is queued. Any command exits 2 for a usage error or a build it couldn't read, and 4 when mutastic itself went wrong; one that runs tests, 3 when they fail without any mutant: see exit codes.

Options

--since[=REF]

Mutate only the lines changed since REF; the default branch without one.

Gradle-Pmutastic.since=REF or since = … in mutastic { }
Maven-Dmutastic.since=REF or <since>…</since> in the plugin's configuration
Command line--since[=REF]

--tests-from=MODULE

Also run this module's tests over what this one's miss: :app, or dependents for every module that depends on it.

Gradle-Pmutastic.testsFrom=MODULE,… or testsFrom = … in mutastic { }
Maven-Dmutastic.testsFrom=MODULE,… or <testsFrom>…</testsFrom> in the plugin's configuration
Command line--tests-from=MODULE

--workers=N

How many workers run side by side; half the cores, from 1 to 4, unless set.

Gradle-Pmutastic.workers=N or workers = … in mutastic { }
Maven-Dmutastic.workers=N or <workers>…</workers> in the plugin's configuration
Command line--workers=N

--confirm-catches

Run each catching test again on its own, to confirm the catch.

Gradle-Pmutastic.confirmCatches or confirmCatches = true in mutastic { }
Maven-Dmutastic.confirmCatches or <confirmCatches>true</confirmCatches> in the plugin's configuration
Command line--confirm-catches

--no-suggestions

Don't look for a test to suggest for each missed mutant.

Gradle-Pmutastic.suggestions=false or suggestions = false in mutastic { }
Maven-Dmutastic.suggestions=false or <suggestions>false</suggestions> in the plugin's configuration
Command line--no-suggestions

--exclude-tests=CLASS

A test class to leave out of the run, by its name or full name: one that can't run reliably here, with a race or a fixed port; the summary names it.

Gradle-Pmutastic.excludeTests=CLASS,…
Maven-Dmutastic.excludeTests=CLASS,…
Command line--exclude-tests=CLASS

--suite=SUITE

Which of the build's test suites runs: a Gradle Test task by name, or Maven's integration-test (Failsafe); test unless set.

Gradle-Pmutastic.suite=SUITE or suite = … in mutastic { }
Maven-Dmutastic.suite=SUITE or <suite>…</suite> in the plugin's configuration
Command line--suite=SUITE

--operators=OPERATORS

Which operators run: a set (defaults, stronger, extended or all), an operator's id or namespace, or any with - in front to leave it out; defaults unless set.

Gradle-Pmutastic.operators=OPERATORS,…
Maven-Dmutastic.operators=OPERATORS,…
Command line--operators=OPERATORS

--experimental=FEATURE

Turns on something experimental: ghosts, which insert the call most sites like a write make and it doesn't, and say whether any test notices; never in the score.

One of ghosts

Gradle-Pmutastic.experimental=FEATURE,…
Maven-Dmutastic.experimental=FEATURE,…
Command line--experimental=FEATURE
EnvironmentMUTASTIC_EXPERIMENTAL

--format=FORMAT

How the result is shown; full on a terminal, concise elsewhere, agent for coding agents; explain takes full and jsonl.

One of fullbriefconcisegroupedagentjsonl

Gradle-Pmutastic.format=FORMAT or format = … in mutastic { }
Maven-Dmutastic.format=FORMAT or <format>…</format> in the plugin's configuration
Command line--format=FORMAT
EnvironmentMUTASTIC_FORMAT, MUTASTIC_AGENT

--vocabulary=WORDS

plain says caught and missed; classic says killed and survived.

One of plainclassic

Gradle-Pmutastic.vocabulary=WORDS
Maven-Dmutastic.vocabulary=WORDS
Command line--vocabulary=WORDS
EnvironmentMUTASTIC_VOCABULARY

--color=WHEN

Colour: auto uses it on a terminal that wants it.

One of autoalwaysnever

Gradle-Pmutastic.color=WHEN
Maven-Dmutastic.color=WHEN
Command line--color=WHEN
EnvironmentNO_COLOR, FORCE_COLOR

File locations as links a terminal can open: auto uses them on a terminal.

One of autoalwaysnever

Gradle-Pmutastic.hyperlinks=WHEN
Maven-Dmutastic.hyperlinks=WHEN
Command line--hyperlinks=WHEN

--progress=STYLE

Progress on stderr: a bar on a terminal, counter lines in logs, none for agents.

One of autobarcounternone

Gradle-Pmutastic.progress=STYLE
Maven-Dmutastic.progress=STYLE
Command line--progress=STYLE

--top=N

How many of the queue next shows, at most one a method and two a file; 1 unless set, at most 25.

Command line--top=N