Skip to content

Its-donkey/mutagoph

Repository files navigation

Mutagoph Logo

Mutagoph

Go Reference Go Report Card Tests Coverage License Go Version

Mutagoph (pronounced mew-ta-goph) - mutate + gopher

A mutation testing framework for Go, designed for large monorepos with a focus on speed and quality.

Features

  • 23 Mutation Operators - Arithmetic, comparison, logical, assignment, and control flow
  • 4 Mutation Sets - lite, standard, thorough, mutilated
  • Adaptive Parallelism - Dynamic worker spawning for long-running mutations
  • Git Integration - Diff-based incremental testing
  • Multiple Outputs - Terminal, JSON, HTML reports
  • Caching - Skip unchanged mutations
  • Quality Gates - CI threshold enforcement
  • Coverage Filter - Skip uncovered code (marked as Naked)
  • Watch Mode - Continuous testing during development

Installation

# Using Go
go install github.com/its-donkey/mutagoph/cmd/mutagoph@latest

# Using Homebrew (macOS/Linux)
brew install its-donkey/tap/mutagoph

Or download a pre-built binary from Releases.

Quick Start

# Run mutation testing
mutagoph run

# Run with specific mutation set
mutagoph run --mutations standard

# Generate HTML report
mutagoph run --output html --output-file report.html

# Skip testing uncovered code (faster)
mutagoph run --coverage-filter

# Watch mode
mutagoph watch

Documentation

Full documentation available at its-donkey.github.io/mutagoph

Basic Example

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

If your tests catch these mutations, they're "killed". If tests still pass, they "survive" - indicating gaps in test coverage.

Requirements

  • Go 1.23+

License

Mutagoph is dual-licensed:

  • AGPL-3.0 - Free for open source projects. If you modify Mutagoph or use it in a network service, you must release your source code under AGPL-3.0.
  • Commercial License - For proprietary use without AGPL obligations. Contact Jeff Shapiro for licensing inquiries.

See LICENSE for the full AGPL-3.0 text.

About

A mutation testing framework for Go, designed for large monorepos with a focus on speed and quality

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages