Subject: Re: [xsl] junit test... for xslt2? From: Philip Fearon <pgfearo@xxxxxxxxxxxxxx> Date: Sat, 6 Mar 2010 13:31:03 +0000 |
On Sat, Mar 6, 2010 at 12:07 PM, Dave Pawson <davep@xxxxxxxxxxxxx> wrote: > > The next problem to address is generating test results from > each test, producing a cumulative test result and count... > not something that XSLT is very good at with its lack of > side effects! > Lack of XSLT side effects is only an issue if you want to do the reporting in a single XSLT step. The XSLT <xsl:message> provides a useful method for outputing test results, especially when all xsl:message output from the test case set is aggregated into a single XML file, as in CoherentWeb. A further XSLT transform could then be used on this aggregated XML report to generate a more friendly rendering, this could possibly be an HTML file or even an Excel/Calc spreadsheet (using built-in EXPath). My preference though is to use a combination of stored and ad-hoc XPath expressions interactively against the raw XML report, providing a much more interactive analysis experience. Is anyone interested in agreeing on a convention for summarising XSLT output in an XML structured report? This report would include xsl:message output, references to all xsl:result-document output, and details of all XSLT error messages for each test document. Reports should also be suitable for comparison with other reports and be extensible to include details such as zip-file origin and destination, when zip compressed XML is processed. I've appended an abbreviated sample output report from CoherentWeb. Regards Phil Fearon http://qutoric.com <?xml version="1.0" encoding="utf-8" ?> <cwb:report batch="2" xmlns:cwb="http://www.qutoric.com/2010/XSLTreport" > <cwb:summary> <cwb:input-folder>C:\Users\philip\Documents\testdata\minimised-qutoricsite-pure\</cwb:input-folder> <cwb:output-folder>C:\test\dummy\</cwb:output-folder> <cwb:xslt> <cwb:processor>SAXON 9.2.0.5 from Saxonica</cwb:processor> <cwb:stylesheet name="coherent -xslmessage -continue.xslt" > <cwb:path>C:\Users\philip\Documents\testdata\xslt</cwb:path> <cwb:last-modified>2010-01-31T13:53:27.7782886+00:00</cwb:last-modified> </cwb:stylesheet> </cwb:xslt> <cwb:requests total="13" passes="9" fails="4" > <cwb:request units="ms" elasped-time="14" >2010-03-06T12:56:07.4294843+00:00</cwb:request> <cwb:response units="ms" elapsed-time="225" >2010-03-06T12:56:07.6478847+00:00</cwb:response> <cwb:response-rate units="tps" >57.78</cwb:response-rate> </cwb:requests> </cwb:summary> <cwb:passes> <cwb:doc name="index-manyentities.html" item="2" > <cwb:input>index-manyentities.html</cwb:input> <cwb:output>2.1-index-manyentities.html</cwb:output> </cwb:doc> <cwb:doc name="mixed-test.html" item="4" > <cwb:input>mixed-test.html</cwb:input> <cwb:output>2.3-mixed-test.html</cwb:output> </cwb:doc> <cwb:doc name="simple-news.html" item="8" > <cwb:input>simple-news.html</cwb:input> <cwb:output>2.5-simple-news.html</cwb:output> </cwb:doc> <cwb:doc name="xslparaminput.html" item="9" > <cwb:input>xslparaminput.html</cwb:input> <cwb:output>2.6-xslparaminput.html</cwb:output> </cwb:doc> <cwb:doc name="index.html" item="3" > <cwb:input>index.html</cwb:input> <cwb:output>2.2-index.html</cwb:output> </cwb:doc> <cwb:doc name="about.htm" item="10" > <cwb:input>about\about.htm</cwb:input> <cwb:output>2.7-about.htm</cwb:output> </cwb:doc> <cwb:doc name="user_guide.html" item="29" > <cwb:response> <msg-output> <message terminate="no" > <p> pgf test <i>in italics </i> then end </p> </message> <message terminate="no" > <p> pgf terminate <i>in italics </i> then end </p> </message> </msg-output> </cwb:response> <cwb:input>sketchpath\user_guide\user_guide.html</cwb:input> <cwb:output>2.11-user_guide.html</cwb:output> </cwb:doc> <cwb:doc name="results_analysis.htm" item="30" > <cwb:response> <msg-output> <message terminate="no" > <p> pgf test <i>in italics </i> then end </p> </message> <message terminate="no" > <p> pgf terminate <i>in italics </i> then end </p> </message> </msg-output> </cwb:response> <cwb:input>sketchpath\user_guide\analysis\results_analysis.htm</cwb:input> <cwb:output>2.12-results_analysis.htm</cwb:output> </cwb:doc> <cwb:doc name="xpath_debugger.htm" item="31" > <cwb:response> <msg-output> <message terminate="no" > <p> pgf test <i>in italics </i> then end </p> </message> <message terminate="no" > <p> pgf terminate <i>in italics </i> then end </p> </message> </msg-output> </cwb:response> <cwb:input>sketchpath\user_guide\debugging\xpath_debugger.htm</cwb:input> <cwb:output>2.13-xpath_debugger.htm</cwb:output> </cwb:doc> </cwb:passes> <cwb:fails> <cwb:doc name="news-nondtd.html" item="5" > <cwb:error>Tx DocumentBuilder Error: Error reported by XML parser: 'a' is an undeclared namespace. Line 1, position 2. </cwb:error> <cwb:input>news-nondtd.html</cwb:input> <cwb:output>2.4-news-nondtd.html</cwb:output> </cwb:doc> <cwb:doc name="gold.html" item="20" > <cwb:error>Tx DocumentBuilder Error: Error reported by XML parser: The 'p' start tag on line 88 does not match the end tag of 'div'. Line 123, position 27. </cwb:error> <cwb:input>error-test\gold.html</cwb:input> <cwb:output>2.8-gold.html</cwb:output> </cwb:doc> <cwb:doc name="iron.html" item="21" > <cwb:error>Tx DocumentBuilder Error: An error occurred while parsing EntityName. Line 95, position 32. </cwb:error> <cwb:input>error-test\iron.html</cwb:input> <cwb:output>2.9-iron.html</cwb:output> </cwb:doc> <cwb:doc name="steel.html" item="23" > <cwb:error>Tx DocumentBuilder Error: Error reported by XML parser: Name cannot begin with the '1' character, hexadecimal value 0x31. Line 108, position 2. </cwb:error> <cwb:input>error-test\steel.html</cwb:input> <cwb:output>2.10-steel.html</cwb:output> </cwb:doc> </cwb:fails> </cwb:report>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] junit test... for xslt2?, Dave Pawson | Thread | Re: [xsl] junit test... for xslt2?, Tony Graham |
Re: [xsl] junit test... for xslt2?, Dave Pawson | Date | Re: [xsl] junit test... for xslt2?, Vladimir Nesterovsky |
Month |