Skip to content
Permalink
Browse files
[JENKINS-29316] mark inconclusive tests as 'skipped'
  • Loading branch information
nilleb committed Jul 29, 2015
1 parent 7ad3d29 commit 11249bc882314d8f1daa4a76099b499ad7608e85
Showing 4 changed files with 5,403 additions and 3 deletions.
@@ -8,8 +8,8 @@
<xsl:variable name="numberOfTests" select="sum(/a:TestRun/a:ResultSummary/a:Counters/@total | /b:TestRun/b:ResultSummary/b:Counters/@total)"/>
<xsl:variable name="numberOfFailures" select="sum(/a:TestRun/a:ResultSummary/a:Counters/@failed | /b:TestRun/b:ResultSummary/b:Counters/@failed)" />
<xsl:variable name="numberOfErrors" select="sum(/a:TestRun/a:ResultSummary/a:Counters/@error | /b:TestRun/b:ResultSummary/b:Counters/@error | /a:TestRun/a:ResultSummary/a:Counters/@timeout | /b:TestRun/b:ResultSummary/b:Counters/@timeout)" />
<xsl:variable name="skipped2006" select="/a:TestRun/a:ResultSummary/a:Counters/@total - /a:TestRun/a:ResultSummary/a:Counters/@executed"/>
<xsl:variable name="skipped2010" select="/b:TestRun/b:ResultSummary/b:Counters/@total - /b:TestRun/b:ResultSummary/b:Counters/@executed"/>
<xsl:variable name="skipped2006" select="/a:TestRun/a:ResultSummary/a:Counters/@inconclusive + /a:TestRun/a:ResultSummary/a:Counters/@total - /a:TestRun/a:ResultSummary/a:Counters/@executed"/>
<xsl:variable name="skipped2010" select="/b:TestRun/b:ResultSummary/b:Counters/@inconclusive + /b:TestRun/b:ResultSummary/b:Counters/@total - /b:TestRun/b:ResultSummary/b:Counters/@executed"/>
<xsl:variable name="numberSkipped">
<xsl:choose>
<xsl:when test="$skipped2006 > 0"><xsl:value-of select="$skipped2006"/></xsl:when>
@@ -113,7 +113,7 @@
<xsl:variable name="tag">
<xsl:choose>
<xsl:when test="$outcome = 'Failed'">failure</xsl:when>
<xsl:when test="$outcome = 'NotExecuted'">skipped</xsl:when>
<xsl:when test="$outcome = 'NotExecuted' or $outcome = 'Inconclusive'">skipped</xsl:when>
<xsl:otherwise>error</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -195,6 +195,17 @@ public void testDataDriven2013() throws Exception {
assertTrue("XSL transformation did not work" + myDiff, myDiff.similar());
}

@Test
public void testInconclusive() throws Exception {

Transform myTransform = new Transform(
new InputSource(this.getClass().getResourceAsStream("DATAFEED.Tests.trx")),
new InputSource(this.getClass().getResourceAsStream(MSTestReportConverter.MSTEST_TO_JUNIT_XSLFILE_STR)));

Diff myDiff = new Diff(readXmlAsString("DATAFEED.Tests.xml"), myTransform);
assertTrue("XSL transformation did not work" + myDiff, myDiff.similar());
}

private String readXmlAsString(String resourceName) throws IOException {
String xmlString = "";

0 comments on commit 11249bc

Please sign in to comment.