Output Formats

Mutagoph supports multiple output formats for different use cases.

Terminal (default)

Human-readable output with progress bar and summary.

mutagoph run --output terminal

Output:

Mutagoph - Mutation Testing
===========================
Target:      ./...
Mutations:   mutilated
Parallelism: dynamic (balanced)

Parsing packages... found 5 source files
Found 42 mutation targets
Generating mutations... generated 156 mutations
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%)
  Naked:           0 (0.0%)

  Mutation Score: 91.0%

Mutation Statuses

Status Description
Killed Test failed after mutation - good!
Survived Tests still passed after mutation - needs attention
Timeout Test exceeded timeout limit
Error Build or test error occurred
Skipped Mutation skipped (e.g., cache hit)
Naked Code not covered by tests (with --coverage-filter)

JSON

Machine-readable output for CI integration and tooling.

mutagoph run --output json --output-file results.json

JSON structure includes:

  • Timestamp
  • Summary statistics
  • Individual mutation results
  • Configuration used

Useful for:

  • CI artifact storage
  • Post-processing
  • Integration with other tools
  • Trend analysis

HTML

Visual report with source annotations.

mutagoph run --output html --output-file report.html

Features:

  • Summary dashboard
  • Per-file mutation breakdown
  • Source code with highlighted mutations
  • Filterable results table

Combining Outputs

Run once, generate multiple outputs:

# Generate both JSON and HTML
mutagoph run --output json --output-file results.json
mutagoph report --input results.json --format html --output report.html

CI Recommendations

Use Case Format
PR checks Terminal (stdout)
Artifacts JSON
Reports HTML
Notifications JSON (parse and format)

Output File Location

# Explicit file
mutagoph run --output html --output-file report.html

# Stdout (terminal and json only)
mutagoph run --output json  # outputs to stdout