NAME
Test::TestHarness - Run (test) tests from within tests to test if they suceed or fail
SYNOPSIS
use Test::More tests => 1;
use Test::TestHarness;
my $res = runtest("my_tests", "pass"); # if this file is t/test.t, then it will run t/my_tests/pass.t
is($pass->status, "PASS");
DESCRIPTION
This module was written to be an easy way to figure out if a test
passes or fails. It's for when Test::Builder::Tester isn't flexible
enough.
FUNCTIONS
runtests
Shorthand for "new" which "catfile"s together the parameters, adds
".t" to the end, and assumes that the path is starting from the
"dirname" of the caller.
new
Takes one argument, the full path to the test file. This will
actually run the tests and set up the Test::TestHarness object
for testing against.
status
Get the status. Should either be PASS, FAIL, or NOTESTS.
time
Get the number of seconds it took to execute the tests.