Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

go-mutesting

github.com

  • Free plan
  • Linux
  • Self-hosted
7.4 Club score Visit github.com

What go-mutesting is

go-mutesting is a mutation-testing framework for Go code. It makes code changes, runs tests, and reports whether each mutation is caught; the mutation score summarizes how many generated mutations the test suite kills. Targets can be Go source 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. Users can instead provide an external command with `--exec`; environment variables describe each mutation, and exit codes indicate whether it was killed, survived, skipped, or had an unknown result. Built-in mutators cover branches, comparisons, boolean expressions, statement removal, and Cosmos SDK arithmetic and comparisons. Developers can implement custom mutators through the Mutator interface and register them for the binary. When a mutation survives, the tool reports it and prints a source patch. The README presents mutation testing as a supplement to automatic test suites because false positives can occur. The project is MIT-licensed and supports Linux and self-hosted use.

Who it suits

go-mutesting suits Go developers who want to assess what their tests catch, or compare automatically generated and manually written test suites. It is intended to supplement, not replace, automatic test suites.

Good to know, and what to watch

  • Reports a mutation score
  • Accepts files, directories, and packages
  • Supports external test commands
  • Prints patches for surviving mutations
  • Custom mutators can be registered
  • Excludes `_test` files as targets
  • Checksum blacklist is described as poorly implemented
  • Mutation testing can produce false positives

go-mutesting

Free

Open source

The verdict

go-mutesting provides a way to probe Go test coverage through controlled code changes and inspect surviving mutations. Its own guidance frames this as an addition to existing automatic test suites.

What the maker publishes

Custom commands
Users can provide an external execution command for testing each mutation. source
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. source
Execution
By default, it replaces the original file with a mutation, runs that package’s tests, and reports whether the mutation was killed. source
Execution
The built-in execution command replaces a source file with a mutation, runs the package tests, and reports whether the mutation was killed. source
Extensibility
Custom mutators can be implemented through the Mutator interface and registered for use by the binary. source
Extensibility
Custom mutators implement the Mutator interface and are registered with the package's Register function. source
False positives
A checksum blacklist can ignore false positive mutations, but the README says the feature is poorly implemented because source changes alter checksums. source
False positives
A checksum blacklist can ignore mutations, but the README says this feature is badly implemented because source changes alter all checksums. source
Inputs
Targets can be Go source files, directories, or packages, including recursive `...` patterns; `_test` files are excluded. source
Integration
The tool can run Go package tests by default and supports external test commands through `--exec`. source
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. source
License
The repository identifies its license as MIT. source
License
The repository identifies the project as MIT licensed. source
Mutation results
It reports whether each mutation was tested and prints a source patch when a mutation survives. source
Mutation score
It reports a mutation score based on how many generated mutations are killed by the test suite. source
Mutation score
It reports a mutation score based on the proportion of mutations killed by the test suite. source
Mutators
Built-in mutators cover branches, comparisons, boolean expressions, statement removal, and Cosmos SDK arithmetic and comparisons. source
Mutators
Implemented mutators cover branches, comparisons, boolean expressions, statement removal, and Cosmos SDK arithmetic and comparisons. source
Purpose
go-mutesting is a framework for mutation testing Go source code to find code not covered by tests. source
Purpose
go-mutesting performs mutation testing on Go source code to find code that is not covered by tests. source
Support
The README invites users to make feature requests and report bugs or problems. source
Support
The README invites users to make feature requests and report bugs or problems. source
Targets
Targets can be Go source files, directories, or packages, including recursive `...` patterns; `_test` files are excluded. source
Usage limitation
The README says mutation testing can produce false positives and should supplement automatic test suites. source

Checked against the maker's pages on 9 Oct 2026.