Created
April 18, 2017 15:51
-
-
Save beradrian/9933070a26d7c72ce67ee26242ed5a2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="xml" indent="yes" encoding="UTF-8"/> | |
<xsl:template match="/testResults"> | |
<testsuites> | |
<testsuite> | |
<xsl:for-each select="*"> | |
<testcase> | |
<xsl:attribute name="classname"><xsl:value-of select="name()"/></xsl:attribute> | |
<xsl:attribute name="name"><xsl:value-of select="@lb"/></xsl:attribute> | |
<xsl:attribute name="time"><xsl:value-of select="@lt div 1000"/></xsl:attribute> | |
<xsl:if test="assertionResult/failureMessage"> | |
<failure><xsl:value-of select="assertionResult/failureMessage"/></failure> | |
</xsl:if> | |
<xsl:if test="@s = 'false'"> | |
<xsl:if test="responseData"> | |
<error><xsl:value-of select="responseData"/></error> | |
</xsl:if> | |
</xsl:if> | |
</testcase> | |
</xsl:for-each> | |
</testsuite> | |
</testsuites> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made a few improvements to distinguish between errors and failures and in my case, I had a lot of successful tests with failure=false, but with an empty failureMessage node.