Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re (tilly) 1: Stopgap measures when you don't have a QA department

by jackdied (Monk)
on Oct 19, 2001 at 02:05 UTC ( [id://119817]=note: print w/replies, xml ) Need Help??


in reply to Re (tilly) 1: Stopgap measures when you don't have a QA department
in thread Stopgap measures when you don't have a QA department

I've used Test::Unit, and really like it. One of the nice things about perl is that it is very good language for writing self-testing routines in.

When you can, have the tests run outside the production environment. This isn't doable for everything, but offload as much as you can to 'make test' and 'make check' kinda tests.

Another good place to test modules is when they are loaded. Have modules register with a central module to announce themselves, when they call GateKeeper::register() use the caller(0) information to perform any runtime tests on the newly loaded module

package GateKeeper; use strict; my $package_list = {}; sub register { my ($package) = caller(); perform_tests($package); # ensure all required subs are defined $package_list->{$package} = $package->cvs_version(); # cvs_version( +) sub is tested in perform_tests } # other subs to query cvs version info and other fun stuff
Someday I plan on posting a more complete version of registration and testing of virtual interfaces to PM, but today isn't going to be that day.

-jackdied

  • Comment on Re: Re (tilly) 1: Stopgap measures when you don't have a QA department
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found