Presentation on testing to Madison.pm

ChrisDolan on 2008-04-17T04:52:17

I made a presentation to Madison.pm on software testing in general and Perl testing in particular. It was intended to be introductory since many Madmongers are casual Perl users and most do not have the testing religion. After discussing reasons for and types of testing, I delved into Test::More, Devel::Cover and Test::Class with some simple examples. Throughout the talk, I emphasized that the primary reason for testing was to gain confidence in a body of code.

Slides: http://chrisdolan.net/madmongers/testing.html (the S5-based slides are optimized for Safari in 1024x768, but should be readable elsewhere)

Interesting reactions:

  • People were appalled that Test::Class invokes methods in alphabetic order instead of lexical order
  • Nobody but me was using Devel::Cover :-(
  • Test::Exception was criticized for poor interaction with Class::Exception (IIRC...)
  • My casual mention of Test::WWW::Mechanize generated a lot of interest. Some had used WWW::Mech already


Test::Class

Ovid on 2008-04-17T12:32:45

Actually, I'm not sure that alphabetical or lexical order is appropriate. The former is clearly suboptimal and frustrating, but the latter rather violates the intent of OO because order shouldn't matter. Still, having things run in a predictable 'top down' manner is useful. Personally, I'd like to see a 'random order' option.

(I really need to put together a "Test::Class In Depth" talk someday.)