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/tprove

At 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.