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

Testresult doesn't show test name in case the package is empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.652
      XUnit Plugin and a few others, but not related to this
      Windows 8
      Chrome / Mozilla / Firefox newest versions
      Plugins all up to date
    • Similar Issues:

      Description

      Under Test Results it shows like this:

      I See every Test that has run, but no Testnames, so i dont know which Test actually failed/succeed/skipped.

      The Result XML that gets generated looks good and shows me the Testnames + Results like expected

      <?xml version="1.0" encoding="utf-8"?>
      <assemblies>
        <assembly name="xyz" environment="32-bit .NET 4.0.30319.42000 [collection-per-class, parallel (8 threads)]" test-framework="xUnit.net 2.1.0.3179" run-date="2016-02-29" run-time="10:17:15" config-file="xyz" total="4" passed="2" failed="0" skipped="2" time="46.081" errors="0">
          <errors />
          <collection total="4" passed="2" failed="0" skipped="2" name="xyz" time="45.641">
            <test name="CashFactorSetInValidValues" type="XUnit_DataManager_Tests.DataManagerGuiGeneral" method="CashFactorSetInValidValues" time="22.7359448" result="Pass">
              <traits>
                <trait name="DataManager" value="General" />
                <trait name="General" value="CashFactor" />
              </traits>
            </test>
            <test name="TestCurrencySetAll" type="XUnit_DataManager_Tests.DataManagerGuiGeneral" method="TestCurrencySetAll" time="0" result="Skip">
              <traits>
                <trait name="DataManager" value="General" />
                <trait name="General" value="Currency" />
              </traits>
              <reason><![CDATA[Eine Ausnahme vom Typ "Xunit.SkipException" wurde ausgelöst.]]></reason>
            </test>
            <test name="TestCurrencyAllAvailable" type="XUnit_DataManager_Tests.DataManagerGuiGeneral" method="TestCurrencyAllAvailable" time="0" result="Skip">
              <traits>
                <trait name="DataManager" value="General" />
                <trait name="General" value="Currency" />
              </traits>
              <reason><![CDATA[Eine Ausnahme vom Typ "Xunit.SkipException" wurde ausgelöst.]]></reason>
            </test>
            <test name="CashfactorSetValidValues" type="XUnit_DataManager_Tests.DataManagerGuiGeneral" method="CashfactorSetValidValues" time="14.8607297" result="Pass">
              <traits>
                <trait name="DataManager" value="General" />
                <trait name="General" value="CashFactor" />
              </traits>
            </test>
          </collection>
        </assembly>
      </assemblies>
      

      I am using the new SkippableFact Library from XUnit, that allows to use [SkippableFact] rather than [Fact]. All this SkippableFacts doesnt show testnames in the execution of a jenkins build.

      Not sure about the Priority, as it doesnt really block us, we get the Results, but it is very confusing and we only see the real Result in the XML that gets generated.

        Attachments

          Activity

          Hide
          dlemberger Dominik Lemberger added a comment -

          Tested it to publish a NUnit xml with the xunit console runner -nunit index.xml and this works fine. So the problem exists with the xunit xml format only

          Show
          dlemberger Dominik Lemberger added a comment - Tested it to publish a NUnit xml with the xunit console runner -nunit index.xml and this works fine. So the problem exists with the xunit xml format only
          Hide
          a_zen a_zen added a comment - - edited

          I also run into this problem. Unfortunately going to NUnit is no option for me.

          The problems occurs because the test name is only the name and doesn't contain the full package name as well.

          I fixed the problem in the xlt and created a pull request here:

           

          https://github.com/jenkinsci/xunit-plugin/pull/54

           

          This fixed the problem for  me.

           

          Gregory Boissinot can you please merge my changes and release a new version?

           

          Thx.

          Show
          a_zen a_zen added a comment - - edited I also run into this problem. Unfortunately going to NUnit is no option for me. The problems occurs because the test name is only the name and doesn't contain the full package name as well. I fixed the problem in the xlt and created a pull request here:   https://github.com/jenkinsci/xunit-plugin/pull/54   This fixed the problem for  me.   Gregory Boissinot can you please merge my changes and release a new version?   Thx.
          Hide
          a_zen a_zen added a comment -

          Any update on this? The plugin is running stable with my changes since over 1 month.

          Show
          a_zen a_zen added a comment - Any update on this? The plugin is running stable with my changes since over 1 month.
          Hide
          nfalco Nikolas Falco added a comment -

          Thank Alex for the PR #54

          Show
          nfalco Nikolas Falco added a comment - Thank Alex for the PR #54
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jonathan Miller
          Path:
          src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit-2.xsl
          http://jenkins-ci.org/commit/xunit-plugin/8656468467370dbecedd22dfbb878050e32107cb
          Log:
          JENKINS-33385 Testresult doesn't show test name in case the package is
          empty

          Use a better XSL test condition

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jonathan Miller Path: src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit-2.xsl http://jenkins-ci.org/commit/xunit-plugin/8656468467370dbecedd22dfbb878050e32107cb Log: JENKINS-33385 Testresult doesn't show test name in case the package is empty Use a better XSL test condition

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              dlemberger Dominik Lemberger
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: