A
horribly named, automatic, specification-based testing tool for PerlWriting 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.
When working in Perl, I missed QuickCheck. In August 2004, I finally got
around to doing something about it. The result is LectroTest, a
horribly named, automatic, specification-based testing tool for Perl.