Mutagoph
A mutation testing framework for Go, designed for large monorepos with a focus on speed and quality.
Quick Links
Getting Started
Get up and running with Mutagoph in minutes.
CLI Reference
Complete documentation for all commands and flags.
Mutation Operators
All 23 mutation operators explained with examples.
Help
- Configuration - YAML config and environment variables
- CI Integration - GitHub Actions and CI/CD setup
- Examples - Practical usage examples
Features
- 23 Mutation Operators - Comprehensive coverage including arithmetic, comparison, logical, assignment, and control flow mutations
- 4 Mutation Sets -
lite,standard,thorough,mutilated- choose your mutation intensity - Adaptive Parallelism - Dynamic worker spawning for long-running mutations
- Git Integration - Diff-based incremental testing with
--diff-base - Caching - Skip unchanged mutations for faster re-runs
- Quality Gates - Fail CI if mutation score drops below threshold
Installation
# Using Go
go install github.com/its-donkey/mutagoph/cmd/mutagoph@latest
# Using Homebrew (macOS/Linux)
brew install its-donkey/tap/mutagoph
See all releases for pre-built binaries.
Basic Example
package main
// Your code
func Add(a, b int) int {
return a + b
}
// Mutagoph generates mutations like:
// return a - b (arithmetic_replace)
// return a (arithmetic_delete)
// return 0 (return_replace)
Run mutation testing:
mutagoph run --target ./...
If your tests catch these mutations, they’re “killed”. If tests still pass, they “survive” - indicating gaps in test coverage.