Do you know where your variables are? | |
PerlMonks |
detailed html summary of failed testsby blahblahblah (Priest) |
on Feb 27, 2007 at 05:24 UTC ( [id://602256]=perlquestion: print w/replies, xml ) | Need Help?? |
blahblahblah has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
We finally got around to migrating from our old dinosaur of a source code control system to subversion. I had a wrapper around the old system's "commit" command, which performed several tests on the to-be-committed changes. Rather than hack up my old, ugly, inconsistent wrapper to work with subversion, I'm rewriting it to be much cleaner and easier to expand and maintain. I'm also trying for the first time to learn about the standard Test modules. I've read through much of chromatic's Perl Testing: A Developer's Notebook book, and have written a couple of working test scripts using Test::More. I'm pleasantly surprised by how easy it is so far, but I'm stuck on one point. My old script was a command-line-only interface, and it would do each set of checks and then print instant, detailed feedback. It would show you the offending lines, explain what was wrong, and then either exit (for serious problems) or prompt you to continue (for minor warnings). I could tailor the output for each check to be as eye-catching and/or verbose as it needed to be. However, so far my experience with Test modules from CPAN is that it's hard to make the output very readable. While writing my tests, I've used the diag() sub to print some details, but it's hard to differentiate it from the other output of the tests. Ideally I'd like to have these tests run either as a nightly job or as a post-commit hook in subversion, and I'd like the result to be a nice-looking html report containing the usual count of failed tests and also a detailed block of text for each failed test. I think that a "Harness" is what I want, but I haven't found anything like this. Is this a reasonable thing to want to do? Is there a standard way in the test-anywhere-protocol to pass along a possibly-big block of formatted text detailing the failed tests? Sorry that this is such a long post and the only question is in the previous sentence, but I have a feeling that I might be on the wrong track and I thought the background context might help. Please feel free to tell me that this is an X/Y problem -- I'm open to any suggestions.
Thanks,
Back to
Seekers of Perl Wisdom
|
|