Skip to content

mutrim

Bazel-native mutation testing for Go that also uses the results to minimize test suites.

mutrim (mutation + trim) builds a test × requirement bit matrix, where requirements are the union of the mutant sites a test reaches and the mutants it kills, and runs a weighted greedy set cover over it to report redundant tests and functions no test can kill. Pre-alpha.

Type-checked mutants

Every expression mutant is checked with go/types in its original scope before it is ever built, so non-compiling mutants are rare.

One build per package

Mutant schemata embed every mutant into one source, selected at run time by GOMUTANT_ID; a mutation_test target shards like any Bazel test.

Per-test kill matrix

Each test is traced once, each mutant runs only against the tests reaching it, and report.json records who killed what.

Test suite minimization

mutrim minimize reports redundant, essential and protected tests plus weak spots, and never deletes anything.