Just Before We Get Going... How to Write a Test List

This part will take you approximately 10 minutes.

What I do before I start writing code forms an essential part of my discipline as a programmer. I learned the technique of writing a test list first from Kent Beck's influential book Test-Driven Development: By Example. I later learned that Kent's technique resembled the more general concept of maintaining a "Task Inbox" as described by David Allen in his seminal work, Getting Things Done. Whenever I work, I have at least a piece of paper handy onto which I can write anything that pops into my head that might distract me from the current task. (I'm doing it now as I think about fun stuff to add to this course.) The test list represents a special case of this general concept as well as embodying David Allen's slogan: your brain is for having ideas, not storing them.

Not only does this video demonstrate the technique of keeping things out of your head, but also some very basic testing heuristics. Elisabeth Hendrickson's testing heuristics cheat sheet remains my go-to reference for when I can't think of which tests to write. You'll find a copy of that cheat sheet here.

If you'd rather just jump to the code, then feel free to continue with the next episode, then come back to this one later. Although some people want to just get to the code, others have told me that they would have preferred to see this video earlier, so here it is. You choose!

Complete and Continue