On Thu, Feb 28, 2002 at 07:23:43PM +0100, Tels wrote:
> Moin,
> 
> as a fan of Devel::Cover I can't stress enough how usefull this module is.
> Writing tests is easy, writing *good* tests is not-so-easy.
> 
> So, I tried to use Devel::Cover to coverage my testsuites. There are quite
> some bugs and bumps, but these are hopefully straightened out ;)

Indeed, Devel::Cover is one of my favourite modules right now.

> What do you think?

Like it, tried it after a fashion already.  I thought I'd mentioned it
here already, but that was the gcov thing.  Doh.

What I've been doing on a work project is this, which is quite cheesy:

sub MY::postamble {
    return <<EOF
cover:
\trm -rf cover_db
\tPERL5OPT=-MDevel::Cover make test || true
\tcover -html cover_db > /dev/null
EOF
}

That should really be $(MAKE), but the principle is there.  I also
symlink cover_db into someplace handy on the dev webserver, and get
the nice colourful output to show how kwalitee is increasing.

I'm not really sure how the podcover target should work, in the past
I've been using an actual test that runs Pod::Coverage over a few key
classes (or uses File::Find to discover them from lib/) and then
passed if the coverage is good enough.  For lazyness I set it at 80%.

But now, I'm just having a thought.  It could be useful to have
another class of test just beyond TODO, maybe a WOULDBENICE test, so
it WOULDBENICE if coverage was at 100%, but it not being isn't a
failure.  Maybe that's a bit warm and fuzzy.  Hey, I never said it was
a good thought.


-- 
Richard Clamp <[EMAIL PROTECTED]>

Reply via email to