I mean we can argue semantics day and night, but TDD is typically considered a bottom up approach. There's no technical definition either way but Wikipedia hints at it being a bottom up approach and Googling "TDD bottom-up top-down" brings up discussions where the overwhelming results on the first and second page refer to TDD as being bottom up.
As an aside Richard Feynman, who wrote a report on the Challenger Disaster, discusses various approaches to testing and mentions a process very similar to TDD. However, he is very explicit in saying that testing of that sort is bottom up and advocates a bottom up approach to testing in general.
Once again, it's mostly semantics but when people think of bottom up they think of going from the small to the big.
89
u/rabidferret Mar 11 '13
You've got it backwards...
Plan the general elements of your UI
Write tests for the code that would result in that UI
Create your data structures to contain what the UI has told you is needed
Write your code to fit the previous elements