Infection vs muttest
Infection
infection.github.iomuttest
jakubsob.github.ioSide by side
| Figure | Infection | muttest |
|---|---|---|
| Price from | — | — |
| Free plan | — | — |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Windows | — | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Plans published | 0 | 0 |
| Spec score · Mutation Testing Tools | 7.6 (#11) | 7.1 (#19) |
| License | The project is released under the BSD-3-Clause License. | The package is licensed under MIT plus a LICENSE file. |
| Mutation score | It 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. |
| Mutators | The 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 execution | Tests 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. |
| Purpose | Infection 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.
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.