runtests - Run tests through a TAPx harness.
runtests [options] [files or directories]
Boolean options
-v, --verbose Print all test lines. -l, --lib Add 'lib' to the path for your tests (-Ilib). -b, --blib Add 'blib/lib' to the path for your tests (-Iblib/lib). -s, --shuffle Run the tests in random order. -c, --color Colored test output (default). See TAPx::Harness::Color. --nocolor Do not color test output. -f, --failures Only show failed tests. -r, --recurse Recursively descend into directories. -q, --quiet Suppress some test output while running tests. -Q, --QUIET Only print summary results. -p, --parse Show full list of TAP parse errors, if any. --directives Only show results with TODO or SKIP directives. -T Enable tainting checks. -t Enable tainting warnings. -W Enable fatal warnings. -w Enable warnings. -h, --help Display this help -?, Display this help -H, --man Longer manpage for prove
Options which take arguments
-I Library paths to include. -e, --exec Program to run the tests with. --harness Define test harness to use. See TAPx::Harness. --execrc Location of 'execrc' file (no short form).
STDIN
If you have a list of tests (or URLs, or anything else you want to test) in a file, you can add them to your tests by using a '-':
runtests - < my_list_of_things_to_test.txt
See the README
in the examples
directory of this distribution.
If no files or directories are supplied, runtests
looks for all files matching the pattern t/*.t
.
Specifying the --color
or -c
switch is the same as:
runtests --harness TAPx::Harness::Color
Colored test output is the default, but if output is not to a terminal, color is disabled. You can override this by adding the --color
switch.
--exec
Normally you can just pass a list of Perl tests and the harness will know how to execute them. However, if your tests are not written in Perl or if you want all tests invoked exactly the same way, use the -e
, or --exec
switch:
runtests --exec '/usr/bin/ruby -w' t/ runtests --exec '/usr/bin/perl -Tw -mstrict -Ilib' t/
--execrc
Location of 'execrc' file. See TAPx::Harness for more information.
Because of its design, TAPx::Parser
collects more information than Test::Harness
. However, the trade-off is sometimes slightly slower performance than when using the prove
utility which is bundled with Test::Harness. For small tests suites, this is usually not a problem. However, enabling the --quiet
or --QUIET
options can sometimes speed up the test suite, sometimes running faster than prove
.
prove
, which comes with Test::Harness and whose code I've nicked in a few places (thanks Andy!).
This is alpha code. You've been warned.