Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Test driven development and glue code

by InfiniteSilence (Curate)
on Oct 05, 2005 at 14:50 UTC ( #497620=note: print w/replies, xml ) Need Help??

in reply to Test driven development and glue code

Looking at your examples:

  • I've got a script that moves users' mailboxes into their home directories...: Write functions that return the list of users and test that; write functions that move fake files to temp directories, etc.
  • I've got another that kills processes left by users ..: Create fake processes and then kill them. Check to ensure that you killed them. Simple.

    I'm not a test-driven coding zealot though. In some cases the script is so simple it really doesn't warrant much testing. The argument for always using test-driven development is a lot like 'thou shalt use classes to code sayeth the OO God' which, as you may already know, is a bunch of nonsense. Use whatever you think is best.

    Celebrate Intellectual Diversity

    • Comment on Re: Test driven development and glue code
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (8)
    As of 2021-03-04 18:45 GMT
    Find Nodes?
      Voting Booth?
      My favorite kind of desktop background is:

      Results (107 votes). Check out past polls.