Infection is a PHP mutation testing framework based on AST (Abstract Syntax Tree) mutations.
What is Infection
Infection is a PHP mutation testing framework based on AST (Abstract Syntax Tree) mutations. It works as a CLI tool and can be executed from your project’s root.
Infection currently supports PHPUnit and PhpSpec test frameworks, requires PHP 7.1+ and Xdebug/phpdbg installed.
In a nutshell, it:
- runs the test suit
- mutates the source code with a set of predefined mutators (mutation operators)
- collects the results of killed, escaped mutants and timeouts
Useful links
Documentation: https://infection.github.io/guide/
GitHub: https://github.com/infection/infection
A detailed post about Mutation Testing and Infection: https://medium.com/@maks_rafalko/infection-mutation-testing-framework-c9ccf02eefd1