in reply to RFC: Perl Testing -- How to Introduce to a team

Congratulations. Writing tests for my modules is one of my favorite parts of development, as I recently commented.

Between the books you listed and the perlmonks nodes you have likely read there isn't much that I would add to this node about testing, so I'll focus on topics that reduce the number of failing tests.

When writing code you will frequently solve the same problem multiple times. This can be reduced by reusing modules from CPAN, and by learning to recognize those patterns and creating resuable components for that design pattern.

Investing some time in improving your programming practices would be good too. The following should be required reading for professional perl programmers:

When preparing your own tests it would be a good idea to look at what other people have tested in their projects. Choose a couple CPAN modules that you use regularly and look over the test scripts that they use. To do this download the .tgz distribution, untar it, and look in the t directory.

  • Comment on Re: RFC: Perl Testing -- How to Introduce to a team

Replies are listed 'Best First'.
Re^2: RFC: Perl Testing -- How to Introduce to a team
by NovMonk (Chaplain) on Oct 19, 2006 at 13:48 UTC
    Thanks for these great ideas. Seeing other tests on similar or familiar code Would be very helpful. I'll try that.

    And your node was one I read and printed off. I'll have to take a look at these other books, too, and that website. Problem with any books, of course, is that we're starting to code Now, and none of us has time to digest what we really need to to be prepared. But that's pretty much the way of things-- we're never prepared for all we have to do to get through life. Ah well.

    Thanks for the suggestions.
    NovMonk