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

Re: Test driven development and glue code

by Perl Mouse (Chaplain)
on Oct 05, 2005 at 14:54 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://497624]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found