Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55907

NUnit3 fails when SetUpFixture feature is used


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • xunit-plugin
    • None
    • xUnit Plugin 2.2.5
    • 2.3.2

      When NUnit Tests are run with a [SetupFixture] class, the results XML file is structured a bit differently.

      Normally it looks like:

      <test-suite type="TestSuite" ...>
          <test-suite type="TestFixture ...>...</test-suite>

      but with [SetupFixture] in the mix, it looks like:

      <test-suite type="TestSuite" ...>
          <test-suite type="SetUpFixture ...>
              <test-suite type="TestFixture ...>...</test-suite>

      Since the xsl file looks for (as far as I can tell) @type=TestFixture directly under @Type=TestSuite, it misses anything with @type=SetUpFixture in between. Taken from nunit-3.0-to-junit.xsl, line 60,61:

                  <xsl:for-each select="//test-suite[@type='TestSuite']">
                      <xsl:for-each select="test-suite[@type='TestFixture']">

      To reproduce it, create a TestAssembly with a SetupFixtureAttribute

            nfalco Nikolas Falco
            mark_h Mark Hermon
            0 Vote for this issue
            3 Start watching this issue