-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Summary
The current report outputs (text, JSON, HTML) provide basic mutation testing results but lack several useful details that would help users understand and act on the results.
Current State
- Text report: Shows aggregate stats (files scanned, mutants generated/tested/killed/survived/timeouts/errors) and lists survived mutants with file:line, operator name, and original → mutated text
- JSON report: Serializes the full
MutationReportstruct - HTML report: Self-contained with summary table, per-file annotated source with color-coded lines (killed=green, survived=red, no-coverage=gray)
Suggested Improvements
Per-file summary
- Add a per-file breakdown showing mutation score per file
- Helps identify which modules have the weakest test coverage
Per-operator summary
- Show statistics grouped by mutation operator (e.g., "ArithmeticOp: 45 killed / 50 total = 90%")
- Helps identify which types of mutations are consistently surviving
Per-test coverage analysis
- Show which tests killed which mutants (data is available from pytest-cov context)
- Helps understand test effectiveness
Diff-style output
- Show mutations as unified diffs rather than just "original → mutated" text
- Easier to understand the context of each mutation
Comparative/baseline reports
- Support comparing results across runs (e.g., "score improved from 85% to 92%")
- Useful for CI integration
HTML report enhancements
- Show full source line content (currently only shows the mutated fragment)
- Add sortable/filterable tables
- Add a navigation sidebar for multi-file reports
- Add mutation score trend chart (when session DB is available)
Getting Started
The report implementations are in src/report/:
text.rs— text reportjson.rs— JSON reporthtml.rs— HTML reporttypes.rs—MutationReportandMutantResultdata structures
The MutationReport struct already contains all individual MutantResult entries with file paths, operator names, and status — most improvements just need to aggregate this existing data differently.
Pick any single improvement from the list above and submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers