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

Wrong set classname in a test result xml on test failure (regression in 2.13)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.13
    • None
    • None
    • surefire 2.13, junit 4.11, openjdk 1.7.0.9

    Description

      On test failure in JUnit test in a generated XML for a test suite there is a classname for a test case set to "Description" instead of full class package name (it doesn't look good in tools processing test results like Sonar).

      For example:
      success:

        <testcase time="0.02" classname="info.solidsoft.rnd.javagroovy.pit.TestDummyForPitSpockTest" name="info.solidsoft.rnd.javagroovy.pit.TestDummyForPitSpockTest"/>
      

      vs. failure:

        <testcase time="0.143" classname="Description" name="should generate coverage for return3Spock method in TestDummyForPit">
          <failure message="Condition not satisfied:
      (...)
      </failure>
        </testcase>
      

      (btw, there is a missing indention on closing failure tag on failure)

      How to reproduce?
      1. git clone git://github.com/szpak/code-examples-and-poc.git
      2. Break assertion in TestDummyForPitTest or TestDummyForPitSpockTest class in parametrized-spock-pit-poc project
      2. cd parametrized-spock-pit-poc; mvn package
      3. Browse target/surefire-reports/TEST-info.solidsoft.rnd.javagroovy.pit.TestDummyForPitTest.xml looking for a classname

      It works fine with 2.12.4.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            krosenvold Kristian Rosenvold
            szpak Marcin Zajaczkowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment