in reply to Generate HTML reports from unit test results

If you have to use the output of Test::Unit::Runner::XML then applying some XSLT would seem the simplest solution.

If you don't then using the Test::Unit::HarnessUnit test running which outputs TAP. You can then feed this into Test::TAP::HTMLMatrix to get pretty HTML results.

  • Comment on Re: Generate HTML reports from unit test results

Replies are listed 'Best First'.
Re^2: Generate HTML reports from unit test results
by Anonymous Monk on May 09, 2006 at 08:04 UTC
    Thanks for supporting the opposition, Adrian. 8-)

    T:U:Runner::XML was discussed, Andrew said it "reports in the format used by JUnit, to allow Test::Unit to work with continuous integration systems such as CruiseControl and damagecontrol".

    I guessed that XSL exists already but I haven't investigated that far. Sorry, named the wrong project in my earlier mail (which the SF archive hasn't picked up yet).

    -- mca1001 of users dot sf ...

      Thanks for supporting the opposition, Adrian. 8-)

      You're welcome! However, I don't see Test::Unit as competition - and I don't mean that in a nasty way :-)

      The Test::Unit philosophy is just different from Test::Class's. Not worse. For those with any experience of JUnit it's easier to adopt than having to understand Perl's TAP / Test::Harness / Test::Builder / Test::Class approach to xUnit style testing.

      In some ways its better - for example it's far easier to make a new test runner with Test::Unit than it is to build something with Test::Harness::Straps. In some ways its worse - for example not being able to take advantage of the many Test::Builder based modules on CPAN. Pick whichever makes your life easier I say!

      (Although I think it interesting that the latest JUnit and TestNG are, in some ways, closer to Test::Harness/Test::Class than Perl's Test::Unit with the use of attributes, adopting multiple setup/teardown methods, etc. I'd be interested to see whether Test::Unit starts adopting some of the features seen in the latest JUnit.)

      T:U:Runner::XML was discussed, Andrew said it "reports in the format used by JUnit, to allow Test::Unit to work with continuous integration systems such as CruiseControl and damagecontrol".

      It's the same output as Ant's JUnit task - poking around http://ant.apache.org might turn up something useful.