Skip to content
SPECIFICTION
Get listed

go-mutesting

github.com

Free plan LinuxSelf-hosted
Visit github.com
Spec score 8.0 #6 of 25 in Mutation Testing Tools

What it is

go-mutesting is a framework for mutation testing Go code to identify parts of a program that tests may not cover. It changes source code in controlled ways, runs tests, and reports whether each mutation is killed or survives; surviving mutations are accompanied by a source patch. Its mutation score reflects the share of generated mutations killed by the test suite. Targets may be Go files, directories, or packages, including recursive `...` patterns, while `_test` files are excluded. By default, it replaces the original file with a mutation and runs that package’s tests. Alternatively, an external command can test each mutation, with environment variables describing the change and exit codes indicating the result. Built-in mutators cover branches, comparisons, boolean expressions, statement removal, and Cosmos SDK arithmetic and comparisons. Custom mutators can be registered through the Mutator interface. The MIT-licensed tool is free and runs on Linux or in self-hosted environments. Its README positions mutation testing as a supplement to automatic test suites and cautions that false positives can occur.

Spec sheet

Purpose
go-mutesting performs mutation testing on Go source code to find code that is not covered by tests.Read 9 Oct 2026 · github.com
Support
The README invites users to make feature requests and report bugs or problems.Read 9 Oct 2026 · github.com
License
The repository identifies the project as MIT licensed.Read 9 Oct 2026 · github.com
Custom commands
Users can provide an external execution command for testing each mutation.Read 9 Oct 2026 · github.com
Custom execution
Users can supply an external exec command to test mutations, with environment variables describing each mutation and exit codes indicating killed, alive, skipped, or unknown outcomes.Read 4 Oct 2026 · github.com
Execution
The built-in execution command replaces a source file with a mutation, runs the package tests, and reports whether the mutation was killed.Read 9 Oct 2026 · github.com
Extensibility
Custom mutators implement the Mutator interface and are registered with the package's Register function.Read 9 Oct 2026 · github.com
False positives
A checksum blacklist can ignore mutations, but the README says this feature is badly implemented because source changes alter all checksums.Read 9 Oct 2026 · github.com
Inputs
Targets can be Go source files, directories, or packages, including recursive `...` patterns; `_test` files are excluded.Read 9 Oct 2026 · github.com
Integration
The tool can run Go package tests by default and supports external test commands through `--exec`.Read 4 Oct 2026 · github.com
Intended use
The README describes go-mutesting as an addition to automatic test suites and says it can help compare automatically generated and manually written test suites.Read 4 Oct 2026 · github.com
Mutation results
It reports whether each mutation was tested and prints a source patch when a mutation survives.Read 9 Oct 2026 · github.com
Mutation score
It reports a mutation score based on the proportion of mutations killed by the test suite.Read 9 Oct 2026 · github.com
Mutators
Implemented mutators cover branches, comparisons, boolean expressions, statement removal, and Cosmos SDK arithmetic and comparisons.Read 9 Oct 2026 · github.com
Targets
Targets can be Go source files, directories, or packages, including recursive `...` patterns; `_test` files are excluded.Read 4 Oct 2026 · github.com
Usage limitation
The README says mutation testing can produce false positives and should supplement automatic test suites.Read 9 Oct 2026 · github.com

Plans and prices

go-mutesting Free MIT-licensed Go mutation testing framework Read 9 Oct 2026 · github.com

Every go-mutesting plan and price →

Strong points and limits

Strong points

  • Reports a mutation score and surviving-code patches
  • Accepts files, directories, and recursive package patterns
  • Allows external test commands through `--exec`
  • Supports custom mutators through the Mutator interface
  • Free under the MIT license

Limits

  • Targets `_test` files are excluded
  • README warns false positives can occur
  • Checksum blacklist is described as poorly implemented

Who it suits

It suits Go developers who want to examine how well package tests catch altered code, or compare automatically generated and manually written test suites. It is intended to supplement, not replace, automatic testing.

Verdict

go-mutesting offers configurable mutation testing for Go, with package tests as the default and external commands as an alternative. Its own guidance makes clear that results should supplement automatic test suites, and its false-positive handling has a noted limitation.

Where Specifiction places it

Alternatives to go-mutestingAll alternatives →