Quick Start
Get up and running with Mutagoph in minutes.
Installation
Using Go
go install github.com/its-donkey/mutagoph/cmd/mutagoph@latest
Using Homebrew (macOS/Linux)
brew install its-donkey/tap/mutagoph
Download Binary
Pre-built binaries are available for all major platforms on the Releases page:
| Platform | Download |
|---|---|
| Linux (amd64) | mutagoph-linux-amd64 |
| Linux (arm64) | mutagoph-linux-arm64 |
| macOS (Intel) | mutagoph-darwin-amd64 |
| macOS (Apple Silicon) | mutagoph-darwin-arm64 |
| Windows (amd64) | mutagoph-windows-amd64.exe |
Quick install (Linux/macOS):
# Linux (amd64)
curl -Lo mutagoph https://github.com/its-donkey/mutagoph/releases/latest/download/mutagoph-linux-amd64
chmod +x mutagoph
sudo mv mutagoph /usr/local/bin/
# macOS (Apple Silicon)
curl -Lo mutagoph https://github.com/its-donkey/mutagoph/releases/latest/download/mutagoph-darwin-arm64
chmod +x mutagoph
sudo mv mutagoph /usr/local/bin/
Build from Source
git clone https://github.com/its-donkey/mutagoph
cd mutagoph
go build -o mutagoph ./cmd/mutagoph
Your First Mutation Test
Navigate to your Go project and run:
mutagoph run
This will:
- Parse all Go files in
./... - Generate mutations using the
mutilatedset (default) - Test each mutation against your test suite
- Report which mutations survived
Basic Options
# Test specific package
mutagoph run --target ./internal/parser
# Use fewer mutations for faster feedback
mutagoph run --mutations lite
# Generate HTML report
mutagoph run --output html --output-file report.html
# Only test changed files (requires git)
mutagoph run --diff-base main
Understanding Results
Mutagoph - Mutation Testing
===========================
Target: ./...
Mutations: mutilated
Parallelism: dynamic (balanced)
Testing mutations...
████████████████████████████████ 100% | 156/156 | 45s
Summary:
Total mutations: 156
Killed: 142 (91.0%)
Survived: 10 (6.4%)
Timeout: 2 (1.3%)
Error: 2 (1.3%)
Mutation Score: 91.0%
- Killed - Your tests caught the mutation (good!)
- Survived - Tests still passed with mutation (needs better tests)
- Timeout - Mutation caused test to hang (often infinite loops)
- Error - Mutation caused compilation or runtime error
Watch Mode
For continuous testing during development:
mutagoph watch
This watches for file changes and automatically runs mutation tests on modified code.
Next Steps
- CLI Reference - All commands and flags
- Configuration - YAML config and environment variables
- Mutation Operators - Understanding what mutations are applied