Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Setting up a test suite in perlby jasoncollins (Novice) |
on Nov 09, 2009 at 05:57 UTC ( [id://805858]=perlquestion: print w/replies, xml ) | Need Help?? |
jasoncollins has asked for the wisdom of the Perl Monks concerning the following question: I am trying to setup a test suite in perl, and I was hoping some one can help me with the overall design/setup of a test suite/testharness in perl: I am using h2xs to generate a template for modules and test scripts, and using Test::More for testharness. The directory structure generated by h2xs, after some of my modifications is as follows:
- I plan to setup different Modules/libs for different test segments e.g. Performance (Perf.pm), Call processing (CP.pm), ... - Each test segment will have its own set of test cases, so for instance Performance segment will have perf1.pl, perf2.pl ... - I intend to have a controller script, e.g. controller_perf.t, which will call all the scripts that need to be run in a particular segment. So within controller I have "system" calls to execute the different test scripts, e.g. controller_perf.pm will call:
$test1Result = system('\t\perf1.pl'); - Is this a good way of going about setting up a test suite? Is there something I should be doing differently, or something can be improved here? Thanks! jc
Back to
Seekers of Perl Wisdom
|
|