This is my xml
<cruisecontrol project="EIQServerSuiteBuild">
<test-results name="EIQServerConfigAndQueryTests">
<test-suite name="EIQServerConfigAndQueryTestSuite" success="True" />
<results>
<test-case name="ATTACHVDSQueryTest" executed="True" success="True">ATTACHVDSQueryTest</test-case>
<test-case name="SAMPLEVDSQueryTest" executed="True" success="False">SAMPLEVDSQueryTest</test-case>
<test-case name="INDEXEDVIEWVDSQueryTest" executed="True" success="True">INDEXEDVIEWVDSQueryTest</test-case>
</results>
</test-results>
</cruisecontrol>
I written an xsl script to print the names of the test suites based on the condition of
if executed="True" success="False"
print the test suite name.
so in this case it should print
SAMPLEVDSQueryTest
as the output.
but my xsl script prints ATTACHVDSQueryTest 3 times since loop count is 3.
I think it is printing the first TestSuite name 3 times.
If i chnaged the xml and have INDEXEDVIEWVDSQueryTest as the first <test-case> in <results> tag, it is printing INDEXEDVIEWVDSQueryTest 3 times.
this is my xsl script that i am using
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="(...." version="1.0">
<xsl

utput method="html"/>
<xsl:variable name="tests.root" select="cruisecontrol//test-results"/>
<xsl:template match="test-results">
<tr>
<td colspan="2" class="section-data">
<tr>
<td>
<b>Tests Failed : </b>
</td>
</tr>
<xsl:for-each select = "($tests.root//test-case)">
<xsl:if test = "($tests.root//test-case[@success = 'False'])">
<tr>
<td>
<b>
<xsl:value-of select="($tests.root//test-case[@name])"/>
</b>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Please let me know why i am getting wrong results. Thank you