Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Test driven development and glue code

by Perl Mouse (Chaplain)
on Oct 05, 2005 at 14:54 UTC ( #497624=note: print w/replies, xml ) Need Help??


in reply to Test driven development and glue code

Well, for a script that should just use a mailbox if it's too large, I'd create a new user. First I create a mailbox that isn't large enough to trigger a move and run the script. If it doesn't do anything, it passes the test. Else it fails. Then I'd increase the mailbox to be just over the limit, and run the script again. If the mailbox is moved (and nothing else happens), the test passes, else the test fails.

And frankly, that's about all you need to test. Sysadmin scripts often do only one thing - or do one thing only if a condition is true. Which means there aren't many tests to do, and it's probably easier to just test it manually than to spend time figuring out how to automate it.

Perl --((8:>*
  • Comment on Re: Test driven development and glue code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2021-03-07 12:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (121 votes). Check out past polls.

    Notices?