• 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>
      </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

          [JENKINS-55907] NUnit3 fails when SetUpFixture feature is used

          Nikolas Falco added a comment -

          Could you attach a nunit test report?

          Nikolas Falco added a comment - Could you attach a nunit test report?

          Mark Hermon added a comment -

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

          Mark Hermon added a comment - I created a mock project that replicates the issue, and have attached the report from that.

          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).

          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).

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

              Created:
              Updated:
              Resolved: