Mutation Testing
Overview
Measure quality of your tests. 'muttest' introduces small changes (mutations) to your code and runs your tests to check if they catch the changes. If they do, your tests are good. If not, your assertions are not specific enough. 'muttest' gives you percent score of how often your tests catch the changes.
- ✨ New
JSONMutationReporterwrites a report conforming to the mutation-testing-elements schema, a cross-language standard shared by StrykerJS/.NET/Scala — so muttest output can be fed to any schema-compatible tooling. - ✨ New
report()renders a self-contained, source-annotated HTML report (overall score, per-file breakdown, per-line mutant diffs, status filtering, keyboard navigation) from aJSONMutationReporterfile. - ✨ New
MultiReporterfans reporter events out to several reporters at once, e.g. a liveProgressMutationReporteralongside aJSONMutationReporter. - ❗️ A mutant that makes tests *error* (rather than fail an expectation) is now scored as killed, matching PIT/Stryker/mutmut. Previously it was counted as survived.
- ❗️ Mutants with no test coverage (no matching test file under
FileTestStrategy) are now reported as a separateno coveragecategory and excluded from the score, so untested code no longer looks like escaped mutants. - ✨
PackageCopyStrategygained asymlinkargument. WhenTRUE, only the mutated file's top-level directory is copied and everything else is symlinked to the original, avoiding a full project copy per mutant (helpful for packages with largeinst//data/). Defaults toFALSE; unsafe if the test suite writes into the package's own directories. - 🐛
FileTestStrategynow matches test files by exact name instead of an unanchored regex, so a source file likemod.Rno longer runstest-model.Rand filenames with regex metacharacters are handled correctly. - 🐛 Added missing
digestandtoolsto Imports.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-03
- ERROR12 OK, 1 ERROR2026-06-20
- OK13 OK2026-06-09
Show 3 earlier changesHide 3 earlier changes
- WARNING12 OK, 1 WARNING2026-06-08
- OK14 OK2026-04-16
- ERROR11 OK, 3 ERROR2026-03-10
Documentation
- Help pages
- 40
- Examples that run
- 100%24 run in a plain check
- Exported functions with examples
- 60%
- Documented parameters
- 97%
- Return-value docs
- 68%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 82
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
14 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/jakubsob/muttest on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-07-21 · The repository has a site deploy workflow
pkgdown site last built 2026-07-21
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-05-04Seen in the repository: CLAUDE.mdNamed in .Rbuildignore: CLAUDE.md
Dependencies
Installing muttest adds 35 packages (21 with compiled code, 10.0 MB of source tarballs). Heaviest: fs 1.4 MB, jsonlite 1.0 MB, vctrs 1.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.3.0Latest
- 0.2.12026-06-24 · diff ↗
- 0.2.02026-05-14 · diff ↗ ·
removed 1 export
planadded 25 exports
Mutator, arithmetic_operators, boolean_literal, boolean_literals, call_name, comparison_operators, condition_mutations, delete_statement, index_decrement, index_increment, index_mutations, logical_operators, muttest_plan, na_literal, na_literals, negate_condition, numeric_decrement, numeric_increment, numeric_literals, remove_condition_negation, remove_negation, replace_return_value, string_empty, string_fill, string_literals - RR 4.6.0 released · 2026-04-24
- 0.1.02025-05-30
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-05-30
- Total releases
- 4 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 135 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("muttest")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.