3 eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
4 if 0; # not running under some shell
10 my $app = App::Prove->new;
11 $app->process_args(@ARGV);
18 prove - Run tests through a TAP harness.
22 prove [options] [files or directories]
28 -v, --verbose Print all test lines.
29 -l, --lib Add 'lib' to the path for your tests (-Ilib).
30 -b, --blib Add 'blib/lib' to the path for your tests (-Iblib/lib).
31 -s, --shuffle Run the tests in random order.
32 -c, --color Colored test output (default).
33 --nocolor Do not color test output.
34 -f, --failures Only show failed tests.
35 --fork Fork to run harness in multiple processes
36 -m, --merge Merge test scripts' STDERR with their STDOUT.
37 -r, --recurse Recursively descend into directories.
38 --reverse Run the tests in reverse order.
39 -q, --quiet Suppress some test output while running tests.
40 -Q, --QUIET Only print summary results.
41 -p, --parse Show full list of TAP parse errors, if any.
42 --directives Only show results with TODO or SKIP directives.
43 --timer Print elapsed time after each test.
44 -T Enable tainting checks.
45 -t Enable tainting warnings.
46 -W Enable fatal warnings.
48 -h, --help Display this help
50 -H, --man Longer manpage for prove
52 Options that take arguments:
54 -I Library paths to include.
55 -P Load plugin (searches App::Prove::Plugin::*.)
57 -e, --exec Interpreter to run the tests ('' for compiled tests.)
58 --harness Define test harness to use. See TAP::Harness.
59 --formatter Result formatter to use. See TAP::Harness.
60 -a, --archive Store the resulting TAP in an archive file.
61 -j, --jobs N Run N test jobs in parallel (try 9.)
63 =head2 Reading from C<STDIN>
65 If you have a list of tests (or URLs, or anything else you want to test) in a
66 file, you can add them to your tests by using a '-':
68 prove - < my_list_of_things_to_test.txt
70 See the C<README> in the C<examples> directory of this distribution.
74 =head2 Default Test Directory
76 If no files or directories are supplied, C<prove> looks for all files
77 matching the pattern C<t/*.t>.
79 =head2 Colored Test Output
81 Colored test output is the default, but if output is not to a
82 terminal, color is disabled. You can override this by adding the
85 Color support requires L<Term::ANSIColor> on Unix-like platforms and
86 L<Win32::Console> windows. If the necessary module is not installed
87 colored output will not be available.
91 Normally you can just pass a list of Perl tests and the harness will know how
92 to execute them. However, if your tests are not written in Perl or if you
93 want all tests invoked exactly the same way, use the C<-e>, or C<--exec>
96 prove --exec '/usr/bin/ruby -w' t/
97 prove --exec '/usr/bin/perl -Tw -mstrict -Ilib' t/
98 prove --exec '/path/to/my/customer/exec'
102 If you need to make sure your diagnostics are displayed in the correct
103 order relative to test results you can use the C<--merge> option to
104 merge the test scripts' STDERR into their STDOUT.
106 This guarantees that STDOUT (where the test results appear) and STDOUT
107 (where the diagnostics appear) will stay in sync. The harness will
108 display any diagnostics your tests emit on STDERR.
110 Caveat: this is a bit of a kludge. In particular note that if anything
111 that appears on STDERR looks like a test result the test harness will
112 get confused. Use this option only if you understand the consequences
113 and can live with the risk.
117 Because of its design, C<TAP::Parser> collects more information than
118 C<Test::Harness>. However, the trade-off is sometimes slightly slower
119 performance than when using the C<prove> utility which is bundled with
120 L<Test::Harness>. For small tests suites, this is usually not a problem.
121 However, enabling the C<--quiet> or C<--QUIET> options can sometimes speed up
122 the test suite, sometimes running faster than C<prove>.
126 C<prove>, which comes with L<Test::Harness> and whose code I've nicked in a
127 few places (thanks Andy!).
131 This is alpha code. You've been warned.
135 # vim:ts=4:sw=4:et:sta