If you blog it they will come?

Thursday, April 22, 2010

Automated tests saved my project from chaos and ruination

File this one under "Obvious" but I wanted to specifically describe how tests made developing against a brand new platform not just easier, but possible.

Over the past few weeks I've been developing against the spanking new Facebook Open Graph API that was released yesterday (the Like button specifically).

Facebook was developing the API at the same time we were. Many things were subject to change, including feature designs, the external API, and our own API wrapper. Chaos may have ensued, but for one rock upon which I clung: the tests I wrote early on (but not first!) for the Like button.

When when things shifted, it was a simple matter of fixing test failures. If the specification changed, I already had a solid test framework that was easy to reuse in order to account for new or different behavior.

It may seem obvious but those tests were worth their (figurative) weight in gold. We had little time and changes came frequently. We couldn't afford to miss the fact that we left something broken. And manually verifying the feature became infeasible and would take precious hours we didn't have.

Best of all, when Facebook flipped the switch and the feature went live following the keynote, I could breathe easily knowing that I had tested the hell out of it before millions of Facebook users would get to do the same. Yet another reason in a sea of reasons why tests are valuable.

No comments: