From: Jason Roelofs Date: 2007-07-12T23:40:53+09:00 Subject: Re: Unit test lines of code ------=_Part_23700_16869958.1184251243584 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline My accepted ratio is 2 lines of test code to 1 line of actual code. If you have 1:1, then you're definitely not testing enough (edge cases, failure cases, etc). I've pulled a 4:1 ratio on a few Rails sites I've worked on, and even then I could add more edge case testing. As for those who complain about LOC, well they obviously don't care about quality of code, just getting things done as fast as possible. I would recommend staying far away from such people. Jason On 7/12/07, benjohn@fysh.org wrote: > > > I'd like to know people's opinions. > > I quite often find that when I'm doing TDD, I end up with as much test > code as implementation, or more. > > I don't think I'm testing stupid things in my tests - I usually write > the tests incrementally, imagining I had the thing I'm testing, and > writing tests that exercise its functionality. > > I've heard people say "those crazy unit test devotees - what's the point > if you've got more test code than implementation?!", and I wonder how > other people feel? > > My take is it's probably a case by case thing, but in the cases I've > come accross, I've been very comfortable with greater lines of test code > than implementation. I've felt the balance is right. > > Cheers, > Benj > > > ------=_Part_23700_16869958.1184251243584--