Next | Automated Testing | 26 |
Perl comes with some modules that provide convenient functions for testing
The testing framework is called Test::Harness
Here's one way to use it:
# runtests.pl use Test::Harness; @ARGV = glob("t/*.t") unless @ARGV; runtests(@ARGV);
It probably has some other features, but I don't know about them
This runs the tests, collates the output, and generates a nice report
t/fail........FAILED tests 3, 9 Failed 2/18 tests, 88.89% okay t/pass........ok t/skip........ok 4/13 skipped: because you said to t/skip_all....skipped all skipped: no reason given Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/fail.t 18 2 11.11% 3 9 1 test and 4 subtests skipped. Failed 1/4 test scripts, 75.00% okay. 2/44 subtests failed, 95.45% okay.
Next | Copyright © 2004 Mark Dominus |