Subversion
Written by: Lorna Jane Mitchell
Featured Refcardz: Top Refcardz:
  1. Git
  2. DNS
  3. Data Mining
  4. Spring Data
  5. Subversion
  1. Spring Data
  2. Subversion
  3. Spring Config.
  4. Spring Annotations
  5. Data Mining

Link Details

Link 815839 thumbnail
User 412017 avatar

By spm2ot
via sites.google.com
Published: Jul 05 2012 / 09:59

A good implementation of  utility / framework classes should have a comparable ratio between test code (~60%) and production (~40%) code.
  • 8
  • 1
  • 1024
  • 1007

Comments

Add your comment
User 42872 avatar

cafebabe replied ago:

0 votes Vote down Vote up Reply

I really don't think it is anyhow useful to measure the quality of the tests in percent of lines.

User 412017 avatar

Markus Sprunck replied ago:

0 votes Vote down Vote up Reply

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.

User 352719 avatar

Jonathan Fisher replied ago:

0 votes Vote down Vote up Reply

I agree that LOC is irrelevant. I've been using Branch coverage as a better metric; It's not perfect either though.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (1)