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.


In reply to Re: Unit Testing by Ovid
in thread Unit Testing by ait

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.