Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-943

Failing tests in TEST-*.xml file contain currupt information

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.13
    • 2.14
    • Maven Surefire Plugin
    • None

    Description

      I have test classes with two test methods: one is test() (always passes), the other one is fails() (well, it is supposed to fail).

      This is the output in the TEST-*.xml file:

        <testcase time="0.502" classname="org.sample.module.My1Test" name="org.sample.module.My1Test"/>
        <testcase time="0.503" classname="Description" name="fails">
          <failure message="Not yet implemented" type="java.lang.AssertionError">java.lang.AssertionError: Not yet implemented
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.sample.module.My1Test.fails(My1Test.java:25)
      </failure>
        </testcase>
      

      Problem 1: for the successful testcase the name is also the class name and not the name of the test case? I would expect test, as this is the method name.

      Problem 2 (that's the big one): the failed test contains "Description" as classname. That totally messes up my Hudson report and is a deal-breaker for the 2.13 version. I did not see that during the test of the staged version .

      I used the junit47 provider and junit 4.11.

      I'll prepare a sample or an IT for that later.

      Attachments

        1. SUREFIRE-943.patch
          9 kB
          Andreas Gudian

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              agudian Andreas Gudian
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: