Mutation Testing – PHP Web Applications
We covered the basics of mutation testing. Now it’s time to have a look at why you may have never seen it in any web application you’ve worked on and what tools are available to use.
In practice, despite of a variety of available alternatives, PHP based software is and has been the foundation for many commercial online services.
And because PHP has been around for quite a while now, systems have often been developed and maintained for a longer period of time than other web software built on newer or more short-lived technologies. The object orientation of PHP allows for complex structures that have to be tested as thoroughly as any other software would. Seeing that, PHPUnit, a popular testing framework with built-in code coverage metrics for PHP, enables developers to create tests with feasible effort. Concerning test quality assessment then, Danawale and Kadam  finally proposed a mutation testing tool for the PHP language in their publication in 2016. Coupled with this relatively weak research interest, hardly any tools or frameworks are available which further hardens the breakthrough of mutation testing in web development.
The first Mutation Testing tool for PHP was Humbug written by Pádraic Brady and initially made available in 2015. While it was the only tool available, it offered downsides that eventually led to the development of Infection, initialized in 2017 by Maks Rafalko. In the meantime, Humbug has been abandoned, is no longer maintained and suggests Infection as the only available alternative for Mutation Testing PHP code.
Luckily, Infection is thriving and under active development. The tool is available as a composer package and ready to use for continuous integration processes.
 Upsorn Praphamontripong and Jeff Offutt. Applying mutation testing to web applications. In Software Testing, Verification, and Validation Workshops (ICSTW), 2010 Third International Conference on, pages 132–141. IEEE, 2010.
 Jyoti J Danawale and Sandeep Kadam. Survey on different approaches for mutation testing. 2016.