|
What this is
Other links
The source code<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"> <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="," /> <!-- Copyright 2001-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Sample stylesheet to be used with Ant 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:sbailliez@apache.org"/> @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/> --> <xsl:template match="testsuites"> <html> <head> <title>Unit Test Results <style type="text/css"> body { font:normal 68% verdana,arial,helvetica; color:#000000; } table tr td, table tr th { font-size: 68%; } table.details tr th{ font-weight: bold; text-align:left; background:#a6caf0; } table.details tr td{ background:#eeeee0; } p { line-height:1.5em; margin-top:0.5em; margin-bottom:1.0em; } h1 { margin: 0px 0px 5px; font: 165% verdana,arial,helvetica } h2 { margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica } h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica } h4 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h5 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h6 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } .Error { font-weight:bold; color:red; } .Failure { font-weight:bold; color:purple; } .Properties { text-align:right; } </style> <script type="text/javascript" language="JavaScript"> var TestCases = new Array(); var cur; <xsl:for-each select="./testsuite"> <xsl:apply-templates select="properties"/> </xsl:for-each> </script> <script type="text/javascript" language="JavaScript"> | " + prop + " | " + TestCases[name][prop] + " | "); } doc.write("</table>"); doc.write("</body>"); doc.close(); win.focus(); } ]]> </script> </head> <body> <a name="top"> <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"> <h2>Packages 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%"> <xsl:call-template name="testsuite.test.header"/> <!-- list all packages recursively --> <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> <xsl:sort select="@package"/> <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/> <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/> <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 --> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="$failureCount > 0">Failure <xsl:when test="$errorCount > 0">Error </xsl:choose> </xsl:attribute> <td>
---|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.