----- Original Message ---- From: Nicholas Clark <[EMAIL PROTECTED]> > There is this big hairball of under-tested code. (Nothing new here) > So the question is, which to tackle first - unit tests, or functional tests.
Enough people have answered that I suspect you have your answer, but I thought a personal anecdote could help to illustrate things. When I first started testing, I was working on a large project where we took an existing open source app and extensively modified it. The app didn't have tests so every time we worked on something, we made a point of trying to add tests for that function/method and everything it touched. In short, we wrote tons of unit tests for absolutely everything we could and we had hundreds passing tests. Our first dry-run of the entire system was a disaster. Just because A, B and C all pass their tests doesn't mean they play well together and given our tough deadline, it was a hard lesson to learn. To this day, I often focus on high-level functional or integration tests first. It makes it harder to track down bugs, but it does make them easier to find. Further, I don't have to worry about whether or not different pieces of the application can actually talk to one another. Cheers, Ovid