The first part of the TDD cycle is choosing a test for failure. I would like to start a community wiki about this selection process.
Sometimes the choice of dough to start with is obvious, start with low hanging fruit. For example, when writing a parser, a simple test to start with is one that does not process input:
def testEmptyInput(): result = parser.parse("") assertNullResult(result)
Some tests are easy to pass, requiring a small implementation code, as in the example above.
Other tests require passing complex slabs of implementation code, and I have the feeling that I did not do the βeasiest thing to pass the testβ. At this point, I stop trying to pass this test and select a new test to try to pass, in the hope that it will show an easier implementation for the problematic implementation.
I would like to examine some of the characteristics of these simple and complex tests, how they affect the selection and organization of test documents.
How does test selection relate to top-down and bottom-up strategies? Can anyone recommend entries that examine these strategies for TDD?
source share