[Israel.pm] Testing your CPAN Module

Yuval Yaari yuval at windax.com
Sun Jul 4 01:49:35 PDT 2004


Gabor, I found it weird that you didn't say a thing about
Devel::Cover...
If you want to check how "good" your tests are, you should use it.

Gabor introduced me to this module some time ago.
I like Devel::* modules, and this one is extremely useful.


  --Yuval


On Sun, 2004-07-04 at 14:37, Gabor Szabo wrote:
> Yuval gave you already a number of good pointers,
> let me add a few more:
> 
> http://qa.perl.org/ is the ultimate starting place for Perl QA modules.
> 
> I also maintain a Bundle including some explanations and links
> to various resources.
> http://search.cpan.org/dist/Bundle-Test/Test.pm
> 
> > What easy to use tools are available to construct tests in
> > Perl?
> Start with Test::Simple and then move over to Test::More.
> 
> 
> > * That all dependencies are available (how would I define them at the first place? How can I make sure they exist?)
> I'd highly recommend Module::Build, - it can generate a Makefile.PL as
> well for backward compability. Look at others how the use it, in my recent
> CGI::FileManager module I have a simple example of using this.
> 
> 
> > * How can I change the behaviour of the test suite depending on available prerequisites?
> Look at the  SKIP capability of Test::More
> 
> 
> > * take a text file (which is part of the distribution) and
> > have the module segment it and then check for each special
> > case if the segmentation was correct.
> 
> Once you started to write a number of tests you'll be able to refactor
> your tests. I usually create a module called My::Module::Test and
> put it in t/lib/My/Module/Test.pm This module then contains
> a number of tools needed for my own testing purposes.
> 
> Gabor
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
> 




More information about the Perl mailing list