views:

241

answers:

4

I've created some business classes using OO Perl and I want to make sure I don't break them when I change the code. Sounds like unit testing is the way to go.

Is there anything like jUnit for Perl?

Feel free to elaborate on how you've implemented unit testing in Perl projects.

+4  A: 

There sure is : http://perlunit.sourceforge.net/

Jay
a quick Google search found this, I don't do any perl development.
Jay
perlunit was a comprehensive port of jUnit to Perl. In this context it may still be useful however I believe it is considered dead (http://use.perl.org/~Ovid/journal/37463) and the Perl community recommends using Test::Class etc (see Robert P's answer)
draegtun
+8  A: 

You may also be interested in the responses to this question: How can I do unit testing in Perl?

Adam Bellaire
D'oh! Thanks for not flaming me.
Pistol
+3  A: 

The ultimate list (for all languages) is at: http://www.xprogramming.com/software.htm (wow, they really need to update their stylesheet).

It appears that there are several for Perl.

TrueWill
+9  A: 

Test::Class

Test::Class is a xUnit/jUnit style framework for testing. Note that it only provides the framework, but it builds off of Test::Builder, the common perl testing backend. This means all of Perl's extensive other test frameworks (which lie in the Test::* namespace) are available to you as well. Test::Simple and Test::More can get you started, but there are many, many other testing libraries available for you based on your app.

Robert P