Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: how to begin with testing?

by DrHyde (Prior)
on Mar 23, 2009 at 13:53 UTC ( #752596=note: print w/replies, xml ) Need Help??

in reply to Re: how to begin with testing?
in thread how to begin with testing?

Agreed, with one exception - that being if you want to re-factor the code or make major architectural changes. Then you need tests that exercise the application thoroughly so that you can be sure that your changes don't break anything.

As for how to write an application in such a way as to be easily tested - instead of a huge monolith, break it into chunks so that each little bit of functionality can be easily tested. For example, if your application has a config file, then instead of scattering configgish stuff throughout the app, abstract it out into a module that provides functions for reading and parsing the file, and for getting at the information, which can be tested entirely seperate from the main body of the app.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2016-10-23 15:15 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.