Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Test suggestor?

by tphyahoo (Vicar)
on Jul 11, 2005 at 12:51 UTC ( [id://473913]=note: print w/replies, xml ) Need Help??


in reply to Re: Test suggestor?
in thread Test suggestor?

Thanks, yes, it seems this is definitely in the direction of what I want.

Is there a Devel::Cover "for dummies" tutorial anywhere? The documentation included in the packaging is okay, but it doesn't actually break down step by step what you have to do.

So far the best string I have found on this is Devel::Cover not finding a test?, which gives a simple dummy test, and the command for how to run it: perl -MDevel::Cover 1.t. I will be mucking around with this until I find something better.


Devel::Cover on Windows? and Lessons learned from getting to 100% with Devel::Cover seem useful as well.

Finally: This is all a general answer for coverage. however, my question was specifically, is there a way to cover only methods? Since this is how most users will be using object code, it stil seems to me that this is an appropriate testing strategy, especially when, as is often the case, you are operating under time constraints.

Replies are listed 'Best First'.
Re^3: Test suggestor?
by mpeters (Chaplain) on Jul 11, 2005 at 13:39 UTC
    If you use Module::Build then you can have a test harness with coverage testing simpley by running:
    perl Build.PL ./Build testcover
    Even if you aren't planning on releasing it on CPAN or if it's more than single module, I'd still take a look at creating a Build.PL with Module::Build cause it couldn't get any simpler.

    -- More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier
      Very nice. OK, I'm taking this route, since it also gets me using Module::Build, which is probably going to save me more time down the road, and that's what it's about. Thanks everyone!
Re^3: Test suggestor?
by herveus (Prior) on Jul 11, 2005 at 13:17 UTC
    Howdy!

    That's not so easy. What makes a subroutine a "method"? It's not so difficult to simply identify all subroutines in a name space. Discerning which ones are methods is much harder, since there is no metadata available to help you discern the difference.

    yours,
    Michael

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-18 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found