1PROVE(1)               Perl Programmers Reference Guide               PROVE(1)
2
3
4

NAME

6       prove -- A command-line tool for running tests against Test::Harness
7

SYNOPSIS

9       prove [options] [files/directories]
10
11       Options:
12
13           -b, --blib      Adds blib/lib to the path for your tests, a la "use blib".
14           -d, --debug     Includes extra debugging information.
15           -D, --dry       Dry run: Show the tests to run, but don't run them.
16               --ext=x     Extensions (defaults to .t)
17           -h, --help      Display this help
18           -H, --man       Longer manpage for prove
19           -I              Add libraries to @INC, as Perl's -I
20           -l, --lib       Add lib to the path for your tests.
21           -r, --recurse   Recursively descend into directories.
22           -s, --shuffle   Run the tests in a random order.
23           -T              Enable tainting checks
24           -t              Enable tainting warnings
25               --timer     Print elapsed time after each test file
26           -v, --verbose   Display standard output of test scripts while running them.
27           -V, --version   Display version info
28
29       Single-character options may be stacked.  Default options may be set by
30       specifying the PROVE_SWITCHES environment variable.
31

OVERVIEW

33       prove is a command-line interface to the test-running functionality of
34       "Test::Harness".  With no arguments, it will run all tests in the cur‐
35       rent directory.
36
37       Shell metacharacters may be used with command lines options and will be
38       exanded via "glob".
39

PROVE VS. "MAKE TEST"

41       prove has a number of advantages over "make test" when doing develop‐
42       ment.
43
44       * prove is designed as a development tool
45           Perl users typically run the test harness through a makefile via
46           "make test".  That's fine for module distributions, but it's subop‐
47           timal for a test/code/debug development cycle.
48
49       * prove is granular
50           prove lets your run against only the files you want to check.  Run‐
51           ning "prove t/live/ t/master.t" checks every *.t in t/live, plus
52           t/master.t.
53
54       * prove has an easy verbose mode
55           prove has a "-v" option to see the raw output from the tests.  To
56           do this with "make test", you must set "HARNESS_VERBOSE=1" in the
57           environment.
58
59       * prove can run under taint mode
60           prove's "-T" runs your tests under "perl -T", and "-t" runs them
61           under "perl -t".
62
63       * prove can shuffle tests
64           You can use prove's "--shuffle" option to try to excite problems
65           that don't show up when tests are run in the same order every time.
66
67       * prove doesn't rely on a make tool
68           Not everyone wants to write a makefile, or use ExtUtils::MakeMaker
69           to do so.  prove has no external dependencies.
70
71       * Not everything is a module
72           More and more users are using Perl's testing tools outside the con‐
73           text of a module distribution, and may not even use a makefile at
74           all.
75

COMMAND LINE OPTIONS

77       -b, --blib
78
79       Adds blib/lib to the path for your tests, a la "use blib".
80
81       -d, --debug
82
83       Include debug information about how prove is being run.  This option
84       doesn't show the output from the test scripts.  That's handled by
85       -v,--verbose.
86
87       -D, --dry
88
89       Dry run: Show the tests to run, but don't run them.
90
91       --ext=extension
92
93       Specify extensions of the test files to run.  By default, these are .t,
94       but you may have other non-.t test files, most likely .sh shell
95       scripts.  The --ext is repeatable.
96
97       -I
98
99       Add libraries to @INC, as Perl's -I.
100
101       -l, --lib
102
103       Add "lib" to @INC.  Equivalent to "-Ilib".
104
105       -r, --recurse
106
107       Descends into subdirectories of any directories specified, looking for
108       tests.
109
110       -s, --shuffle
111
112       Sometimes tests are accidentally dependent on tests that have been run
113       before.  This switch will shuffle the tests to be run prior to running
114       them, thus ensuring that hidden dependencies in the test order are
115       likely to be revealed.  The author hopes the run the algorithm on the
116       preceding sentence to see if he can produce something slightly less
117       awkward.
118
119       -t
120
121       Runs test programs under perl's -t taint warning mode.
122
123       -T
124
125       Runs test programs under perl's -T taint mode.
126
127       --timer
128
129       Print elapsed time after each test file
130
131       -v, --verbose
132
133       Display standard output of test scripts while running them.  Also sets
134       TEST_VERBOSE in case your tests rely on them.
135
136       -V, --version
137
138       Display version info.
139

BUGS

141       Please use the CPAN bug ticketing system at <http://rt.cpan.org/>.  You
142       can also mail bugs, fixes and enhancements to "<bug-test-har‐
143       ness@rt.cpan.org>".
144

TODO

146       ·   Shuffled tests must be recreatable
147

AUTHORS

149       Andy Lester "<andy@petdance.com>"
150
152       Copyright 2005 by Andy Lester "<andy@petdance.com>".
153
154       This program is free software; you can redistribute it and/or modify it
155       under the same terms as Perl itself.
156
157       See <http://www.perl.com/perl/misc/Artistic.html>.
158
159
160
161perl v5.8.8                       2008-05-05                          PROVE(1)
Impressum