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

JUnit Details view is broken if results contains duplicate test names

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Platform: PC, OS: All

      Junit 3 test could fail in two different ways: failures and errors. Seems that
      Hudson's test reporter plug-in doesn't support the failure type anymore.

      Hudson correctly reports a failure. But after clicking on the details Hudson
      reports that the test is passed.

      If I manually change the XML failure tag to error then everything is ok. See
      Screenshot.

      (Hudson 1.252)

          [JENKINS-2310] JUnit Details view is broken if results contains duplicate test names

          Ulli Hafner added a comment -

          Created an attachment (id=365)
          Details of the failed test (failure)

          Ulli Hafner added a comment - Created an attachment (id=365) Details of the failed test (failure)

          Ulli Hafner added a comment -

          Created an attachment (id=366)
          Overview

          Ulli Hafner added a comment - Created an attachment (id=366) Overview

          Ulli Hafner added a comment -

          Created an attachment (id=367)
          Surefire Results File

          Ulli Hafner added a comment - Created an attachment (id=367) Surefire Results File

          Ulli Hafner added a comment -

          I investigated this bug in more details: seems that Hudson references Unit tests
          by the class name. If you have several tests with the same name (but in a
          different module), then Hudson correctly shows the failures but when clicking
          the details sometimes the wrong "ok" result is picked.

          We have 20 maven modules each of them has the same Unit test to scan for package
          cycles:

          <testcase classname="com.avaloq.util.BuildCycleTestCase" name="testForCycles"
          time="0.485">
          <failure message="Cycles exist [...]

          As a workaround, I'll try to change the name of the tests programatically. So if
          you like to close this issue that is ok for me (there might be some problems for
          other users, though...)

          Ulli Hafner added a comment - I investigated this bug in more details: seems that Hudson references Unit tests by the class name. If you have several tests with the same name (but in a different module), then Hudson correctly shows the failures but when clicking the details sometimes the wrong "ok" result is picked. We have 20 maven modules each of them has the same Unit test to scan for package cycles: <testcase classname="com.avaloq.util.BuildCycleTestCase" name="testForCycles" time="0.485"> <failure message="Cycles exist [...] As a workaround, I'll try to change the name of the tests programatically. So if you like to close this issue that is ok for me (there might be some problems for other users, though...)

          Ulli Hafner added a comment -

          Duplicate

              • This issue has been marked as a duplicate of 2184 ***

          Ulli Hafner added a comment - Duplicate This issue has been marked as a duplicate of 2184 ***

            Unassigned Unassigned
            drulli Ulli Hafner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: