Skip to content

Commit

Permalink
[FIXED JENKINS-18265] use the junit format to obtain a coherent and w…
Browse files Browse the repository at this point in the history
…ell-looking result page
  • Loading branch information
nilleb committed Mar 11, 2015
1 parent 6a6065d commit 56582bc
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 66 deletions.
18 changes: 8 additions & 10 deletions src/main/resources/hudson/plugins/mstest/mstest-to-junit.xsl
Expand Up @@ -47,11 +47,10 @@
</xsl:if>
<xsl:if test="$message or $stacktrace">
<failure>
MESSAGE:
<xsl:value-of select="$message" />
+++++++++++++++++++
STACK TRACE:
<xsl:value-of select="$stacktrace" />
<xsl:if test="$message">
<xsl:attribute name="message"><xsl:value-of select="$message" /></xsl:attribute>
</xsl:if>
<xsl:value-of select="$stacktrace" />
</failure>
</xsl:if>
</testcase>
Expand Down Expand Up @@ -94,11 +93,10 @@ STACK TRACE:

<xsl:if test="$message or $stacktrace">
<failure>
MESSAGE:
<xsl:value-of select="$message" />
+++++++++++++++++++
STACK TRACE:
<xsl:value-of select="$stacktrace" />
<xsl:if test="$message">
<xsl:attribute name="message"><xsl:value-of select="$message" /></xsl:attribute>
</xsl:if>
<xsl:value-of select="$stacktrace" />
</failure>
</xsl:if>
</testcase>
Expand Down
Expand Up @@ -3,11 +3,7 @@
<testsuite name="MSTestSuite" tests="2" time="0" failures="1" errors="0" skipped="0">
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci" time="0.0157226"/>
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci_2" time="0.1007273">
<failure>
MESSAGE:
Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.
+++++++++++++++++++
STACK TRACE:
<failure message="Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.">
at FunctionsTest.FibonacciTest.CalculaFibonacci_2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\FibonacciTest.cs:line 72
</failure>
</testcase>
Expand Down
Expand Up @@ -2,12 +2,8 @@
<testsuites xmlns:a="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
<testsuite name="MSTestSuite" tests="2" time="0" failures="1" errors="0" skipped="0">
<testcase classname="GoodGuyTest.GoodGuyTest" name="TestYell" time="0.0437026">
<failure>
MESSAGE:
Assert.AreEqual failed. Expected:&lt;lala!&gt;. Actual:&lt;Lele!!&gt;.
+++++++++++++++++++
STACK TRACE:
at GoodGuyTest.GoodGuyTest.TestYell() in C:\PostIt\MultipleTests\GoodGuyTest\GoodGuyTest.cs:line 16
<failure message="
Assert.AreEqual failed. Expected:&lt;lala!&gt;. Actual:&lt;Lele!!&gt;.">at GoodGuyTest.GoodGuyTest.TestYell() in C:\PostIt\MultipleTests\GoodGuyTest\GoodGuyTest.cs:line 16
</failure>
</testcase>
<testcase classname="ProjectNumberOneTest.BoringGuyTest" name="TestYell" time="0.0230074"/>
Expand Down
Expand Up @@ -2,22 +2,12 @@
<testsuite name="MSTestSuite" tests="4" time="0" failures="2" errors="0" skipped="0">
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci" time="0.0038577"/>
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci_2" time="0.035657">
<failure>
MESSAGE:
Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.
+++++++++++++++++++
STACK TRACE:
at FunctionsTest.FibonacciTest.CalculaFibonacci_2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\FibonacciTest.cs:line 72
<failure message="Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.">at FunctionsTest.FibonacciTest.CalculaFibonacci_2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\FibonacciTest.cs:line 72
</failure>
</testcase>
<testcase classname="FunctionsTest.SpecialCharRemoverTest" name="RemoveSpecialChar" time="0.0010439"/>
<testcase classname="FunctionsTest.SpecialCharRemoverTest" name="REmoveSpecialChar2" time="0.000883">
<failure>
MESSAGE:
Assert.AreEqual failed. Expected:&lt;pao&gt;. Actual:&lt;paao&gt;.
+++++++++++++++++++
STACK TRACE:
at FunctionsTest.SpecialCharRemoverTest.REmoveSpecialChar2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\SpecialCharRemoverTest.cs:line 76
<failure message="Assert.AreEqual failed. Expected:&lt;pao&gt;. Actual:&lt;paao&gt;.">at FunctionsTest.SpecialCharRemoverTest.REmoveSpecialChar2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\SpecialCharRemoverTest.cs:line 76
</failure>
</testcase>
</testsuite>
Expand Down
Expand Up @@ -3,11 +3,7 @@
<testsuite name="MSTestSuite" tests="2" time="0" failures="1" errors="0" skipped="0">
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci" time="130.0157226"/>
<testcase classname="FunctionsTest.FibonacciTest" name="CalculaFibonacci_2" time="0.1007273">
<failure>
MESSAGE:
Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.
+++++++++++++++++++
STACK TRACE:
<failure message="Assert.AreEqual failed. Expected:&lt;2&gt;. Actual:&lt;1&gt;.">
at FunctionsTest.FibonacciTest.CalculaFibonacci_2() in E:\Koiti\Dev\GitHudsonTest\FunctionsTest\FibonacciTest.cs:line 72
</failure>
</testcase>
Expand Down
@@ -1,28 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?><testsuites xmlns:b="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" xmlns:a="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
<testsuite name="MSTestSuite" tests="3" time="0" failures="0" errors="3" skipped="0">
<testcase classname="LindbergCorp.StringFileTranslator.Test.TranslatorTests" name="TestConversion">
<failure>
MESSAGE:
Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters.
+++++++++++++++++++
STACK TRACE:
</failure>
<failure message="Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters."/>
</testcase>
<testcase classname="LindbergCorp.StringFileTranslator.Test.TranslatorTests" name="TestConversionFrench">
<failure>
MESSAGE:
Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters.
+++++++++++++++++++
STACK TRACE:
</failure>
<failure message="Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters."/>
</testcase>
<testcase classname="LindbergCorp.StringFileTranslator.Test.TranslatorTests" name="TestFileNotFound">
<failure>
MESSAGE:
Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters.
+++++++++++++++++++
STACK TRACE:
</failure>
<failure message="Method LindbergCorp.StringFileTranslator.Test.TranslatorTests.TestFixtureSetup has wrong signature. The method should have 1 parameters."/>
</testcase>
</testsuite>
</testsuites>
6 changes: 1 addition & 5 deletions src/test/resources/hudson/plugins/mstest/mstest_vs_2010.xml
Expand Up @@ -3,11 +3,7 @@
<testsuite name="MSTestSuite" tests="2" time="0" failures="1" errors="0" skipped="0">
<testcase classname="TestProject1.UnitTest1" name="TestMethod1" time="0.018195" />
<testcase classname="TestProject1.UnitTest1" name="TestMethod2" time="0.1018105">
<failure>
MESSAGE:
Assert.Fail failed.
+++++++++++++++++++
STACK TRACE:
<failure message="Assert.Fail failed.">
at TestProject1.UnitTest1.TestMethod2() in c:\users\carlos\documents\visual studio 2010\Projects\TestProject1\TestProject1\UnitTest1.cs:line 71
</failure>
</testcase>
Expand Down
6 changes: 1 addition & 5 deletions src/test/resources/hudson/plugins/mstest/mstest_vs_2012.xml
Expand Up @@ -3,11 +3,7 @@
<testsuite name="MSTestSuite" tests="2" time="0" failures="1" errors="0" skipped="0">
<testcase classname="TestProject1.UnitTest1" name="TestMethod1" time="0.018195" />
<testcase classname="TestProject1.UnitTest1" name="TestMethod2" time="0.1018105">
<failure>
MESSAGE:
Assert.Fail failed.
+++++++++++++++++++
STACK TRACE:
<failure message="Assert.Fail failed.">
at TestProject1.UnitTest1.TestMethod2() in c:\users\carlos\documents\visual studio 2010\Projects\TestProject1\TestProject1\UnitTest1.cs:line 71
</failure>
</testcase>
Expand Down

0 comments on commit 56582bc

Please sign in to comment.