Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Skip tests if/unless $ENV{FOO} is set using Test::More

by Rex(Wrecks) (Curate)
on Apr 29, 2003 at 20:55 UTC ( #254094=note: print w/ replies, xml ) Need Help??


in reply to Skip tests if/unless $ENV{FOO} is set using Test::More

IMHO (and I have made software and hardware QA my business :) it looks like the problem here is that the test scope is pointed in the wrong direction.

I would hope that all of these tests are being run on as many platforms as are available BEFORE the code is ever downloaded. It seems to me that these tests should be a small, basic subset of the major test suites, and...

...Here's the kicker...

...should be testing that the module has INSTALLED properly, and the basics work as expected on that platform!

22,000 tests is not the basics, it is rather excessive for testing if the installation was successful. Having an option to run all 22,000 tests? Sure, someone might need to know the results of that for various reasons, and if they have the requirement to get that knowlege they will hopefully have the patience to get it.

I would really encourage people to ship as many of their tests as possible with the modules and packages, and even have instructions on how to run them, the debugging benifits are obvious. But please not as an install test, an install test should test exactly that, was the installation successful?

Scope is a very important thing to keep in mind when applying testing to anything. Just because you can and do execute these tests, does not mean they are appropriate for every place that testing is required.

How would you feel if every test ever written for your OS was executed every time the computer booted? or even every time you did an install?

"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!


Comment on Re: Skip tests if/unless $ENV{FOO} is set using Test::More
Re^2: Skip tests if/unless $ENV{FOO} is set using Test::More
by adrianh (Chancellor) on Apr 29, 2003 at 21:36 UTC

    I don't think this approach will work well for Perl/CPAN. It's not practical for the average CPAN contributer to test on all perl platforms, perl versions and possible prequisite module versions before distribution.

    Stick a module on CPAN and you get a distributed testing farm for free, with CPAN Testers thrown in as a bonus.

    It's one of the hidden benefits of CPAN and one of the reasons Perl modules end up being so robust (IMHO :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-08-23 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls