vhardy 01/10/19 00:40:41 Modified: . build.xml test-resources/org/apache/batik/test samplesRendering.xml test-resources/org/apache/batik/test/svg HTMLReport.xsl Log: Improved test report output. Revision Changes Path 1.88 +11 -1 xml-batik/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-batik/build.xml,v retrieving revision 1.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- build.xml 2001/10/16 10:52:39 1.87 +++ build.xml 2001/10/19 07:40:40 1.88 @@ -44,7 +44,7 @@ [win32] .\build.bat help - $Id: build.xml,v 1.87 2001/10/16 10:52:39 vhardy Exp $ + $Id: build.xml,v 1.88 2001/10/19 07:40:40 vhardy Exp $ --> @@ -84,6 +84,7 @@ <property name="test-reports" value="test-reports" /> <property name="test-references" value="test-references" /> + <property name="test-resources" value="test-resources" /> <available property="rhino.present" classname="org.mozilla.javascript.Context"> <classpath refid="libs-classpath"/> @@ -693,6 +694,15 @@ description="Created directories needed for test suite"> <mkdir dir="${test-reports}"/> + <mkdir dir="${test-reports}/style"/> + <mkdir dir="${test-reports}/images"/> + <copy todir="${test-reports}/style"> + <fileset dir="${test-resources}/org/apache/batik/test/svg/resources/style"/> + </copy> + <copy todir="${test-reports}/images"> + <fileset dir="${test-resources}/org/apache/batik/test/svg/resources/images"/> + </copy> + <mkdir dir="${test-references}/samples/accepted-variation"/> <mkdir dir="${test-references}/samples/candidate-variation"/> <mkdir dir="${test-references}/samples/tests/spec/coordinates/candidate-variation" /> 1.40 +5 -4 xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml Index: samplesRendering.xml =================================================================== RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- samplesRendering.xml 2001/10/18 14:44:32 1.39 +++ samplesRendering.xml 2001/10/19 07:40:40 1.40 @@ -8,7 +8,7 @@ <!-- ========================================================================= --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: samplesRendering.xml,v 1.39 2001/10/18 14:44:32 tkormann Exp $ --> +<!-- @version $Id: samplesRendering.xml,v 1.40 2001/10/19 07:40:40 vhardy Exp $ --> <!-- ========================================================================= --> <testSuite id="samplesRendering" name="samples and samples/test Rendering" class="org.apache.batik.test.svg.SamplesRenderingTest"> @@ -171,10 +171,11 @@ <test id="samples/tests/spec/structure/toolTips.svg" /> <test id="samples/tests/spec/structure/useMultiple.svg" /> <test id="samples/tests/spec/structure/useMultipleURI.svg" /> - <test id="samples/tests/spec/structure/useStylesheet.svg" /> - <test id="samples/tests/spec/structure/useStyling.svg" /> - <test id="samples/tests/spec/structure/useStylingURI.svg" /> + <test id="samples/tests/spec/structure/useStylesheet.svg" /> + <test id="samples/tests/spec/structure/useStyling.svg" /> + <test id="samples/tests/spec/structure/useStylingURI.svg" /> <test id="samples/tests/spec/structure/useTargets.svg" /> + <test id="samples/tests/spec/structure/xmlBase.svg" /> <test id="samples/tests/spec/structure/xmlBaseStyling.svg" /> </testGroup> 1.9 +105 -76 xml-batik/test-resources/org/apache/batik/test/svg/HTMLReport.xsl Index: HTMLReport.xsl =================================================================== RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/svg/HTMLReport.xsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- HTMLReport.xsl 2001/10/16 15:47:44 1.8 +++ HTMLReport.xsl 2001/10/19 07:40:40 1.9 @@ -9,7 +9,7 @@ <!-- ========================================================================= --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: HTMLReport.xsl,v 1.8 2001/10/16 15:47:44 vhardy Exp $ --> +<!-- @version $Id: HTMLReport.xsl,v 1.9 2001/10/19 07:40:40 vhardy Exp $ --> <!-- ========================================================================= --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/2000/xlink/namespace/" > @@ -17,124 +17,153 @@ <xsl:template match="/"> <html> <head> + <link rel="stylesheet" type="text/css" media="screen" href="../../style/style.css" /> </head> - <body> - <table width="600" border="0" cellpadding="0" cellspacing="0" hspace="0" vspace="0"> - <tr bgcolor="black"><td> - <table width="600" border="0" cellpadding="1" cellspacing="1" hspace="0" vspace="0"> - - <xsl:apply-templates/> - </table> - </td></tr> - </table> + <body style="background-image: url(../../images/background.png);"> + + <h1>Regard Test Report -- + <xsl:value-of select="count(/descendant::testReport[@status='passed'])" />/<xsl:value-of select="count(/descendant::testReport)" /> + </h1> + + <hr noshade="noshade" size="1" width="600" align="left"/> + + <!-- ======= --> + <!-- Summary --> + <!-- ======= --> + <xsl:call-template name="summary" /> +  <br /> + + <!-- ======= --> + <!-- Details --> + <!-- ======= --> + <xsl:call-template name="details" /> + </body> </html> + + </xsl:template> + + <xsl:template name="details"> + + <h2>Report Details</h2> + + <xsl:apply-templates/> + + </xsl:template> + + <xsl:template name="summary"> + + <h2>Failed Leaf Tests:</h2> + + <xsl:call-template name="failedTestsLinks"> + <xsl:with-param name="failedNodes" select="/descendant::testReport[@status='failed']" /> + </xsl:call-template> + + <hr noshade="noshade" size="1" width="600" align="left" /> + + </xsl:template> + + <xsl:template name="failedTestsLinks"> + <xsl:param name="failedNodes" /> + <ol> + <xsl:for-each select="$failedNodes"> + <li> + <a> + <xsl:attribute name="href">#<xsl:value-of select="@id" /></xsl:attribute> + <xsl:value-of select="@testName" /> + </a> + + </li> + </xsl:for-each> + </ol> + + </xsl:template> <xsl:template match="testReport | testSuiteReport"> - <xsl:param name="prefix" /> - <xsl:variable name="childrenTests" select="description/testReport" /> + <xsl:variable name="childrenTests" select="description/testReport" /> + <xsl:variable name="childrenTestSuites" select="description/testSuiteReport" /> <xsl:variable name="childrenTestsCount" select="count($childrenTests) + count($childrenTestSuites)" /> <a> - <xsl:attribute name="href"> + <xsl:attribute name="name"> <xsl:value-of select="@id" /> </xsl:attribute> </a> + <xsl:choose> - <xsl:when test="$childrenTestsCount > 0 or @status='failed'"> - <tr bgcolor="#cccccc"> - <td colspan="2"> - <table bgcolor="#cccccc" vspace="0" hspace="0" cellspacing="0" cellpadding="0" border="0" width="100%"> - <tr bgcolor="#cccccc"> - <td width="4%"> - <xsl:attribute name="bgcolor"> - <xsl:choose> - <xsl:when test="@status='failed'">red</xsl:when> - <xsl:when test="@status='passed'">green</xsl:when> - </xsl:choose> - </xsl:attribute>  - </td> - <td width="96%"> - <b> <xsl:value-of select="$prefix" /><xsl:value-of select="@testName" /></b> - </td> - </tr> - </table> - </td> - </tr> - <tr bgcolor="white"> - <td colspan="2"> - <xsl:value-of select="$prefix" /> - - <!-- Plain Status --> - <xsl:value-of select="@status" /> - - <xsl:choose> - <xsl:when test="@status='failed'"> -  (<xsl:value-of select="@errorCode" />) - </xsl:when> - </xsl:choose> - - <!-- If this is a composite report, add counts of success/failures --> - <xsl:choose> - <xsl:when test="$childrenTestsCount > 0" > - <xsl:variable name="passedChildrenTests" + <xsl:when test="$childrenTestsCount = 0 and @status='failed'"> + <table bgcolor="black" vspace="0" hspace="0" cellspacing="0" cellpadding="0" border="0" width="600"> + <tr><td> + <table bgcolor="black" vspace="0" hspace="0" cellspacing="1" cellpadding="2" border="0" width="600"> + <tr bgcolor="#eeeeee"> + <td colspan="2"><img align="bottom" src="../../images/deco.png" width="16" height="16" />  + + <font><xsl:attribute name="class">title<xsl:value-of select="@status"/></xsl:attribute> <xsl:value-of select="@testName" /></font> + + <xsl:choose> + <xsl:when test="@status='failed'"> +  (<xsl:value-of select="@errorCode" />) + </xsl:when> + </xsl:choose> + + <!-- If this is a composite report, add counts of success/failures --> + <xsl:choose> + + + <xsl:when test="$childrenTestsCount > 0" > + <xsl:variable name="passedChildrenTests" select="description/testReport[attribute::status='passed']" /> - <xsl:variable name="passedChildrenTestSuites" + <xsl:variable name="passedChildrenTestSuites" select="description/testSuiteReport[attribute::status='passed']" /> - -- Success Rate : <xsl:value-of select=" count($passedChildrenTests) + count($passedChildrenTestSuites)" /> / - <xsl:value-of select="$childrenTestsCount" /> - </xsl:when> - </xsl:choose> - </td> - </tr> - - <tr bgcolor="white"> - <td><xsl:apply-templates> - <xsl:with-param name="prefix" select="$prefix"/> - </xsl:apply-templates></td> - </tr> + --  <xsl:value-of select=" count($passedChildrenTests) + count($passedChildrenTestSuites)" /> / + <xsl:value-of select="$childrenTestsCount" /> + </xsl:when> + </xsl:choose> + + </td> + </tr> + <xsl:apply-templates /> + </table></td></tr></table> + <br /> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates /> + </xsl:otherwise> </xsl:choose> + </xsl:template> <xsl:template match="description"> - <xsl:param name="prefix"> </xsl:param> - <xsl:apply-templates select="genericEntry | uriEntry | fileEntry"> - <xsl:with-param name="prefix" select="$prefix" /> - </xsl:apply-templates> + <xsl:apply-templates select="genericEntry | uriEntry | fileEntry" /> + <xsl:apply-templates select="testReport | testSuiteReport"> - <xsl:with-param name="prefix"> - <xsl:value-of select="$prefix"/>    - </xsl:with-param> </xsl:apply-templates> </xsl:template> <xsl:template match="genericEntry"> - <xsl:param name="prefix"> </xsl:param> <tr bgcolor="white"> - <td><xsl:value-of select="$prefix" /><xsl:value-of select="@key" /></td> + <td><xsl:value-of select="@key" /></td> <td><xsl:value-of select="@value" /></td> </tr> </xsl:template> <xsl:template match="uriEntry"> - <xsl:param name="prefix"> </xsl:param> <tr bgcolor="white" margin-left="50pt"> - <td><xsl:value-of select="$prefix" /><xsl:value-of select="@key" /></td> + <td><xsl:value-of select="@key" /></td> <xsl:variable name="value" select="@value" /> <td><a target="image" href="{$value}"><img height="150" src="{$value}" /></a></td> </tr> </xsl:template> <xsl:template match="fileEntry"> - <xsl:param name="prefix"> </xsl:param> <tr bgcolor="white"> - <td><xsl:value-of select="$prefix" /><xsl:value-of select="@key" /></td> + <td><xsl:value-of select="@key" /></td> <xsl:variable name="value" select="@value" /> <td><a target="image" href="{$value}"><img height="150" src="{$value}" /></a></td> </tr>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]