good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
How To Testby John M. Dlugosz (Monsignor) |
on May 15, 2011 at 04:13 UTC ( [id://904909]=perlquestion: print w/replies, xml ) | Need Help?? |
John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
Trying to make my CPAN module do all the up-to-date and "correct" stuff, I've learned that some(many) module boilerplates and defaults are not correct. Someone pointed me to this article which mentions things like “running of tests under AUTOMATED_TESTING” with the expectation that the reader knows what he's talking about. There seems to be a community of testers that share war stories and develop Best Practices and invent new modules. So how does one find that community? I've read the Test Tutorial documents, Test::Simple and Test::More and gleamed some things from the test files generated by module-starter (which I'm told are incorrect). But that's just the tip of the iceberg, it would seem. Where is the documentation on the details of these environment variables and other settings, how to tools and CPAN uses testing, etc.? Is there a tutorial for not just writing a single test case but in setting up the module correctly? A more specific question: I got a CPAN tester report back concerning failure on Windows, because I'm testing that a function dies when documented to be exceptional, and furthermore that the Carp is giving information relating to the correct caller (the call of the user-facing API). Since the file names are different on Windows, this detail was wrong. But that's not reason for someone to reject the module if a dependency pulls it in. This talk of "advanced testing" is about module details and POD, but it would seem that some picky details that can be tested are "warning", not "fatal" or part of the critical feature set. I have "ok" and "not ok". What about "somewhat OK"? In this particular case, I'd like to know from the CPAN test suite on all versions and platforms that the warning exists, so I don't want to skip the test. But it should not mark the module as being bad on that platform/version.
Back to
Seekers of Perl Wisdom
|
|