jhm 2004/04/16 04:47:19 Modified: src/etc junit-frames.xsl junit-noframes.xsl Log: Add hostname/timestamp from Jeff Tulley. Remove authors (like in java files). Revision Changes Path 1.19 +6 -6 ant/src/etc/junit-frames.xsl Index: junit-frames.xsl =================================================================== RCS file: /home/cvs/ant/src/etc/junit-frames.xsl,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- junit-frames.xsl 9 Feb 2004 21:05:15 -0000 1.18 +++ junit-frames.xsl 16 Apr 2004 11:47:18 -0000 1.19 @@ -28,10 +28,6 @@ It creates a set of HTML files a la javadoc where you can browse easily through all packages and classes. - @author Stephane Bailliez <a href="mailto:[EMAIL PROTECTED]"/> - @author Erik Hatcher <a href="mailto:[EMAIL PROTECTED]"/> - @author Martijn Kruithof <a href="mailto:[EMAIL PROTECTED]"/> - --> <xsl:param name="output.dir" select="'.'"/> @@ -461,7 +457,6 @@ <xsl:with-param name="value" select="$timeCount"/> </xsl:call-template> </td> - </tr> </table> <table border="0" width="95%"> @@ -500,6 +495,8 @@ <xsl:with-param name="value" select="sum($insamepackage/@time)"/> </xsl:call-template> </td> + <td><xsl:value-of select="$insamepackage/@timestamp"/></td> + <td><xsl:value-of select="$insamepackage/@hostname"/></td> </tr> </xsl:for-each> </table> @@ -588,6 +585,8 @@ <th>Errors</th> <th>Failures</th> <th nowrap="nowrap">Time(s)</th> + <th nowrap="nowrap">Time Stamp</th> + <th>Host</th> </tr> </xsl:template> @@ -620,6 +619,8 @@ <xsl:with-param name="value" select="@time"/> </xsl:call-template> </td> + <td><xsl:apply-templates select="@timestamp"/></td> + <td><xsl:apply-templates select="@hostname"/></td> </tr> </xsl:template> @@ -713,4 +714,3 @@ <xsl:value-of select="format-number($value,'0.00%')"/> </xsl:template> </xsl:stylesheet> - 1.13 +38 -36 ant/src/etc/junit-noframes.xsl Index: junit-noframes.xsl =================================================================== RCS file: /home/cvs/ant/src/etc/junit-noframes.xsl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- junit-noframes.xsl 9 Feb 2004 21:05:15 -0000 1.12 +++ junit-noframes.xsl 16 Apr 2004 11:47:18 -0000 1.13 @@ -1,6 +1,6 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" - xmlns:lxslt="http://xml.apache.org/xslt" - xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"> + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"> <xsl:output method="html" indent="yes" encoding="US-ASCII" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" /> <xsl:decimal-format decimal-separator="." grouping-separator="," /> @@ -19,17 +19,14 @@ See the License for the specific language governing permissions and limitations under the License. --> - + <!-- - + Sample stylesheet to be used with An JUnitReport output. - + It creates a non-framed report that can be useful to send via e-mail or such. - - @author Stephane Bailliez <a href="mailto:[EMAIL PROTECTED]"/> - @author Erik Hatcher <a href="mailto:[EMAIL PROTECTED]"/> - + --> <xsl:template match="testsuites"> <html> @@ -51,7 +48,7 @@ table.details tr td{ background:#eeeee0; } - + p { line-height:1.5em; margin-top:0.5em; margin-bottom:1.0em; @@ -87,7 +84,7 @@ <script type="text/javascript" language="JavaScript"> var TestCases = new Array(); var cur; - <xsl:for-each select="./testsuite"> + <xsl:for-each select="./testsuite"> <xsl:apply-templates select="properties"/> </xsl:for-each> @@ -118,39 +115,39 @@ doc.close(); win.focus(); } - ]]> + ]]> </script> </head> <body> <a name="top"></a> - <xsl:call-template name="pageHeader"/> - + <xsl:call-template name="pageHeader"/> + <!-- Summary part --> <xsl:call-template name="summary"/> <hr size="1" width="95%" align="left"/> - + <!-- Package List part --> <xsl:call-template name="packagelist"/> <hr size="1" width="95%" align="left"/> - + <!-- For each package create its part --> <xsl:call-template name="packages"/> <hr size="1" width="95%" align="left"/> - + <!-- For each class create the part --> <xsl:call-template name="classes"/> - + </body> </html> </xsl:template> - - - + + + <!-- ================================================================== --> <!-- Write a list of all packages with an hyperlink to the anchor of --> <!-- of the package name. --> <!-- ================================================================== --> - <xsl:template name="packagelist"> + <xsl:template name="packagelist"> <h2>Packages</h2> Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> @@ -163,7 +160,7 @@ <xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/> <xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/> <xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/> - + <!-- write a summary for the package --> <tr valign="top"> <!-- set a nice color depending if there is an error/failure --> @@ -182,12 +179,14 @@ <xsl:with-param name="value" select="$timeCount"/> </xsl:call-template> </td> + <td><xsl:value-of select="$testsuites-in-package/@timestamp"/></td> + <td><xsl:value-of select="$testsuites-in-package/@hostname"/></td> </tr> </xsl:for-each> - </table> + </table> </xsl:template> - - + + <!-- ================================================================== --> <!-- Write a package level report --> <!-- It creates a table with values from the document: --> @@ -199,10 +198,10 @@ <xsl:sort select="@package"/> <a name="[EMAIL PROTECTED]"></a> <h3>Package <xsl:value-of select="@package"/></h3> - + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testsuite.test.header"/> - + <!-- match the testsuites of this package --> <xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/> </table> @@ -211,14 +210,14 @@ <p/> </xsl:for-each> </xsl:template> - + <xsl:template name="classes"> <xsl:for-each select="testsuite"> <xsl:sort select="@name"/> <!-- create an anchor to this class name --> <a name="[EMAIL PROTECTED]"></a> <h3>TestCase <xsl:value-of select="@name"/></h3> - + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testcase.test.header"/> <!-- @@ -239,11 +238,11 @@ </a> </div> <p/> - + <a href="#top">Back to top</a> </xsl:for-each> </xsl:template> - + <xsl:template name="summary"> <h2>Summary</h2> <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> @@ -290,7 +289,7 @@ </tr> </table> </xsl:template> - + <!-- Write properties into a JavaScript data structure. This is based on the original idea by Erik Hatcher ([EMAIL PROTECTED]) @@ -302,7 +301,7 @@ cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>'; </xsl:for-each> </xsl:template> - + <!-- Page HEADER --> <xsl:template name="pageHeader"> <h1>Unit Test Results</h1> @@ -333,6 +332,8 @@ <th>Errors</th> <th>Failures</th> <th nowrap="nowrap">Time(s)</th> + <th nowrap="nowrap">Time Stamp</th> + <th>Host</th> </tr> </xsl:template> @@ -357,7 +358,7 @@ <xsl:when test="@errors[.> 0]">Error</xsl:when> </xsl:choose> </xsl:attribute> - + <!-- print testsuite information --> <td><a href="[EMAIL PROTECTED]"><xsl:value-of select="@name"/></a></td> <td><xsl:value-of select="@tests"/></td> @@ -368,6 +369,8 @@ <xsl:with-param name="value" select="@time"/> </xsl:call-template> </td> + <td><xsl:apply-templates select="@timestamp"/></td> + <td><xsl:apply-templates select="@hostname"/></td> </tr> </xsl:template> @@ -458,4 +461,3 @@ </xsl:template> </xsl:stylesheet> -
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]