01 <?xml version="1.0" encoding="ISO-8859-1"?> 02 03 <!-- 04 - Copyright 2005-2006 Jens Voß. 05 - 06 - Licensed under the Apache License, Version 2.0 (the "License"); 07 - you may not use this file except in compliance with the License. 08 - You may obtain a copy of the License at 09 - 10 - http://www.apache.org/licenses/LICENSE-2.0 11 - 12 - Unless required by applicable law or agreed to in writing, software 13 - distributed under the License is distributed on an "AS IS" BASIS, 14 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 - See the License for the specific language governing permissions and 16 - limitations under the License. 17 - 18 --> 19 20 <!--- 21 - This stylesheet is used by the AlsterTextTask for transforming the 22 - result data of one Alster test suite into text form (which is written 23 - to a file in the test result directory). 24 --> 25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 26 version="1.0"> 27 28 <xsl:output method="text"/> 29 30 <!--- 31 - This template transforms the result data of one Alster test suite 32 - into plain text. 33 --> 34 <xsl:template match="testSuite"> 35 <xsl:text>Testsuite: </xsl:text> 36 <xsl:value-of select="../@package"/> 37 <xsl:text>/</xsl:text> 38 <xsl:value-of select="@name"/> 39 <xsl:text>
Tests run: </xsl:text> 40 <xsl:value-of select="count(testCase)"/> 41 <xsl:text>, Failures: </xsl:text> 42 <xsl:value-of select="count(testCase[string-length(.) > 0])"/> 43 <xsl:text>, Time elapsed: </xsl:text> 44 <xsl:value-of select="sum(testCase/@millis) div 1000"/> 45 <xsl:text> sec

</xsl:text> 46 <xsl:for-each select="testCase"> 47 <xsl:text>Testcase: </xsl:text> 48 <xsl:value-of select="@name"/> 49 <xsl:text> took </xsl:text> 50 <xsl:value-of select="@millis div 1000"/> 51 <xsl:text> sec
</xsl:text> 52 <xsl:if test="string-length(.)"> 53 <xsl:text> FAILED
</xsl:text> 54 <xsl:value-of select="."/> 55 <xsl:text>
</xsl:text> 56 </xsl:if> 57 </xsl:for-each> 58 </xsl:template> 59 60 </xsl:stylesheet>