Infection vs muttest-rs
Infection
infection.github.iomuttest-rs
github.comSide by side
| Figure | Infection | muttest-rs |
|---|---|---|
| Price from | — | — |
| Free plan | — | — |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| macOS | Yes | — |
| Linux | Yes | — |
| Plans published | 0 | 0 |
| Spec score · Mutation Testing Tools | 7.6 (#11) | 6.5 (#25) |
| How it works | It creates mutants using predefined mutation operators, runs tests covering changed lines, and records killed or escaped mutants, errors, and timeouts. | Its `#[mutate]` macro transforms source code patterns and adds hooks so mutations can be enabled at runtime after a single compilation. |
| Installation | The maker documents PHAR, Phive, Composer, Git, and Homebrew installation methods. | The README instructs users to install the `cargo-muttest` Cargo plugin and add `muttest` to their crate. |
| License | The project is released under the BSD-3-Clause License. | The repository includes an MIT license that permits use, copying, modification, distribution, sublicensing, and sale subject to its terms. |
| Purpose | Infection mutates PHP source code and reports changes that a test suite fails to catch. | muttest-rs is a Rust mutation testing tool for evaluating whether a test suite catches simulated bugs. |
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.