Unit testing is great because it helps us make better software. A good test suite will catch bugs, maintain stability, measure performance, and more.
Yet to be honest, those aren’t the reasons I like testing so much. I like writing tests because it just feels great to run them. Sometimes I catch myself watching the Amatino API test suite running, not because I need to test changes, but because I simply want to watch it run.
At upper left, we have the HTTP returns for the public-facing API. At lower left, the internal API. At right, the list of successful tests marching downwards.
It is the closest I can be to watching the machine think. All the thousands of lines of code, the weeks of agonising over tough problems, the frustrations of insidious bugs, the joys of successful output. All distilled into a real-time ballet of virtual machines, database queries, http requests, and code execution that I can see with my own eyes.
Write tests. Not because the bloggerverse told you to, but because it just feels good.