I blame The Vision Thing for making me jump on this sort of wacky thing:
1. Grab the nearest book.
2. Open the book to page 123.
3. Find the fifth sentence.
4. Post the text of the sentence in your journal along with these instructions.
5. Don't search around and look for the "coolest" book you can find. Do what's actually next to you.
Ok. The book closest to me when reading that blog entry was Kent Beck's Test-Driven Development: By Example (Honest! I didn't go looking for a cool agile book from the bookshelf...) and the 5th sentence on page 123 says:
How do we choose what data to test?
Wow. That's a tough question. How do we choose what data to test with? I suppose there is no globally correct answer (there hardly ever is), but my suggestion would be simple data. If the test data is difficult to understand, the test implicitly becomes difficult to understand. If the test is not about handling special characters, don't use special characters in the data. If you're not testing an edge case, don't use a single character string or a zero-length string.
Test one thing and test it properly.
-- me
Do you have any rules of thumb of your own for selecting test data for programmer tests?







