Skip to content
mutastic

Swift 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; once that code changes, it runs every mutant again. A mutant proposed for ignoring isn't queued: it waits on a person. For an agent, one task, and to run next again after it.

Usage

Terminal window
mutastic next [DIR] [OPTIONS]

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

Exit status

0 when nothing missed is left, or only mutants proposed for ignoring; 1 while something is queued. Any command exits 2 when mutastic couldn't run: see exit codes.

Options

--since[=REF]

Mutate only the lines changed since the merge-base of HEAD and REF, uncommitted and new files included; the default branch without one. With no mutant on those lines, nothing is built or run.

Command line--since[=REF]

--workers=N

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

Command line--workers=N

--confirm-catches

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

Command line--confirm-catches

--no-suggestions

Don't look for a test that catches each missed mutant, which runs the missed mutant's function outside the tests.

Command line--no-suggestions

--exclude-tests=TEST

A test to leave out of the run, by its name as a run shows it, or a module of tests by its path: one that can't run reliably here, with a race or a fixed port; the summary names it, and says so of a name that matches no test. mutastic.yaml's exclude-tests: leaves one out of every run, with its reason.

Command line--exclude-tests=TEST

--build-system=BUILD

Which build a directory with both a Package.swift and an Xcode project uses: the one with tests unless set, and a refusal when both have them.

One of swiftpmxcode

Command line--build-system=BUILD

--scheme=SCHEME

The Xcode scheme whose tests a run uses, for a project or workspace with several: the only one with tests for macOS or iOS unless set.

Command line--scheme=SCHEME

--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, in place of mutastic.yaml's operators; defaults unless set.

Command line--operators=OPERATORS

--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

Command line--format=FORMAT
EnvironmentMUTASTIC_FORMAT, MUTASTIC_AGENT

--vocabulary=WORDS

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

One of plainclassic

Command line--vocabulary=WORDS
EnvironmentMUTASTIC_VOCABULARY

--color=WHEN

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

One of autoalwaysnever

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

Command line--hyperlinks=WHEN

--progress=STYLE

Progress on stderr: redrawn in place on a terminal, a line every 30 s in logs, CI and agents' runs, or none.

One of autobarcounternone

Command line--progress=STYLE
EnvironmentMUTASTIC_PROGRESS

--top=N

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

Command line--top=N