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

Nunit plugin unable to display test results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: nunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins version 2.7.2, NUnit-plugin 0.17
    • Similar Issues:

      Description

      Nunit plugin unable to display test results. The results show up blank (empty.png). Please use the xml file (TestResults (1).xml) to replicate the issue.

        Attachments

          Activity

          Hide
          alanhinton Alan Hinton added a comment -

          I had a similar problem.

          After a lot of investigation I found that if the first test-case in a test-suite had a bracket '(' in its name then that whole test-suite would not show up in Jenkins. The same problem would not show up if the offending name occurred in a subsequent test-case but not the first one.

          This is particularly problematical if you use xUnit.net with Theories because the tests will always have names of the form:

          Test name(data: some data)

          As a work around you can add a test with a non-offending name but the order the tests are written to the file by xUnit.net seems to be somewhat non-deterministic.

          Show
          alanhinton Alan Hinton added a comment - I had a similar problem. After a lot of investigation I found that if the first test-case in a test-suite had a bracket '(' in its name then that whole test-suite would not show up in Jenkins. The same problem would not show up if the offending name occurred in a subsequent test-case but not the first one. This is particularly problematical if you use xUnit.net with Theories because the tests will always have names of the form: Test name(data: some data) As a work around you can add a test with a non-offending name but the order the tests are written to the file by xUnit.net seems to be somewhat non-deterministic.
          Hide
          slide_o_mix Alex Earl added a comment -

          This looks to be an issue in the way the names of the testsuites are determined:

           

          <xsl:variable name="firstTestName"
             select="results//test-case[1]//@name" />
                           
          <xsl:variable name="assembly">
              <xsl:choose>
                  <xsl:when test="substring($firstTestName, string-length($firstTestName)) = ')'">
                      <xsl:value-of select="substring-before($firstTestName, concat('.', @name))"></xsl:value-of>
                  </xsl:when>
                  <xsl:otherwise>
                      <xsl:value-of select="concat(substring-before($firstTestName, @name), @name)" />
                  </xsl:otherwise>
              </xsl:choose>
          </xsl:variable>

          The "assembly" variable ends up being empty for some reason (need to debug it still), so no junit files are correctly generated. I am looking into how the names are generated to see if I can tidy some of this up.

           

          Show
          slide_o_mix Alex Earl added a comment - This looks to be an issue in the way the names of the testsuites are determined:   <xsl:variable name= "firstTestName" select= "results //test- case [1]//@name" /> <xsl:variable name= "assembly" > <xsl:choose> <xsl:when test= "substring($firstTestName, string-length($firstTestName)) = ')' " > <xsl:value-of select= "substring-before($firstTestName, concat( '.' , @name))" ></xsl:value-of> </xsl:when> <xsl:otherwise> <xsl:value-of select= "concat(substring-before($firstTestName, @name), @name)" /> </xsl:otherwise> </xsl:choose> </xsl:variable> The "assembly" variable ends up being empty for some reason (need to debug it still), so no junit files are correctly generated. I am looking into how the names are generated to see if I can tidy some of this up.  

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevinsbk Kevin Hsu
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: