Merged
Conversation
Contributor
Author
Mutation TestingMutation testing completed. 📎 Download the HTML report from the workflow artifacts for detailed results. |
CI now commits mutation-report.html back to the repo after mutation testing completes on pushes to main. Uses [skip ci] to prevent loops.
Adds explanatory descriptions for Killed, Survived, Timeout, Error, and Skipped statuses to help users understand what each means.
- Add StatusNaked for mutations in code with no test coverage - Coverage is always gathered to identify naked mutants - --coverage-filter=true: Shows naked mutations (skips testing them) - --coverage-filter=false: Tests all mutations normally - Update HTML report with Naked styling (purple) and legend - Update mutation score formula to exclude naked mutations
Kills mutation that changes SetLite from "lite" to "". These string values are used in CLI parsing and config files.
Re-enables diff-based mutation testing in CI to only test changed files rather than the entire codebase on every run.
- executor: Add StatusNaked to TestMutantStatus_Values - executor: Add TestMutantStatus_StringValues for exact string values - executor: Add TestExecuteWithEmptySources to test len(sources) > 0 guard - config: Add coverage_filter YAML parsing test - cli: Add coverage-filter flag name and description tests
- Test runCmd recognizes --coverage-filter flag name - Add reflection test for coverage_filter yaml struct tag - Export WriteTerminal function for testing
- Add SetCoverageDataForTesting for injecting mock coverage data - Add tests for naked result Duration=0 and Output string - Add tests for coverage filter enabled/disabled behavior - Add tests for progress callback argument validation - Refactor statusToClass/statusToText to use variables (kills return_remove mutations) - Refactor WriteTerminal to use variable for error (kills call_silence mutations)
Extract the coverage-filter flag description to an exported constant so tests can verify the actual value used in production code.
- TestExecute_EmptySourcesNoCoverageGathering: verifies empty sources skips coverage gathering (kills len(sources) > 0 mutations) - TestExecute_NonEmptySourcesTriggersCoverageCheck: verifies non-empty sources triggers coverage check - TestExecute_NilProgressCallback: verifies nil progress callback doesn't panic (kills e.progress != nil -> true mutation) - TestExecute_ProgressCallbackCalledForNakedResults: verifies callback is called when set
- TestStatusToClass_UnknownStatus: verifies empty string fallback for unknown status (kills "" -> "mutated" mutation) - TestExecute_MultipleNakedResults_ProgressLoop: verifies all naked results trigger progress callback (kills break mutation) - TestExecute_ProgressTotal_WithMixedResults: verifies total calculation with both covered and uncovered mutations - TestExecute_ProgressTotal_OnlyNaked: verifies total when all mutations are naked (kills arithmetic mutations on total calculation)
Change TestExecute_ProgressTotal_WithMixedResults to use 1 covered + 3 uncovered mutations instead of 2+2. This kills the mutation: len(mutations) + len(uncoveredResults) -> len(mutations) * len(uncoveredResults) With 2+2=4 vs 2*2=4, the mutation gives the same result. With 1+3=4 vs 1*3=3, the mutation gives a different result and fails the test.
Add executor_integration_test.go with build tag //go:build integration to exercise code paths that require real Go modules and files: - Coverage gathering with real source files (len(sources) > 0) - Empty vs non-empty sources behavior - Progress callback with mixed covered/uncovered mutations These tests help kill mutations on executor.go lines 215, 408-413.
Remove diff-base filtering to get complete mutation testing on cli, config, executor, and reporter files for comparison with go-mutesting results.
Combine --files with --diff-base origin/main to test mutations only on changed lines within the 4 core files.
Tests kill mutations across reporter.go including: - Format constants and struct tags - New function initialization - Terminal output formatting and empty lines - JSON indentation with SetIndent - HTML file stats counting (killed/survived) - HTML file sorting and score calculation Achieves 98.6% mutation score with only 4 equivalent mutations remaining (untestable by design).
Adds options to run mutation testing manually with: - Custom target (e.g., ./internal/reporter/reporter.go) - Full scan mode (without diff-base) Enables running complete mutation scans on specific files.
- CHANGELOG: Add [Unreleased] section with recent changes - Comprehensive reporter tests (98.6% mutation score) - Manual CI workflow dispatch - Code review documentation - StatusNaked handling fix - README: Add coverage filter feature and example - docs/roadmap: Mark completed features - Environment variables, full diff, per-package thresholds - Coverage-based filtering, manual CI dispatch - Add performance optimizations to roadmap - docs/cli-reference: Add coverage filter examples - docs/configuration: Add coverage filter section with CI examples - docs/output-formats: Add Naked status and mutation statuses table - docs/ci-integration: Add coverage filter best practice section
Contributor
Author
Mutation TestingMutation testing completed. 📎 Download the HTML report from the workflow artifacts for detailed results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automated promotion of test branch to main.
Version: v0.2.0
Release type: minor
Test plan
🤖 Generated with GitHub Actions