junit-report.xsl revision ca5f476ebacf0684605124c0410d08604231addd
5541N/A<?xml version="1.0" encoding="UTF-8"?>
5546N/A<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5541N/A<!--
5541N/A ! CDDL HEADER START
5541N/A !
5541N/A ! The contents of this file are subject to the terms of the
5541N/A ! Common Development and Distribution License, Version 1.0 only
5541N/A ! (the "License"). You may not use this file except in compliance
5541N/A ! with the License.
5541N/A !
5541N/A ! You can obtain a copy of the license at
5541N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5541N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5541N/A ! See the License for the specific language governing permissions
5541N/A ! and limitations under the License.
5541N/A !
5541N/A ! When distributing Covered Code, include this CDDL HEADER in each
5541N/A ! file and include the License file at
5541N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
5541N/A ! add the following below this CDDL HEADER, with the fields enclosed
5541N/A ! by brackets "[]" replaced with your own identifying information:
5541N/A ! Portions Copyright [yyyy] [name of copyright owner]
5541N/A !
5541N/A ! CDDL HEADER END
5541N/A !
5541N/A ! Copyright 2011-2013 ForgeRock AS.
5541N/A ! -->
5541N/A
5541N/A<xsl:output method="xml" indent="yes" />
5541N/A<xsl:template match="/">
5541N/A<testsuites>
5541N/A <xsl:variable name="ftpath" select="/qa/functional-tests"/>
5541N/A <xsl:variable name="id" select="$ftpath/identification"/>
5541N/A <xsl:variable name="results" select="$ftpath/results"/>
5541N/A <xsl:variable name="testgroup" select="$results/testgroup"/>
5541N/A <xsl:variable name="testsuite" select="$testgroup/testsuite"/>
5541N/A <xsl:variable name="testcase" select="$testsuite/testcase"/>
5541N/A <xsl:variable name="total-tests" select="count($testcase)"/>
5541N/A <xsl:variable name="pass-tests" select="count($testcase[@result='pass'])"/>
5541N/A <xsl:variable name="kfail-tests" select="count($testcase/issues)"/>
5541N/A <xsl:variable name="inconc-tests" select="count($testcase[@result='unknown'])"/>
5541N/A <xsl:variable name="fail-tests" select="count($testcase[@result='fail']) - $kfail-tests"/>
5541N/A <testsuite name="opendj.tests.functional"
5541N/A time="0"
5541N/A tests="{$total-tests}"
5541N/A errors="{$inconc-tests}"
5541N/A failures="{$fail-tests}"
5541N/A skipped="{$kfail-tests}">
5541N/A
5541N/A <xsl:for-each select="$testcase">
5541N/A <xsl:variable name="issue">
5541N/A <xsl:value-of select="issues/issue/@id"/>
5541N/A </xsl:variable>
5541N/A <xsl:variable name="message" select="'no message'"/>
5541N/A <testcase classname="{ancestor::testgroup[1]/@name}.{ancestor::testsuite[1]/@shortname}"
5541N/A name="{@shortname}"
5541N/A time="{@duration}">
5541N/A <xsl:if test="contains(@result, 'unknown')">
5541N/A <error>
5541N/A <xsl:value-of select="'log inconclusive'"/>
5541N/A </error>
5541N/A </xsl:if>
5541N/A <xsl:if test="contains(@result, 'fail') and string-length($issue) = 0">
5541N/A <failure>
5541N/A <xsl:value-of select="'log fail'"/>
5541N/A </failure>
5541N/A </xsl:if>
5541N/A <xsl:if test="contains(@result, 'fail') and string-length($issue) &gt; 0">
5541N/A <skipped>
5541N/A <xsl:value-of select="$issue"/>
5541N/A </skipped>
5541N/A </xsl:if>
5541N/A </testcase>
5541N/A </xsl:for-each>
5541N/A
5541N/A </testsuite>
5541N/A</testsuites>
5541N/A</xsl:template>
5541N/A</xsl:stylesheet>
5541N/A
5548N/A