From: Bil Kleb Date: 2006-12-07T01:00:06+09:00 Subject: Re: TDD/unit testing question Eric Hodel wrote: > On Dec 5, 2006, at 06:10 , James Mead wrote: >> >> - If you find that making a change to a single class is breaking loads >> of seemingly unrelated tests, this is probably an indication that too >> much code is being covered by each test. It may also indicate a high >> level of coupling in your design. > > When I was new to TDD and unit testing this was my biggest problem, > especially the coupling side. I've evolved my coding style to produce > shorter, simpler methods that are easier to test (usually less than ten > lines, very rarely over 25 lines). Also, I heavily refactor tests to > move re-usable test code into utility methods. I had a similar experience. TDD reveals design smells in your code. Regards, -- Bil Kleb http://fun3d.larc.nasa.gov