Multiple TAP::Formatters
Graham TerMarsch
cpan at howlingfrog.com
Sat Mar 27 04:16:59 GMT 2010
On March 25, 2010, David E. Wheeler wrote:
> On Mar 24, 2010, at 5:06 PM, Steve Purkis wrote:
> > For those interested, see the TODO file:
> > http://github.com/AndyA/Test-Harness/blob/master/TODO
>
> Well this got my attention:
>
> * formatters => {
> Console => { colour => '/path/to/custom/perl', verbosity => 0 },
> File => { outfile => '/foo.tap' },
> HTML => { outfile => '/foo.html', js_uris => [ ... ] },
> SQL => { dsn => 'dbi:sqlite:/bar.db' },
> }
*Love* the idea of being able to specify multiple formatters.
With TAP::Formatter::JUnit, one of the struggles that I have using it is that
I've got times where I still want the "console output" so I can see what tests
are being run, but then also want file dumps in JUnit as well as TAP.
I've been pondering hackery to try to fake my way around it so that I've got
separate formatters for "just dump JUnit to disk" and for "create a single
JUnit output document with results from all of the tests".
If we could support multiple formatters, though, that'd save me from much of
the hackery involved; I wouldn't have to have a single T:F:JUnit formatter
that knew how to do _all_ of the different possible variants, but could
instead have individual ones for each of the bits which could then be cobbled
together to provide the desired behaviour.
> I don't have much opinion on implementation or anything, though. I bitched
> at you about source handlers because I had a source I wanted handled, and
> as simple to add as possible. I haven't tried to get other formats out of
> TAP::Parser, though. Yet.
I'm about the same; not sure I have a strong opinion on implementation yet,
but I'd be happy to bounce ideas around further to try to come up with a plan.
:)
--
Graham TerMarsch
Howling Frog Internet Development, Inc.
More information about the tapx-dev
mailing list