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

Not all failure cases reported in JUnit test result report

    Details

    • Similar Issues:

      Description

      Hi,
      JUnit allows to collect multiple test failures, eg. using ErrorCollector rule. But JUnit Plugin reports only first failure.

      For example test result may looks like this:

      ...
      <testcase classname="com.SomeTestClass" name="someTestName" time="7.718">
        <failure message="Some error 1 message" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Some error 1 message
          at Some failure 1 stack trace...
        </failure>
        <failure message="Some error 2 message" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Some error 2 message
          at Some failure 2 stack trace...
        </failure>
      </testcase>
      ...
      

      From above snippet only "Some error 1 message" will be reported, junitResults.xml:

      ...
      <case>
        <duration>7.718</duration>
        <className>com.SomeTestClass</className>
        <testName>someTestName</testName>
        <skipped>false</skipped>
        <errorStackTrace>junit.framework.AssertionFailedError: Some error 1 message
          at Some failure 1 stack trace...
        </errorStackTrace>
        <errorDetails>Some error 1 message</errorDetails>
        <failedSince>0</failedSince>
      </case>
      ..
      

      Is it possible for JUnit Plugin to report all failures?

        Attachments

          Activity

          Hide
          fun4jimmy James Whitworth added a comment - - edited

          Is this not being looked at because there are objections to modifying the JUnit plugin to support multiple failures or just because it's low priority and there's no one available to do the work required?

          Show
          fun4jimmy James Whitworth added a comment - - edited Is this not being looked at because there are objections to modifying the JUnit plugin to support multiple failures or just because it's low priority and there's no one available to do the work required?

            People

            • Assignee:
              Unassigned
              Reporter:
              abeben Adam Beben
            • Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: