TDD: Proof of Life
·
Unit testing and test-driven development are both very much alive.
·
Unit testing and test-driven development are both very much alive.
·
The worst thing I remember about my old habits with dishes was how long it would take to do them when I finally got around to it.
·
Whenever I try to explain unit testing to another developer, I refer to the “smallest unit of work” that’s possible to test.
·
Last year, I had the opportunity to present at jQuery Portland about unit testing. It was my first non-WordPress speaking event, and it was incredible!
·
Determining which methods in your application needed testing used to be easy – test everything exposed by the public API. But once you invite other developers to contribute, you are exposing a whole other set of internal APIs to the team. The behavioral consistency of these methods is just as important as that of the…
·
Last time, I argued in favor of the Singleton pattern in WordPress. Singletons make sense in WordPress specifically for several reasons: They live in the global scope without using the already abused/overused [cci]global[/cci] keyword As a distributed application maintained by several hundred developers, they prevent problems that likely arise from others misusing your code But
·
Not everyone is a fan of test-driven development. Writing unit tests for your code can be a laborious task, and it has no immediate benefit to your customers. So why waste any time writing the tests, right? This past week, a colleague of mine summed up the problem pretty well: I’ve finished writing the code for that
·
If you’ve ever written code, you’ve probably written a unit test. If you haven’t written unit tests, you should start. Now. Really. Unit tests let you quickly verify that your code is operating in a predictable fashion. When you make changes down the road, you re-run the same unit tests to make sure nothing broke.