Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Using standard testsuites

by Bloodnok (Vicar)
on Apr 28, 2009 at 16:42 UTC ( #760662=note: print w/replies, xml ) Need Help??

in reply to Using standard testsuites

I wonder if the omission would have shown up had test coverage (utilising Devel::Cover) been generated ? I suspect it may have given some indication...

Having said that, it has to be taken on trust that a used CPAN module passes the tests defined its own test suite (c/w say mod::Test::Unit - which tests a module and all its ancestors!!) - hence maybe there's a case for all CPAN modules to utilise/generate test coverage figures - thus imbuing more to the test results.

After all, as you've demonstrated, what use is 100% pass rate if test(s) being run are flawed &/or incomplete ?

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^2: Using standard testsuites
by DrHyde (Prior) on Apr 29, 2009 at 10:40 UTC

    Devel::Cover is a fabulous thing, and has helped me find and squash obscure bugs that weren't covered by my tests, and I'm starting to add it to my distributions as and when I have to hack on them.

    But it's not a panacea. It will, for example, flag all sorts of tiny conditions that a conscientious programmer puts in for things like open(...) || die(...) but really aren't worth bothering with testing. It will flag things that not only aren't worth bothering with, but actually *can't be tested* on your machine, such as patches that people sent you to make your code work on other platforms. Seperating the coverage wheat from the chaff is rather time-consuming.

      I agree, it [Devel::Cover] is most definitely not a panacea - I suggested it merely as a means to improve the end result - where the end result is determined as a fit-for-purpose test suite.

      Maybe it's just me, but I invariably test _all_ paths thro' the code - especially error paths in cases where exception classes are in use.

      Having said that, your point about untestable code is well made and indeed, taken.

      A user level that continues to overstate my experience :-))
Re^2: Using standard testsuites
by Tux (Abbot) on Apr 28, 2009 at 16:54 UTC

    Devel::Cover is certainly in the pen. One of the first things was to add that target to Makefile.PL, as I have for all my modules. make cover is almost a second nature by now :).

    In this case it would not have shown the error, as DBD::File is not part of DBD::CSV, but stowed away in the bowels of DBI.

    Enjoy, Have FUN! H.Merijn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://760662]
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: (5)
As of 2020-11-24 04:47 GMT
Find Nodes?
    Voting Booth?

    No recent polls found