Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: What is a testing plan?

by t'mo (Pilgrim)
on Mar 02, 2006 at 04:25 UTC ( [id://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:,