Wednesday, October 24, 2007

TDD - The hardest thing

These days I spend my spare time to read "Test Driven - Practical TDD and Acceptance TDD for Java Developers". I've just finished chapter 2 and started to bump in chapter 3 but I found out that "Test Driven" is an interesting book (more interesting than "Agile Java: Crafting Code with Test-Driven Development")

In chapter 2 and 3, the author teaches me how to start TDD (test-driven development) with a template parser step by step. IMO, the hardest thing when we start TDD is find out the tests from the requirements or user stories. In simple application, it's easy to find them out. But in more complicated one, it's very hard to find.

In template parser application, I can easy to find out some tests:

+ Test for empty template
+ Test for replacing a variable in the template with its value
+ Test for replacing multiple variables with their values respectively

but in case of an employee management application, how can I find the tests? This question is not easy to answer.

Update: Fix typo

No comments: