Gambit vs Infection
Gambit
certora.comInfection
infection.github.ioSide by side
| Figure | Gambit | Infection |
|---|---|---|
| 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.8 (#8) | 7.6 (#11) |
| How it works | Gambit introduces faults called mutants into selected contracts and measures whether a test suite detects them. | It creates mutants using predefined mutation operators, runs tests covering changed lines, and records killed or escaped mutants, errors, and timeouts. |
| Installation | Prebuilt binaries are available for Linux x86-64 and Mac; Windows and Linux ARM users must build from source. | The maker documents PHAR, Phive, Composer, Git, and Homebrew installation methods. |
| License | The Gambit GitHub repository identifies its license as MIT. | The project is released under the BSD-3-Clause License. |
| Purpose | Gambit is an open source Solidity mutation testing tool that evaluates and strengthens a testing suite. | Infection mutates PHP source code and reports changes that a test suite fails to catch. |
In their own words
Gambit
Gambit is a free, open-source mutation testing tool for Solidity projects. It generates altered contract versions, called mutants, to measure whether a test suite or formal verification specification detects faults. Gambit locates mutation points by traversing a program’s abstract syntax tree and applying predefined syntax transformations. A declarative configuration language lets users tailor mutations to specific parts of a program. Results can be viewed in a dashboard that summarizes mutant verification and calculates a specification score. Gambit can work with the Certora Prover to evaluate formal specifications; that workflow generates mutants and submits a verification job for each to Certora’s server. The command line includes `mutate` for generating mutants and `summary` for presenting them. A compatible `solc` binary is required for the project being mutated. Gambit supports Solidity and is listed for Linux, macOS, and Windows, though prebuilt binaries are available for Linux x86-64 and Mac; Windows and Linux ARM users must build from source. Function-call and swap-arguments-function mutation operators are disabled. The repository identifies the license as MIT. Certora directs product questions to its Help Desk channel on Discord.
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.