If you follow Perl's QA list, you know that Schwern and co. have this crazy idea to create a TAP::Harness. This is great as the venerable Test-Harness is showing its age. Part of this process is to write a new parser for TAP and that's where I could use your help.
I've finally gotten TAPx::Parser solid enough to upload it to the CPAN. At this point, the parser seems fairly robust, but I could use help with this being run against numerous test suites. Note that TAPx::Parser is not an official parser which the Perl QA folks have endorsed. I'm hoping to get it robust enough that they consider this option (in large part because there is actually very little work on the "official" TAP parser).
In the distribution, you'll find a program called tprove in the examples/ directory. That's a simplistic test harness which will run your test files and spit out results. If you read the code of tprove and the docs for TAPx::Parser, it should be fairly clear how to play with this to get yourself colored test output, hook it into a GUI, set off audible alarms if tests fail or whatever you want.
The primary limitation of tprove at this point is that it must be run in the same directory which contains your lib/ directory for the modules you wish to test and you must hard-code the path to TAPx-Parser unless you choose to install it.
One way to check it out is to simply download the tarball, unpack it, cd into TAPx-Parser-0.11/ and run this command:
TAPx-Parser-0.11 $ perl -Ilib examples/tproveAt the end of the test run, you should see something like this:
ok 64 - ... and junk should parse correctly ok 65 - ... and the second test should parse correctly ok 66 - ... and comments should parse correctly ok 67 - ... and the third test should parse correctly ok 68 - ... and the fourth test should parse correctly ok 69 - ... and fifth test should parse correctly ok 70 - ... and we should have no parse errors ok Testing t/pod-coverage.t t/pod-coverage.t...... 1..0 # Skip Test::Pod::Coverage 1.04 required for testing POD coverage ok Testing t/pod.t t/pod.t...... 1..0 # Skip Test::Pod 1.14 required for testing POD ok Tests run: 254 Passed: 254 Failed: 0 Errors: 0
Errors refers to parse errors and if there are any, a summary will be displayed. Reproducible parse errors are the things I am particularly anxious to see.
Note: As of this writing, the docs are up on the CPAN site but you can't actually seem to download the package. That should be cleared up soon. In the meantime, you can download TAPx::Parser from my Web site.
Cheers,
Ovid
New address of my CGI Course.
In reply to I need your help with parsing TAP output by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |