[Perlunit-users] Fw: Re: Generate HTML reports from unit test results
Status: Beta
Brought to you by:
mca1001
From: Matthew A. <mc...@us...> - 2006-05-08 17:35:33
|
Somebody asked off-list about generating HTML reports from unit test results, possibly using Test::Unit::Runner::XML. Here's the main part of my reply, in case it's of use to anyone else. [...] The two routes that spring to mind are - write XSL to transform the XML output to HTML - use the T:U:Runner::XML module as a template to generate HTML instead I suspect XSL would be easier if you were familiar with both XSL and Perl, and anyway it's a handy tool to know. From Perl, you can run xsltproc as a subprocess or go via XML::XSLT. Another route would be to get the web browser to do the XSLT for you - that would be the neatest solution. http://www.google.co.uk/search?q=client-side+xslt looks promising but the w3schools link advocates use of ActiveX. I would try http://www.digital-web.com/articles/client_side_xslt/ . This route probably needs less maintenance and also you may find parts of the Ant(?) project already have something because some of the Java folks are keen on XSL too. Then again if you just want to hack something together and make it work it may be easier to start with Andrew's perl module. [...] I guess either solution is about the hundred lines of code mark... [...] Matthew #8-) |