Humbug: Mutation Testing for PHP

0
3946

Pádraic Brady announced in a blog post Hambug, a mutation testing framework for PHP. Basically Hambug injects errors in your original code trying to emulate programmers errors then check whether your unit test notice it or not.

Mutation Testing is, in a nutshell, giving your unit tests a run for their money. It involves injecting small defects into source code and then checking if the unit tests noticed. If they do, then your unit tests have “killed” the mutation. If not, the mutation has escaped detection. As unit tests are intended to prevent regressions, having a real regression pass unnoticed would be a bad thing!

Hambug is still under development and support only PHPUnit, however it could already give you an idea about how your unit test are performing and where they could be improved.

Download and documentation about Hambug usage is available on GitHub repository https://github.com/padraic/humbug .

NO COMMENTS

LEAVE A REPLY