Skip to content
SPECIFICTION
Get listed

Infection vs muttest

Infection

infection.github.io

muttest

jakubsob.github.io

Side by side

FigureInfectionmuttest
Price from——
Free plan——
Free trial——
Open source——
WebYes—
Windows—Yes
macOSYesYes
LinuxYesYes
Plans published00
Spec score · Mutation Testing Tools7.6 (#11)7.1 (#19)
LicenseThe project is released under the BSD-3-Clause License.The package is licensed under MIT plus a LICENSE file.
Mutation scoreIt reports a Mutation Score Indicator (MSI) that measures the percentage of generated mutations detected by the tests.The mutation score is the percentage of mutants killed or errored among killed, survived, and errored mutants; mutants with no test coverage are excluded.
MutatorsThe homepage describes more than 100 mutators, grouped into profiles, and support for custom mutators.Available mutators include operator, boolean, NA or NULL, function-call, string, numeric, index, condition, negation, and return-value changes.
Parallel executionTests for mutated code can run in parallel with the --threads option, including automatic CPU-core detection with --threads=max.The maker’s July 2026 update describes parallel execution as a muttest capability.
PurposeInfection mutates PHP source code and reports changes that a test suite fails to catch.muttest measures test quality by applying small changes to code and checking whether the test suite catches them.

In their own words

Infection

Infection is a PHP mutation-testing library that shows which changes a test suite fails to detect. It creates mutants using predefined operators, runs tests against changed code, and records killed and escaped mutants, errors, and timeouts. Its Mutation Score Indicator measures the share of generated mutations detected by tests; it also reports Mutation Code Coverage and Covered Code Mutation Score Indicator. Infection supports PHPUnit, PhpSpec, Codeception, and Testo, and runs from the command line at a project root. Teams can run mutated tests in parallel, focus analysis on touched lines or files, and set minimum mutation-score thresholds that fail a build. The homepage describes more than 100 mutators grouped into profiles and allows custom mutators. Optional PHPStan and Mago integrations can help catch escaped mutants involving type violations, dead code, and unreachable paths. Installation options include PHAR, Phive, Composer, Git, and Homebrew. A browser playground supports trying PHP code and tests without installing the tools. Infection is free under the BSD-3-Clause license and requires PHP 8.3 or newer plus Xdebug, phpdbg, or pcov.

Visit infection.github.io

muttest

muttest is a free R package for mutation testing: it changes selected parts of R code and runs tests to measure which changes the test suite catches. Its mutation score reports the percentage of mutations caught, helping identify weak assertions. Users can choose what to change and where, with mutators for operators, boolean and NA or NULL values, function calls, strings, numbers, indexes, conditions, negation, and return values. Presets group common mutation types, including arithmetic, comparison, logical, numeric, string, and condition changes. Examples use testthat and show how changing comparison operators can expose untested boundary cases. Reports are available in HTML and JSON, with feedback on files that may need stronger assertions. Documentation links a guide for running checks in CI, including GitHub Actions, score badges, and thresholds. A July 2026 update describes parallel execution. The package supports Linux, macOS, and Windows, is licensed under MIT plus a LICENSE file, and requires R version 4.1.0 or later according to its CRAN listing.

Visit jakubsob.github.io