http://qs321.pair.com?node_id=760839


in reply to Re: Using standard testsuites
in thread Using standard testsuites

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.

Replies are listed 'Best First'.
Re^3: Using standard testsuites
by Bloodnok (Vicar) on Apr 29, 2009 at 10:50 UTC
    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 :-))