Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Perl: the Markov chain saw
 
PerlMonks  

Re: What is a testing plan?

by t'mo (Pilgrim)
on Mar 02, 2006 at 04:25 UTC ( #533805=note: print w/ replies, xml ) Need Help??


in reply to What is a testing plan?

One thing you might want to consider is that testing shouldn't just cover your expected outputs given certain inputs, but should also test the "behavior" of the code. Your tests should prove that the code behaves a certain way, e.g., that an object from Module::Foo delegates work to another object from Module::Bar.

A co-worker taught me that you can tell if your tests are of this type if you can describe each test using the word "should". For example, "Module::Foo should call Module::Bar::x", "should populate webpage template with values", "should throw exception if Oracle error code XYZ received", etc.

This shouldn't detract from having tests for the output, but from what I've seen recently, most tests involving actual data values (as opposed to behaviors) should be thrown in the "integration test" category.

Some relevant links: http://blog.daveastels.com/files/sdbp2005/BDD%20Intro%20slides.pdf, http://behaviour-driven.org/BehaviourDrivenProgramming.


Comment on Re: What is a testing plan?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2014-04-18 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (469 votes), past polls