In Praise of Unit Testing

This entry is part 3 of 12 in the series Version 2 WordPress Plugin

As I am developing the new WordPress plugin, I am doing a lot of unit testing. This has been turning up a lot of nasty bugs that would have come back to bite me later on.

The BMLT is, first and foremost, about reliability and quality. It is incumbent upon us, as BMLT developers, to do absolutely everything we can to ensure that the product is rock-solid. People can definitely die if they can’t make it to meetings.

While we can’t guarantee that they’ll be able to find meetings, we can guarantee that the infrastructure we deliver is super-reliable.

The BMLT is an incredibly complex system. Every time we touch it and/or extend it, we will introduce bugs. Not we might introduce bugs, we will introduce bugs. Whether or not the bugs make it into releases is our Responsibility.

With a good unit testing system, you can usually find most bugs (especially the really serious ones, like bad design) extremely early on.

I wanted to add that I have never written a “useless” unit test. i.e., one that simply bears out that my code was already perfect. Every single time I write unit tests, I find bugs. Often, serious bugs. I cannot stress this enough. I am a highly experienced coder. We all make mistakes. Unit tests help us to mitigate these, early in the process.

This entry was posted in BMLT Development. Bookmark the permalink.

Leave a Reply