Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Unit testing -- module, book, and website suggestions wanted

by Sifmole (Chaplain)
on Apr 28, 2006 at 01:56 UTC ( #546160=perlquestion: print w/ replies, xml ) Need Help??
Sifmole has asked for the wisdom of the Perl Monks concerning the following question:

I am going to be spearheading an intiative to introduce unit testing within my company ( the code being in Perl ). The team is intermediate in Perl use; I personally have been using Perl quite a bit for several years.

I am looking for suggestions of modules to build a framework with, tutorials or websites with good information, and if there are any books you all would suggest on the subject.

Comment on Unit testing -- module, book, and website suggestions wanted
Re: Unit testing -- module, book, and website suggestions wanted
by bobf (Monsignor) on Apr 28, 2006 at 02:07 UTC
Re: Unit testing -- module, book, and website suggestions wanted
by gryphon (Abbot) on Apr 28, 2006 at 02:11 UTC

    Greetings Sifmole,

    I highly recommend the Perl Testing: A Developer's Notebook book. It's a gold-mine for testing.

    One of the things the book recommends using is Devel::Cover for code coverage metrics. It's a great solution. You can't use its reports as a boolean "are we done with writing unit tests" check, but it can give you a great global idea of where your application is weak on unit tests.

    gryphon
    Whitepages.com Development Manager (WDDC)
    code('Perl') || die;

Re: Unit testing -- module, book, and website suggestions wanted
by rhesa (Vicar) on Apr 28, 2006 at 02:30 UTC
    In addition to the excellent tips above, I also find chromatic's journal of his Refactoring Everything project a pleasure to read. The main points I take home from it are 1) security and 2) fun. Having a source control system and a good set of tests makes coding much more relaxed, because you can always revert your changes (because of svn), and you'll know when you break something (and where) because your tests will tell you. That means you can stop worrying, and focus on writing good, workable code that you can be proud of as well. I find it exciting to see a master at work, so to speak :)
Re: Unit testing -- module, book, and website suggestions wanted
by hesco (Deacon) on Apr 28, 2006 at 04:57 UTC
    I am only a month or two ahead of you on this unit testing path. To the resources already listed in this thread, I would add the following:

    and then grab a root shell; invoke cpan and use `i /Test::/` to see what is in the repository that could prove useful. There are lots of tools and resources on the net other than the ones listed here. But this covers most of the perl specific ones. But you might also want to spend some time with Google looking for Test Driven Development, Agile Development, Extreme Programming.

    Trust that is helpful.

    -- Hugh

Re: Unit testing -- module, book, and website suggestions wanted
by adrianh (Chancellor) on Apr 28, 2006 at 10:14 UTC
    I am looking for suggestions of modules to build a framework with, tutorials or websites with good information, and if there are any books you all would suggest on the subject.

    In addition to those books already mentioned there are good chapters on testing in Perl Medic and Advanced Perl Programming, Second Edition.

    Online there are a bunch of useful links at http://del.icio.us/tag/perl+testing.

    In the non-perl specific world I'd also take a look at:

    http://www.testdriven.com - General blog/portal/aggregator site on testing. Mostly TDD. Some Perl occasionally.

    http://www.testingeducation.org/BBST/ - Really excellent online materials on testing - but has a far bigger scope than just developer written automated unit tests. For those considering testing as a career option.

    Lessons Learned in Software Testing: A Context Driven Approach, Cem Kaner, James Bach, Brett Pettichord - Very readable book on software testing in general. A collection of hundreds of good practices and tips.

    Test Driven Development, Kent Beck - Everybody should read it. It's thin too :-)

    Test Driven Development: A Practical Guide, Dave Astels - Nice intro to TDD. Covers various xUnit frameworks in several languages (not Perl unfortunately)

    Pragmatic Unit Testing In Java with JUnit, Andy Hunt, Dave Thomas - Mostly JUnit, but well written. As long as you can read Java you should be able to take useful stuff away from it.

Re: Unit testing -- module, book, and website suggestions wanted
by eyepopslikeamosquito (Canon) on Apr 30, 2006 at 04:12 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2014-07-28 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (201 votes), past polls