Skip to content
SPECIFICTION
Get listed

Infection vs Mutant

Infection

infection.github.io

Mutant

github.com

Side by side

FigureInfectionMutant
Price from—$20.83/mo
Free plan—Yes
Free trial——
Open source——
WebYes—
macOSYesYes
LinuxYesYes
Plans published04
Spec score · Mutation Testing Tools7.6 (#11)8.2 (#5)
PurposeInfection mutates PHP source code and reports changes that a test suite fails to catch.Mutant is mutation testing for Ruby that systematically modifies code and verifies that tests catch each change.

Plans

Infection

No plans published.

Infection pricing →

Mutant

  • Open sourceFree
  • Commercial monthly$30 a month
  • Commercial yearly$250 a year
  • EnterprisePriced on request

Mutant 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

Mutant

Mutant is Ruby mutation-testing software that changes code in controlled ways to check whether tests catch the changes. It alters arithmetic, logical and bitwise operators, removes statements, and changes return values. It works with RSpec, Minitest and Test::Unit, and supports incremental runs for CI. Supported Ruby versions are 3.2, 3.3, 3.4 and 4.0 for runtime, syntax and mutations. Rails support is verified for versions 7.2, 8.0 and 8.1, with parallel-worker database isolation for PostgreSQL and SQLite. Mutant runs on developers’ machines or in CI, and includes parallel execution and reports of surviving mutants. It cannot generate mutations for methods defined inside closures, including methods created with module_eval, class_eval, define_method or define_singleton_method. The open-source plan is free for public repositories with the full feature set. Commercial monthly pricing is $30 a month per developer; yearly pricing is $250 a year per developer. CI use requires no additional subscriptions.

Visit github.com