99 строки
4.0 KiB
HTML
99 строки
4.0 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||
|
<xsl:output method='text'/>
|
||
|
<xsl:template match="/">
|
||
|
<xsl:apply-templates/>
|
||
|
</xsl:template>
|
||
|
|
||
|
<xsl:template match="test-results">
|
||
|
<xsl:text><b></xsl:text>
|
||
|
<xsl:value-of select="@name"/>
|
||
|
<xsl:text></b><br><br>

</xsl:text>
|
||
|
|
||
|
<xsl:text><b>NUnit Version:</b> </xsl:text>
|
||
|
<xsl:value-of select="environment/@nunit-version"/>
|
||
|
<xsl:text>&nbsp;&nbsp;&nbsp;<b>Date:</b> </xsl:text>
|
||
|
<xsl:value-of select="@date"/>
|
||
|
<xsl:text>&nbsp;&nbsp;&nbsp;<b>Time:</b> </xsl:text>
|
||
|
<xsl:value-of select="@time"/>
|
||
|
<xsl:text><br><br>

</xsl:text>
|
||
|
|
||
|
<xsl:text><b>Runtime Environment -</b><br>
</xsl:text>
|
||
|
<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>OS Version:</b> </xsl:text>
|
||
|
<xsl:value-of select="environment/@os-version"/>
|
||
|
<xsl:text><br>
</xsl:text>
|
||
|
<xsl:text>&nbsp;&nbsp;&nbsp;<b>CLR Version:</b> </xsl:text>
|
||
|
<xsl:value-of select="environment/@clr-version"/>
|
||
|
<xsl:text><br><br>

</xsl:text>
|
||
|
|
||
|
<xsl:text><b>Tests run: </xsl:text>
|
||
|
<xsl:value-of select="@total"/>
|
||
|
<xsl:choose>
|
||
|
<xsl:when test ="substring(environment/@nunit-version,1,3)>='2.5'">
|
||
|
<xsl:text>, Errors: </xsl:text>
|
||
|
<xsl:value-of select="@errors"/>
|
||
|
<xsl:text>, Failures: </xsl:text>
|
||
|
<xsl:value-of select="@failures"/>
|
||
|
<xsl:if test="@inconclusive">
|
||
|
<!-- Introduced in 2.5.1 -->
|
||
|
<xsl:text>, Inconclusive: </xsl:text>
|
||
|
<xsl:value-of select="@inconclusive"/>
|
||
|
</xsl:if>
|
||
|
<xsl:text>, Time: </xsl:text>
|
||
|
<xsl:value-of select="test-suite/@time"/>
|
||
|
<xsl:text> seconds<br></xsl:text>
|
||
|
<xsl:text>&nbsp;&nbsp;&nbsp;Not run: </xsl:text>
|
||
|
<xsl:value-of select="@not-run"/>
|
||
|
<xsl:text>, Invalid: </xsl:text>
|
||
|
<xsl:value-of select="@invalid"/>
|
||
|
<xsl:text>, Ignored: </xsl:text>
|
||
|
<xsl:value-of select="@ignored"/>
|
||
|
<xsl:text>, Skipped: </xsl:text>
|
||
|
<xsl:value-of select="@skipped"/>
|
||
|
<xsl:text></b><br><br>
</xsl:text>
|
||
|
</xsl:when>
|
||
|
<xsl:otherwise>
|
||
|
<xsl:text>, Failures: </xsl:text>
|
||
|
<xsl:value-of select="@failures"/>
|
||
|
<xsl:text>, Not run: </xsl:text>
|
||
|
<xsl:value-of select="@not-run"/>
|
||
|
<xsl:text>, Time: </xsl:text>
|
||
|
<xsl:value-of select="test-suite/@time"/>
|
||
|
<xsl:text> seconds</b><br><br></xsl:text>
|
||
|
</xsl:otherwise>
|
||
|
</xsl:choose>
|
||
|
<xsl:text>
|
||
|
</xsl:text>
|
||
|
|
||
|
<xsl:if test="//test-case[failure]">
|
||
|
<xsl:text><h4>Failures:</h4>
</xsl:text>
|
||
|
<xsl:text><ol>
</xsl:text>
|
||
|
<xsl:apply-templates select="//test-case[failure]"/>
|
||
|
<xsl:text></ol>
</xsl:text>
|
||
|
</xsl:if>
|
||
|
|
||
|
<xsl:if test="//test-case[@executed='False']">
|
||
|
<xsl:text><h4>Tests not run:</h4>
</xsl:text>
|
||
|
<xsl:text><ol>
</xsl:text>
|
||
|
<xsl:apply-templates select="//test-case[@executed='False']"/>
|
||
|
<xsl:text></ol>
</xsl:text>
|
||
|
</xsl:if>
|
||
|
|
||
|
<xsl:text disable-output-escaping='yes'>
</xsl:text>
|
||
|
<xsl:text><hr>
</xsl:text>
|
||
|
</xsl:template>
|
||
|
|
||
|
<xsl:template match="test-case">
|
||
|
<xsl:text><pre>
</xsl:text>
|
||
|
<xsl:text><li></xsl:text>
|
||
|
<xsl:value-of select="@name"/>
|
||
|
<xsl:text> : </xsl:text>
|
||
|
<xsl:value-of select="child::node()/message"/>
|
||
|
<xsl:text disable-output-escaping='yes'>
</xsl:text>
|
||
|
<xsl:if test="failure">
|
||
|
<xsl:value-of select="failure/stack-trace"/>
|
||
|
</xsl:if>
|
||
|
<xsl:text></pre>
</xsl:text>
|
||
|
</xsl:template>
|
||
|
|
||
|
</xsl:stylesheet>
|