Using `make` and `git diff` for a simple and powerful test harness
This technique is also known as characterisation testing, golden-master testing, snapshot testing, and probably other names too. I recommend looking into <a href="https://approvaltests.com/" rel="nofollow">https://approvaltests.com/</a> (already mentioned by another commenter).<p>I use characterisation testing all the time, in a perhaps unusual application: Checking the behaviour of "Page Objects" (classes used to model the application-under-test in GUI-level automated testing) when the application-under-test has changed. That's right: Automated [characterisation] tests for my automated [GUI] tests! It makes GUI testing oh so much easier to maintain. I wrote it up here: <a href="https://david.rothlis.net/pageobjects/characterisation-tests" rel="nofollow">https://david.rothlis.net/pageobjects/characterisation-tests</a>