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

NUnit3 fails when SetUpFixture feature is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      xUnit Plugin 2.2.5
    • Similar Issues:
    • Released As:
      2.3.2

      Description

      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>
      </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>
          </test-suite>
      </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

        Attachments

          Issue Links

            Activity

            Hide
            nfalco79 Nikolas Falco added a comment -

            Could you attach a nunit test report?

            Show
            nfalco79 Nikolas Falco added a comment - Could you attach a nunit test report?
            Hide
            mark_h Mark Hermon added a comment -

            I created a mock project that replicates the issue, and have attached the report from that.

            Show
            mark_h Mark Hermon added a comment - I created a mock project that replicates the issue, and have attached the report from that.
            Hide
            nfalco Nikolas Falco added a comment -

            XSLT rewritten to suport the same cases in NUnit 2.x (ParameterizedMethod, categories and bettern junit report in case of failure, error or skipped).

            Show
            nfalco Nikolas Falco added a comment - XSLT rewritten to suport the same cases in NUnit 2.x (ParameterizedMethod, categories and bettern junit report in case of failure, error or skipped).

              People

              Assignee:
              nfalco Nikolas Falco
              Reporter:
              mark_h Mark Hermon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: