From: Darrin Thompson Date: 2001-12-08T02:55:11+09:00 Subject: [ruby-talk:27828] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) Thaddeus L Olczyk wrote: >The things is though ( and a major part of my original post ) is that >"only 5" sounds good until you think about it. > >Assume you have a small project of 1000 units. That means 5000 units >( and that is assuming that 5 still holds I would expect other units >to be more complex requiring even more unit tests, the number >increasing exponentially with complexity. ) > >So now you need an infrastructure to handle 1000 units + 5000 tests. >That is what I see as the main problem with unit testing. > Email is really an awful way to discuss things. I really doubt that we all are thinking the same thing when we say "unit" or "unit testing". If you are minded to write 1000 units, 5000 tests and then deliver the results to your customer, the tests seem like overkill. If you are keeping you customer in the loop and delivering say, 100 units at a time and deploying them into production every time, those 5*u tests ARE the infastructure. Also, if you keep releasing changes into production, the customer will come up with new ideas and scrap some old ones. Her new ideas are going to require you to scrap some of your old ideas too, and maybe even some fundamental early ones that should be expensive to change. The 5*u tests tell you at a glance what areas of the program have changed their behavior as a result of rippling changes. Also, they tell you about the effects of your changes in the entire program at once. But, again, testing doesn't live in a vacuum. It's part of a bigger picture, and that bigger picture is providing benefit to the customer as early as possible. It's just a part of that. Darrin