Skip to content
Permalink
Browse files

[JENKINS-51561] xUnit plugin fails to parse NUnit 2 report format gen…

…erated by NUnit 3.6.0.0

Fix parse of nunit-version attribute to decide how to compose testcase classname and name.
  • Loading branch information...
Nikolas Falco
Nikolas Falco committed Jun 6, 2018
1 parent 5149c4e commit 363735d31c94858cbfc4fc8811854465da2d86f3
@@ -69,7 +69,7 @@ THE SOFTWARE.
<xsl:variable name="nunitVersion">
<xsl:choose>
<xsl:when test="/test-results/environment">
<xsl:analyze-string regex="(2\.\d+)" select="/test-results/environment/@nunit-version">
<xsl:analyze-string regex="^(\d+\.\d+)" select="/test-results/environment/@nunit-version">
<xsl:matching-substring>
<xsl:value-of select="regex-group(1)" />
</xsl:matching-substring>
@@ -46,8 +46,9 @@
{ "Sample provided by http://nunit.org/files/testresult_25.txt", 8 }, //
{ "Sample provided by the 2.4.8 distribution", 9 }, //
{ "JENKINS-51481 report produced by DUnit to NUnit logger", 10 }, //
{ "JENKINS-JENKINS-51556 works", 11 }, //
{ "JENKINS-JENKINS-51556 cause JEP-200 issue", 12 } //
{ "JENKINS-51556 works", 11 }, //
{ "JENKINS-51556 cause JEP-200 issue", 12 }, //
{ "JENKINS-51561 NUnit 3.x produce report in NUnit 2.x format", 13 } //
});
}

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="C:\jks\ws\Classic-AMIS_2.50.X_Build\Classic-AMIS-AmisTM7\TMService.UnitTests\bin\Debug\TMService.UnitTests.dll" total="15" errors="0" failures="0" not-run="3" inconclusive="0" ignored="3" skipped="0" invalid="0" date="2018-05-28" time="07:57:25">
<environment nunit-version="3.6.0.0" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 6.3.9600.0" platform="Win32NT" cwd="C:\jks\ws\Classic-AMIS_2.50.X_Build\Classic-AMIS-AmisTM7\target" machine-name="CHDEV1074" user="SRV_Jenkins" user-domain="INTERN" />
<culture-info current-culture="nb-NO" current-uiculture="en-US" />
<test-suite type="Assembly" name="C:\jks\ws\Classic-AMIS_2.50.X_Build\Classic-AMIS-AmisTM7\TMService.UnitTests\bin\Debug\TMService.UnitTests.dll" executed="True" result="Success" success="True" time="2.019" asserts="0">
<properties>
<property name="_PID" value="6892" />
<property name="_APPDOMAIN" value="domain-" />
</properties>
<results>
<test-suite type="Namespace" name="TMService" executed="True" result="Success" success="True" time="2.006" asserts="0">
<results>
<test-suite type="Namespace" name="UnitTests" executed="True" result="Success" success="True" time="2.006" asserts="0">
<results>
<test-suite type="TestFixture" name="ServiceCompositionTests" executed="True" result="Success" success="True" time="1.859" asserts="0">
<results>
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetAllSpringObjects" executed="True" result="Success" success="True" time="1.768" asserts="0" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_AmisAvailabilityTimerSeconds" executed="True" result="Success" success="True" time="0.009" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_IntegrityCheckTimeSpanSeconds" executed="True" result="Success" success="True" time="0.009" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_OperationalStatusEnableAutomaticDistanceHandling" executed="True" result="Success" success="True" time="0.007" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_SendAmisAvailabilityMessage" executed="True" result="Success" success="True" time="0.016" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_SyncOnlyAvailableResources" executed="True" result="Success" success="True" time="0.005" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.CanGetSettingsProperty_UserId" executed="True" result="Success" success="True" time="0.005" asserts="1" />
<test-case name="TMService.UnitTests.ServiceCompositionTests.ShouldBeAbleToGetWorkingPosition" executed="True" result="Success" success="True" time="0.015" asserts="1" />
</results>
</test-suite>
<test-suite type="TestFixture" name="TMServiceSettingsTests" executed="True" result="Success" success="True" time="0.133" asserts="0">
<results>
<test-case name="TMService.UnitTests.TMServiceSettingsTests.CanGetAllSpringObjects" executed="True" result="Success" success="True" time="0.099" asserts="0" />
<test-case name="TMService.UnitTests.TMServiceSettingsTests.CanGetSettingsObject" executed="True" result="Success" success="True" time="0.008" asserts="1" />
<test-case name="TMService.UnitTests.TMServiceSettingsTests.ShouldBeAbleToGetInstanceFromComposition" executed="True" result="Success" success="True" time="0.015" asserts="1" />
<test-case name="TMService.UnitTests.TMServiceSettingsTests.ShouldBeAbleToGetWorkingPosition" executed="True" result="Success" success="True" time="0.002" asserts="1" />
</results>
</test-suite>
<test-suite type="TestFixture" name="TMServiceTests" executed="True" result="Inconclusive" success="False" time="0.007" asserts="0">
<results>
<test-case name="TMService.UnitTests.TMServiceTests.ShouldBeAbleToInitializeHendelseHelper" executed="False" result="Ignored">
<properties>
<property name="_IGNOREREASON" value="" />
</properties>
<reason>
<message><![CDATA[]]></message>
</reason>
</test-case>
<test-case name="TMService.UnitTests.TMServiceTests.ShouldBeAbleToInitializeRessursHelper" executed="False" result="Ignored">
<properties>
<property name="_IGNOREREASON" value="" />
</properties>
<reason>
<message><![CDATA[]]></message>
</reason>
</test-case>
<test-case name="TMService.UnitTests.TMServiceTests.ShouldBeAbleToInitializeRessursTeamHelper" executed="False" result="Ignored">
<properties>
<property name="_IGNOREREASON" value="" />
</properties>
<reason>
<message><![CDATA[]]></message>
</reason>
</test-case>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="TMService.UnitTests.ServiceCompositionTests" tests="8" failures="0" errors="0" skipped="0" time="1.859">
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetAllSpringObjects" time="1.768" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_AmisAvailabilityTimerSeconds" time="0.009" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_IntegrityCheckTimeSpanSeconds" time="0.009" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_OperationalStatusEnableAutomaticDistanceHandling" time="0.007" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_SendAmisAvailabilityMessage" time="0.016" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_SyncOnlyAvailableResources" time="0.005" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="CanGetSettingsProperty_UserId" time="0.005" />
<testcase classname="TMService.UnitTests.ServiceCompositionTests" name="ShouldBeAbleToGetWorkingPosition" time="0.015" />
</testsuite>
<testsuite name="TMService.UnitTests.TMServiceSettingsTests" tests="4" failures="0" errors="0" skipped="0" time="0.133">
<testcase classname="TMService.UnitTests.TMServiceSettingsTests" name="CanGetAllSpringObjects" time="0.099" />
<testcase classname="TMService.UnitTests.TMServiceSettingsTests" name="CanGetSettingsObject" time="0.008" />
<testcase classname="TMService.UnitTests.TMServiceSettingsTests" name="ShouldBeAbleToGetInstanceFromComposition" time="0.015" />
<testcase classname="TMService.UnitTests.TMServiceSettingsTests" name="ShouldBeAbleToGetWorkingPosition" time="0.002" />
</testsuite>
<testsuite name="TMService.UnitTests.TMServiceTests" tests="3" failures="0" errors="0" skipped="3" time="0.007">
<testcase classname="TMService.UnitTests.TMServiceTests" name="ShouldBeAbleToInitializeHendelseHelper">
<skipped />
</testcase>
<testcase classname="TMService.UnitTests.TMServiceTests" name="ShouldBeAbleToInitializeRessursHelper">
<skipped />
</testcase>
<testcase classname="TMService.UnitTests.TMServiceTests" name="ShouldBeAbleToInitializeRessursTeamHelper">
<skipped />
</testcase>
</testsuite>
</testsuites>

0 comments on commit 363735d

Please sign in to comment.
You can’t perform that action at this time.