Infection vs Stryker Mutator
Infection
infection.github.ioStryker Mutator
stryker-mutator.ioSide by side
| Figure | Infection | Stryker Mutator |
|---|---|---|
| Price from | — | Free |
| Free plan | — | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| macOS | Yes | — |
| Linux | Yes | — |
| API | — | Yes |
| Self-hosted | — | Yes |
| Plans published | 0 | 1 |
| Spec score · Mutation Testing Tools | 7.6 (#11) | 7.2 (#18) |
| License | The project is released under the BSD-3-Clause License. | Stryker is released under the Apache 2.0 license. |
| Purpose | Infection mutates PHP source code and reports changes that a test suite fails to catch. | Stryker performs mutation testing by inserting changes into code and running unit tests against the changed code to assess test effectiveness. |
| Security | The maker says its PHAR distribution is signed with a GPG key and documents how to verify the signature and fingerprint. | Stryker says it mutates only source code to avoid false positives. |
Plans
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.
Stryker Mutator
Stryker Mutator is mutation-testing software for JavaScript, TypeScript, C#, and Scala. It changes source code in more than 30 defined ways, then runs unit tests against those variants to show how effectively the tests detect faults. The project supports incremental analysis, parallel execution, surviving-mutant reports, and mutation quality gates. It is test-runner agnostic, with listed integrations including Cucumber, Jasmine, Jest, Karma, Mocha, Tap, Vitest, and a command runner. Code analysis and parallel test-runner processes are used to speed runs, although the FAQ notes that mutation jobs can be slow and recommends improving unit-test performance or limiting files. Stryker is free, released under Apache 2.0, and available through API or self-hosted use. Its cloud dashboard stores reports and mutation-score badges, free for open source, with GitHub account setup and github.com as the supported Git provider. Reports can be sent directly or by HTTP PUT with an API key.