This repository contains all the code for The Engineering Coach YouTube video, "Who Tests the Tests? An Introduction to Mutation Testing with Infection (PHP)".
In this video, we dive into the world of Mutation Testing with Infection, a powerful PHP framework. This project demonstrates how mutation testing can help you measure the quality of your tests, not just your code coverage.
- The core concept of mutation testing and why it matters.
- How to use Infection to "mutant test" your code.
- The difference between a "killed" and "escaped" mutant.
- How to use the results from Infection to improve your tests.
This video is an excellent resource for anyone who wants to write more confident, bug-proof code and build a truly robust test suite.
👉 Click here to watch the full tutorial!
To run the code and follow along with the video, you'll need PHP, Composer, and either Xdebug or PCOV installed.
- Clone the repository:
git clone https://github.com/the-engineering-coach/012-infection
cd 012-infection- Install the dependencies:
composer install- Run Infection:
./vendor/bin/infectionThe Engineering Coach is a YouTube channel dedicated to helping software engineers and engineering managers improve their skills and craft. We provide practical advice and tutorials on topics that matter in the real world of software development.
For more software engineering tutorials and coaching, subscribe to The Engineering Coach on YouTube. You can also connect with me on Bluesky or Mastodon.