[Bioperl-l] Tests

Hilmar Lapp hlapp at gmx.net
Mon Jun 26 15:30:05 UTC 2006


On Jun 26, 2006, at 10:44 AM, Sendu Bala wrote:

> What level of testing is expected to be done in a test file? Is there
> such a thing as too many tests?

No, not really.

> Tests for every possible (documented)
> way of achieving a result with a module's method?

Ideally that's the minimum.

> Tests for every conceivable way of misusing a method?

If some or known already (from reports) or you think can be  
anticipated, yes. Generally, if a method documents what are invalid  
values for its input it's a good idea to test what the method does if  
supplied with such values. The one thing it shouldn't do is silently  
ignore them, or produce a result anyway (which presumably would be a  
wrong result by definition).

>
> If I come across a test for a module that doesn't test for everything
> the module can do, should I add tests as a matter of course? Would  
> this
> be beneficial, or a waste of time (given that the module probably is
> bug-free already)?

It would certainly be beneficial. It'd be great if you were willing  
to volunteer for this.

Note that a module being bug free now doesn't mean it always will be.  
The main point of tests is not only to weed out bugs at the time it  
is written, but also to make sure that future changes to the module  
itself, or to other modules it interacts with or inherits from, don't  
break it.

	-hilmar

>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the Bioperl-l mailing list