Skip to Content
Perl Debugged
book

Perl Debugged

by Peter Scott, Ed Wright
March 2001
Intermediate to advanced
288 pages
4h 56m
English
Addison-Wesley Professional
Content preview from Perl Debugged

6.3. System or Regression Testing

Perl comes with code for testing perl itself, and you can use these same tools for your regression tests. They are deceptively simple. The Test::Harness module maintained by Andreas König exports a routine runtests that takes as arguments the names of programs to run. It looks for a header line of the form “1..max” and output lines that say either “ok n ” or “not ok n ”, where n is between 1 and max; all other output is ignored and discarded. When it's done with all the tests, it prints a summary containing either the magic word “successful” or the dreaded word “FAILED.”

But wait, there's more. The Test module[2] by Joshua Nathaniel Pritikin makes it easy for your programs to output the “ok/not ok” lines. It ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe
Pro Perl

Pro Perl

Peter Wainwright
Intermediate Perl

Intermediate Perl

Randal L. Schwartz, brian d foy, Tom Phoenix
Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic

Publisher Resources

ISBN: 0201700549Purchase book