Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Test/ Code Ratio

by xdg (Monsignor)
on Jan 28, 2005 at 12:35 UTC ( #425927=note: print w/replies, xml ) Need Help??

in reply to Test/ Code Ratio

The other thing to consider is if your tests have a lot of repetitive code. You might look at Test::Class as a way of refactoring, particularly if your code has a lot of classes/subclasses and your tests are checking them for similar behaviors.

On the other hand, it wouldn't surprise me a priori if you have that kind of ratio. Perl is a very concise language and you can do a lot in only a few lines of code, but testing all the ways that code could be used could be quite lengthy. You've got to consider the branch and condition density of your code -- if that's high, then you'll need a lot of tests to verify behavior in all circumstances.


Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://425927]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2018-05-26 00:37 GMT
Find Nodes?
    Voting Booth?