Skip to content
SPECIFICTION
Get listed

Infection vs Mutatest

Infection

infection.github.io

Mutatest

mutatest.readthedocs.io

Side by side

FigureInfectionMutatest
Price from—Free
Free plan—Yes
Free trial——
Open source—Yes
WebYes—
Windows—Yes
macOSYesYes
LinuxYesYes
API—Yes
Self-hosted—Yes
Plans published01
Spec score · Mutation Testing Tools7.6 (#11)8.7 (#1)
Parallel executionTests for mutated code can run in parallel with the --threads option, including automatic CPU-core detection with --threads=max.Multiprocessing is supported on Python 3.8; parallelization is not supported on Python 3.7.
PurposeInfection mutates PHP source code and reports changes that a test suite fails to catch.Mutatest is a diagnostic command-line tool for assessing test coverage by checking whether tests detect small code mutations.

Plans

Infection

No plans published.

Infection pricing →

Mutatest

  • MutatestFree

Mutatest pricing →

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

Mutatest

Mutatest is a free command-line tool for Python projects that checks whether tests catch small changes to code. It creates valid mutations from Python’s Abstract Syntax Tree grammar and applies them to local __pycache__ files rather than changing source files. If coverage data is available, it can limit targets to lines marked as covered. Mutations are sampled randomly, with a seed available to make runs reproducible. Command-line controls include run modes, mutation categories, file exclusions, timeouts, reports, and thresholds for surviving mutants; an API supports custom controls. The documentation describes using test commands such as pytest and coverage data to filter targets. Mutatest can raise an exception when surviving mutants meet a configured threshold, including in automated runs such as CI. It supports Linux, macOS, and Windows, and is free under the MIT License. Installation requires Python 3.7 or 3.8; multiprocessing is available on 3.8, but not 3.7. Repeated test runs can be slow, so it is intended for diagnostics rather than every commit across an entire codebase.

Visit mutatest.readthedocs.io