Published: Jul 05 2012 / 09:59
I really don't think it is anyhow useful to measure the quality of the tests in percent of lines.
You are absolutely right. It is not a good idea to measure the quality of test code with LOC. This shouldn't be the message of this sample.
If you really like to carefully test your code (and in some cases this is needed) then you need the same or more test code than 'productive code'. This is especially important for effort estimations. In some cases you may need less test code, but the rule of thumb is 50:50 for test and production. By the way I tested this with a larger Spring web application. To test all the code, I needed almost the same ratio.
I agree that LOC is irrelevant. I've been using Branch coverage as a better metric; It's not perfect either though.
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.