Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Unit Testing

by Ovid (Cardinal)
on Aug 02, 2008 at 14:42 UTC ( #701820=note: print w/ replies, xml ) Need Help??


in reply to Unit Testing

First, a bit of background so you know where I'm coming from: I'm the original author of the new Test::Harness module, I'm heavily involved in the Perl-QA community, I teach people testing, I have several testing modules on the CPAN and have written and published the results of Test Survey Results. In short, I know this area very, very well, so I hope you'll understand that I don't say "don't use PerlUnit" out of complete ignorance.

PerlUnit was an interesting project, but it's a dead one. Also, it does not integrate with the standard Perl testing tools. As a result, the wealth of powerful testing modules in Perl are pretty much not an option for you. Out of over 15,000 distributions on the CPAN, it appears that only 14 of them use PerlUnit (its front-end is named Test-Unit) and half of those are for one author on one set of related modules.

As for what people are actually using, I ran an analysis of the testing software used in CPAN modules and the top ten (out of 287) testing modules identified were:

Module Number of test programs Test::More 44461 Test 8937 Test::Exception 1379 Test::Simple 731 Test::Base 316 Test::Builder::Tester 193 Test::NoWarnings 174 Test::Differences 146 Test::MockObject 139 Test::Deep 127

Aside from Test, a legacy module used by older code, the standard Test::Harness based testing modules (Test::More, Test::Exception, Test::Differences, etc.) will be far more useful for you and new testing tools are coming out all of the time for it.

Of course, if the customer is requesting PerlUnit because they rely heavily on it, you may be stuck, but try to avoid it. If it's being considered because of its xUnit philosophy, I recommend you check out Test::Class. It's a great module and I use it all the time.

Cheers,
Ovid

New address of my CGI Course.


Comment on Re: Unit Testing
Download Code
Re^2: Unit Testing
by ait (Friar) on Aug 03, 2008 at 17:26 UTC
    Wow. Thank you, very, very much Ovid!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-09-18 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (116 votes), past polls