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

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated: