Posts Tagged ‘Perl TDD’

Test-Driven Development in Perl: How To Set Up Your Testing Environment For Perl TDD

The Genealogy Webmaster’s Journal is a series of articles advancing the technological State of the Art underlying our online genealogy.

Test-Driven Development has several flavors when practiced in Perl. I was looking for a way to transfer my experience with jUnit, PHPUnit, and CppUTest to my Perl development. I have created a set-up that works for me, and I thought I’d share that with you!

This essay does not contain a lot of explanation. I’m assuming you can follow the links and read the tutorials. If you’re like me, the missing piece is the working setup – how the files are organized for my test environment.

How to Use Test::Class for Perl Unit Testing and Perl TDD

So far, the Perl CPAN module Test::Class seems to fill the bill. Start by reading the documentation:

  • Test::Class Read this page from top to bottom. Take particular note of the section, “Help for confused jUnit users.” See the “Community” section for links on where to discuss and get help.
  • Test::More Test::Class sits on top of Test::More, so be sure to read this documentation and tutorial if you’re not already familiar with how this style of Perl testing works. Note the links to “Related Modules” at the upper right of this page.
  • Test::Tutorial A more complete tutorial for Test::Simple and Test::More.
  • Prove We will use the Perl Application, prove, to run our tests.

Perl Testing Bookmarks Including Perl CGI Testing

I also found the following articles useful: Read more…

Be the first to comment - What do you think?  Posted by admin - September 3, 2012 at 6:26 pm

Categories: Perl Webmastery   Tags: , , , , , ,