PerlUnit - an xUnit TestingFramework for PerlLanguage ---- PerlUnit is now a project on sourceforge. You can find us here: http://sourceforge.net/projects/perlunit 'Us', for the moment, means: * AdamSpiers, current maintainer * PiersCawley, previous maintainer and some other folks, who aren't so active on the project any more. (Adam is however looking for someone to replace him as his current job doesn't leave time for maintaining this project properly) * CayteLindner, author of the 'bioperl' unit test framework, which you can find here: ftp://bio.perl.org/pub/katel/UnitTests/ * ChristianLemburg, original author of Test::Unit (you can get this on CPAN) http://www.cpan.org/modules/by-module/Test/Test-Unit-0.11.readme * JeFritz, author of XUnit, which you can find here: http://views.vcu.edu/xunit/ * BrianEwins - err that's me folks. No, I didn't write YetAnotherTestFramework, though I have contributed a skeleton conversion of JavaUnit. Our aims can be summed up in this comment by ChristianLemburg: For a start, I suggest that our joined effort to provide a ''real'' Whatever-it-is-called-Unit should meet the following requirements: * Resemble the interface and behavior of JUnit (to me, this looks like the most accessible and widespread of the "authoritative" implementations of the TestingFramework). ''Note - this is still a bit controversial'' * Provide an interface as convenient (read "lazy") for users as possible. * Support integration with Test::Harness stuff (seems to be the most requested feature). * Support subclassing-style use and non-subclassing-style use. * Be as platform independent as possible. * Follow standard CPAN module conventions for installation etc. * Be able to be "distributed under the same terms as Perl itself," i.e. redistribution under either the Artistic License or the GNU Public License should be allowed. These aims have pretty much all been achieved now, and the TODO list has moved on to greener pastures. Most of the comments that were here have been moved to 'ExtendingPerlUnit' for posterity, if you want to contribute comments, etc., please do so on one of our new sourceforge mailing lists, perlunit-users or perlunit-devel: http://sourceforge.net/mail/?group_id=2653 For older discussion, see our open discussion forum, here: http://sourceforge.net/forum/forum.php?forum_id=7840&et=0 Documentation is available as pod embedded within the modules, accessible via perldoc in the usual way. Unfortunately for those of us who are new to test-first development, the perldoc documents seem to assume one is already an expert in XUnit type testing. For example there are terms that go undefined (# your state for fixture here... (what is a "fixture"?)). Also, the perldoc for Test::Unit::TestSuite does not show how to build a suite of tests from Test::Unit::TestCase. I would have thought that one would write unit tests with TestCase, then run them with a TestSuite. We need a complete example of how the different classes work together, with all the ...'s filled in and the new terms defined. In this example from perldoc Test::Unit::TestSuite: $suite->add_test(MySuite1->new()); why is it calling MySuite1->new() and not MyTestCase1->new()? It would be great to see more information on this, so we could have something to bridge the gap between DirtSimplePerlUnitExample and the real-world correct usage that at this moment can only be psychically intuited by us beginners. ---- Those looking for a Perl xUnit framework might also want to look at PerlTestClass. ---- Test::Unit is old and crappy. The Test::Unit::Lite is 100% compatible with Test::Unit and fixes some Test::Unit's bugs. Also try Test::Assert and Test::Mock::Class as complement for Test::Unit::Lite. ---- CategoryPerl CategoryTesting