make test more verbose in Perl

When I run make test with the usual test harness that the CPAN modules have, it just displays a brief summary (if all goes well).

 t/000_basic.t .......................... ok t/001_db_handle.t ...................... ok t/002_dr_handle.t ...................... ok t/003_db_can_connect.t ................. ok ... snip ... All tests successful. Files=30, Tests=606, 2 wallclock secs Result: PASS 

If I run the tests individually, they output much more detailed information.

 1..7 ok 1 - use DBIx::ProcedureCall::PostgreSQL; ok 2 - simple call to current_time ok 3 - call to power() with positional parameters ok 4 - call to power() using the run() interface ok 5 - call to setseed with a named parameter ok 6 - call a table function ok 7 - call a table function and fetch 

How to run all tests in this multi-page mode? Is there anything I can pass to the make test ?

+7
source share
2 answers

ExtUtils :: MakeMaker docs explain this in the make test section:

 make test TEST_VERBOSE=1 

If the distribution uses Module :: Build , this is slightly different:

 ./Build test verbose=1 

You can also use the prove command that ships with Test-Harness :

 prove -bv 

(or prove --blib --verbose if you prefer long options.) This command is slightly different because it does not create a module first. The --blib parameter makes it look for the built-in but remote module created by make or ./Build , but if you forget to rebuild the module after changing something, it will run tests against the previously created copy. If you have not created the module yet, it will Test the installed version of the module.

prove also allows you to run only specific tests or tests:

 prove -bv t/failing.t 
+13
source

You can also use the prove command:

 prove --blib --verbose 

from the unpacked module directory. --blib contains the necessary directories for the built-in but not installed distribution of modules.

+7
source

All Articles