I gave this talk for the fabulous
Pittsburgh Perl Mongers on 2004-09-08. If you're interested, download a copy of
my slides from the talk. (They're in PDF format.) Read on for more information on the talk.
The background
Writing unit tests is an effective coding practice that
reduces development time while raising our confidence in the
software we create. But, if we're brutally honest, the work
is often tedious and time consuming, tempting us to skimp on
test cases. Is there anything we can do to reduce the pain
while keeping the gain?
Yes! With
QuickCheck for the
Haskell programming language,
Koen Claessen and John Hughes demonstrated that not only can
your computer run your test cases, but also it can
create
them for you!
The first time I used QuickCheck for my Haskell programs, I
was sold. It caught problems I never would have thought to
look for, let alone test for, and it did so elegantly. The
only problem? QuickCheck wasn't available to me when coding
in Perl.
Last week, I finally got around to doing something about it.
The result is
LectroTest, a horribly named, automatic,
specification-based testing tool for Perl.
The talk
In my talk I'll introduce LectroTest, discuss the problems
it solves, and demonstrate how to use it. LectroTest is a
work in progress, and so I'll ask for your feedback (bring
tomatoes to throw) and solicit your advice for ongoing
development. Finally, we'll get jacked up on espresso and
race pimped-out camels down Carson Street. (Don't forget
your betting money!)
Outline:
- Refreshing introduction
- Unit testing
- Less pain, please
- Using LectroTest
- LectroTesting – Let the machine do the work!
- How does LectroTest work?
- Case study: Email::Address
- End game: ToDos, Q's, feedback
- Bonus stuff