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

Re: Test/ Code Ratio

by brian_d_foy (Abbot)
on Jan 29, 2005 at 05:57 UTC ( #426197=note: print w/ replies, xml ) Need Help??


in reply to Test/ Code Ratio

Don't worry about what other people do. Write as many tests as you need and don't worry too much if you have some extra. Don't think of tests in terms of lines of code. Test things that do something. Everything that does something gets a test. Test for expected input, unexpected input, and every situation you can think of, even if you think it's trivial. Use a coverage tool to ensure you test everything.

If you go back and refactor the tests to bring down the line count, great. If not, oh well. Worrying about the line count as the main goal is only going to get in the way of your testing mindset.

If you are still curious, simply download some CPAN modules and look for yourself. :)

--
brian d foy <bdfoy@cpan.org>


Comment on Re: Test/ Code Ratio

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://426197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-12-18 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls