Skip to content
mutastic

Swift edition

mutastic verify

Run mutants' tests: it passes when they catch every one not skipped. How a fix is proved: each missed mutant offers it as "done when", and a card with several mutants names them all, split by commas; spaces split them too, and the directory comes after them. An id names its mutant whatever options showed it, so verify needs no --operators to find one.

Usage

Terminal window
mutastic verify ID... [DIR]

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

Output

On the pricing sample, once the test the card asked for is added. This is mutastic's own output, written from the CLI and checked against it on every build.

Terminal window
mutastic: m86f9a31d is caught by PricingTests.discountAtTheTotalEdge()

Exit status

0 when it catches each mutant named, or the mutant is skipped or crashed where a crash proves nothing; 1 while one is still missed or not covered. Any command exits 2 when mutastic couldn't run: see exit codes.

Options

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

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

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