Saladino has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, Im working a lot with tests these days and i use Test::More module inside my tests and prove(which uses Test::Harness) to execute the tests.
The fact is that now I need an output in a custom xml detailing tests that failed or succeded and I was wondering what should be the easiest way.
I've been looking at Test::Harness module to see if I con modify it or use it in some way to do what i want, but i think it must be a more elegant way of doing this.
Any ideas?
Thanks

Replies are listed 'Best First'.
Re: Test::Harness output in xml
by Ovid (Cardinal) on Nov 20, 2007 at 14:29 UTC

    You might want to check out TAP-Convert-TET by Andy Armstrong. That converts TAP output to the TET format. See http://tetworks.opengroup.org/ for more information if you're curious about the format. Otherwise, the module should give you a fairly straightforward idea about converting TAP to other formats.

    Cheers,
    Ovid

    New address of my CGI Course.

Re: Test::Harness output in xml
by amarquis (Curate) on Nov 20, 2007 at 13:54 UTC

    I'm running on some hazy memory here, but I believe you can use TAP::Harness directly to give you the TAP::Parser::Aggregator object. You could then iterate through that, outputting the XML directly with one of the many XML solutions kicking around. That might be more work than you were looking for, but it's an option.