Following on from chromatic's journal entry about quieter tests I thought I'd make a full journal post about Test::Verbose.
If you test, you need Test::Verbose.
The simple "tv" command line it installs will run all your tests, some of your tests, or an individual test. Unlike "prove" it is an interface to "make test" rather than a separate script for running tests, so if you make changes you don't need a separate "make" phase to get things into blib.
More importantly though is you can run tv with the -q option to make it only display errors, -qq to make it only display the final results table, or -qqq to make it display nothing at all (but exit with a relevant return code). This last option makes it perfect from cron job smoke tests.
Try it out today. You won't go back.
make test (Score:1)
I don't have that for my applications. A typical directory structure looks like this:
The .t files contain a 'use lib "lib", "../lib";' to point to the module directory.
Like chromatic I usually just type perl t/FILENAME to run a certain test file, but I
Re:make test (Score:2)
ExtUtils::MakeMaker will find all your
Use prove (Score:2)
--
xoa
Re:Use prove (Score:2)
Re:Use prove (Score:1)
Re:Use prove (Score:2)
Re:Use prove (Score:2)
And, if it doesn't do what you want, ask. :-)
--
xoa
Re:Use prove (Score:2)
What if my files aren't just in lib/, but are in completely separately named directories, each with their own Makefile.PL - MakeMaker picks this up and gets everything into blib, but prove won't see them.
See XML::Parser for an example of this.
Re:Use prove (Score:2)
The #1 reason to have prove is so that you don't have to have a Makefile or run make test at all. So in this case, it would defeat the purpose of running prove.
Is there anything we can/should add to Test::Harness to make it more useful to you?
--
xoa
Re:Use prove (Score:1)
A way to print only summaries and failures with diagnostics would be nice.
Re:Use prove (Score:1)