blob: c6a1ccc8c874a4e5d946038c4411d1967b700996 [file] [log] [blame]
<?xml version="1.0" ?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:Reporter="http://jse.east.sun.com/sqe/wspack/reporter/result.dtd"
version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:strip-space elements="description"/>
<xsl:variable name="filler">&#xa0;</xsl:variable>
<xsl:variable name="description-filler">This Test Suite has no description</xsl:variable>
<xsl:variable name="passColor">silver</xsl:variable>
<xsl:variable name="failColor">red</xsl:variable>
<xsl:variable name="dnrColor">yellow</xsl:variable>
<xsl:variable name="testPassColor">0099CC</xsl:variable>
<xsl:template match="/">
<html>
<A NAME="TOP"/>
<head>
<title>Sun Java System Application Server 9 Test Results</title>
</head>
<body BGCOLOR="white">
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="report">
<CENTER>
<br/>
<H2>Sun Java System Application Server 9 Test Result Report</H2>
<xsl:apply-templates/>
</CENTER>
</xsl:template>
<xsl:template match="date">
<H3>Execution Date:<xsl:value-of select="."/></H3>
</xsl:template>
<xsl:template match="configuration">
<TABLE BORDER="1">
<TR>
<TH COLSPAN="2">Configuration Information</TH>
</TR>
<TR>
<TD>Machine Name</TD>
<TD><xsl:value-of select="machineName"/></TD>
</TR>
<TR>
<TD>OS</TD>
<TD><xsl:value-of select="os"/></TD>
</TR>
<TR>
<TD>JDK Version</TD>
<TD><xsl:value-of select="jdkVersion"/></TD>
</TR>
</TABLE>
<xsl:variable
name="testSuiteCount"
select="count(../testsuites/testsuite)"/>
<xsl:variable
name="testCount"
select="count(../testsuites/testsuite/tests/test)"/>
<xsl:variable
name="passedTestCount"
select="count(../testsuites/testsuite/tests/test/status[@value='pass'])"/>
<xsl:variable
name="failedTestCount"
select="count(../testsuites/testsuite/tests/test/status[@value='fail'])"/>
<xsl:variable
name="dnrTestCount"
select="count(../testsuites/testsuite/tests/test/status[@value='did_not_run'])"/>
<xsl:variable
name="testCaseCount"
select="count(../testsuites/testsuite/tests/test/testcases/testcase)"/>
<xsl:variable
name="passedTestCaseCount"
select="count(../testsuites/testsuite/tests/test/testcases/testcase/status[@value='pass'])"/>
<xsl:variable
name="failedTestCaseCount"
select="count(../testsuites/testsuite/tests/test/testcases/testcase/status[@value='fail'])"/>
<xsl:variable
name="dnrTestCaseCount"
select="count(../testsuites/testsuite/tests/test/testcases/testcase/status[@value='did_not_run'])"/>
<HR/>
<A NAME="Summary"/>
<H3> Summary Test Results </H3>
<TABLE BORDER="1">
<TR>
<TH>Item</TH>
<TH>Total</TH>
<TH>Pass</TH>
<TH>Fail</TH>
<TH>Did Not Run</TH>
</TR>
<TR>
<TD ALIGN="CENTER">Test Suites</TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$testSuiteCount"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$filler"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$filler"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$filler"/></TD>
</TR>
<TR>
<TD ALIGN="CENTER">Test Cases</TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$testCaseCount"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$passedTestCaseCount"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$failedTestCaseCount"/></TD>
<TD ALIGN="RIGHT"><xsl:value-of select="$dnrTestCaseCount"/></TD>
</TR>
</TABLE>
</xsl:template>
<xsl:template match="testsuites">
<HR/>
<A NAME="DetailedResults"/>
<H2> Detailed Results </H2>
<TABLE BORDER="1">
<TR>
<TD ALIGN="CENTER"> <B> Test Suite Link </B> </TD>
<TD ALIGN="CENTER"> <B> Fail Count </B> </TD>
<TD ALIGN="CENTER"> <B> Pass Count </B> </TD>
<TD ALIGN="CENTER"> <B> Total Count </B> </TD>
</TR>
<xsl:for-each select="testsuite">
<xsl:variable
name="testCount"
select="count(.//testcase)"/>
<xsl:variable
name="failtestCount"
select="count(.//testcase/status[@value='fail'])"/>
<xsl:variable
name="passtestCount"
select="count(.//testcase/status[@value='pass'])"/>
<TR>
<TD ALIGN="CENTER">
<A HREF="#{generate-id(id)}"><xsl:value-of select="id"/></A>
</TD>
<TD ALIGN="CENTER">
<FONT COLOR="RED"><xsl:value-of select="$failtestCount"/></FONT>
</TD>
<TD ALIGN="CENTER">
<FONT COLOR="GREEN"><xsl:value-of select="$passtestCount"/></FONT>
</TD>
<TD ALIGN="CENTER">
<FONT COLOR="BLUE"><xsl:value-of select="$testCount"/></FONT>
</TD>
</TR>
</xsl:for-each>
</TABLE>
<HR/>
<xsl:for-each select="testsuite">
<xsl:variable name="myname">
<xsl:choose>
<xsl:when test="name!=''">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="mydescription">
<xsl:choose>
<xsl:when test="description!=''">
<xsl:value-of select="description"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$description-filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable
name="mytestCount"
select="count(.//testcase)"/>
<xsl:variable
name="myFailtestCount"
select="count(.//testcase/status[@value='fail'])"/>
<xsl:variable
name="myPasstestCount"
select="count(.//testcase/status[@value='pass'])"/>
<TABLE BORDER="0" BGCOLOR="silver">
<TR>
<TD>Testsuite Number</TD>
<TD><A NAME="{generate-id(./id)}"><xsl:number/></A></TD>
</TR>
<TR>
<TD>Testsuite Id</TD>
<TD><xsl:value-of select="id"/></TD>
</TR>
<TR>
<TD>Testsuite Name</TD>
<TD><xsl:value-of select="$myname"/></TD>
</TR>
<TR>
<TD>Testsuite Description</TD>
<TD><xsl:value-of select="$mydescription"/></TD>
</TR>
<TR>
<TD>Total Test Cases Run</TD>
<TD><xsl:value-of select="$mytestCount"/></TD>
</TR>
<TR>
<TD>Total Test Cases Failed</TD>
<TD><xsl:value-of select="$myFailtestCount"/></TD>
</TR>
<TR>
<TD>Total Test Cases Passed</TD>
<TD><xsl:value-of select="$myPasstestCount"/></TD>
</TR>
</TABLE>
<TABLE BORDER="1" BGCOLOR="silver">
<TR VALIGN="TOP">
<TH> Name </TH>
<TH> Status </TH>
</TR>
<xsl:apply-templates select="tests"/>
</TABLE>
<BR/>
<P ALIGN="LEFT">
<FONT SIZE="-2">
[<A HREF="#DetailedResults"> Detailed Results </A>|
<A HREF="#Summary"> Summary </A>|
<A HREF="#TOP"> Top </A>]
</FONT>
</P>
</xsl:for-each>
</xsl:template>
<xsl:template match="tests">
<xsl:for-each select="test">
<xsl:variable name="myname">
<xsl:choose>
<xsl:when test="name!=''">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="status/@value='pass'">
<xsl:call-template name="test-row">
<xsl:with-param name="color" select="$testPassColor"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="status/@value='fail'">
<xsl:call-template name="test-row">
<xsl:with-param name="color" select="$failColor"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="status/@value='did_not_run'">
<xsl:call-template name="test-row">
<xsl:with-param name="color" select="$dnrColor"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates select="testcases"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="test-row">
<xsl:param name="color"/>
<xsl:variable name="myname">
<xsl:choose>
<xsl:when test="name!=''">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="mystatus">
<xsl:choose>
<xsl:when test="status!=''">
<xsl:value-of select="status"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="concat('&lt;TR BGCOLOR=', $color, '&gt;')" disable-output-escaping="yes"/>
<TD VALIGN="TOP"><xsl:value-of select="id"/> </TD>
<xsl:value-of select="concat('&lt;TD VALIGN=TOP BGCOLOR=', $color, '&gt;')" disable-output-escaping="yes"/>
<xsl:value-of select="status/@value"/>
<xsl:value-of select="concat('&lt;', '/TD', '&gt;')" disable-output-escaping="yes"/>
<xsl:value-of select="concat('&lt;', '/TR', '&gt;')" disable-output-escaping="yes"/>
</xsl:template>
<xsl:template match="testcases">
<xsl:for-each select="testcase">
<xsl:if test="status/@value='pass'">
<xsl:call-template name="testcase-row">
<xsl:with-param name="color" select="$passColor"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="status/@value='fail'">
<xsl:call-template name="testcase-row">
<xsl:with-param name="color" select="$failColor"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="status/@value='did_not_run'">
<xsl:call-template name="testcase-row">
<xsl:with-param name="color" select="$dnrColor"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="testcase-row">
<xsl:param name="color"/>
<xsl:variable name="myname">
<xsl:choose>
<xsl:when test="name!=''">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filler"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<TR>
<TD VALIGN="TOP"><xsl:value-of select="id"/> </TD>
<!-- <TD VALIGN="TOP"><xsl:value-of select="$myname"/> </TD> -->
<xsl:value-of select="concat('&lt;TD VALIGN=TOP BGCOLOR=', $color, '&gt;')" disable-output-escaping="yes"/>
<xsl:value-of select="status/@value"/>
<xsl:value-of select="concat('&lt;', '/TD', '&gt;')" disable-output-escaping="yes"/>
</TR>
</xsl:template>
</xsl:stylesheet>