The basic idea of snapshot testing is that you compare the output of your code against a file that’s written on disk. That file is called a snapshot. If the output of your test matches up with the contents of that snapshot, it succeeds, otherwise, it fails. It’s a simple as that.

In this talk we’ll demo how you can add snapshot testing methods to PHPUnit and review a practical example on how to use them.


Comments are closed.

Robert Broen at 12:22 on 7 Sep 2017

Live demo with real world examples. Up to now I had not heard of spanshot-testing. Nice to see it applied and to have broadend my horizon.

Gabriel Somoza at 13:50 on 7 Sep 2017

You did a great job condensing the topic to fit a lightning talk format without losing any of the essence. The tool looks great too and I look forward to an opportunity to use it!