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

TEST-*.xml files generated by Surefire are invalid

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.19.1
    • Fix Version/s: 2.20
    • Component/s: Maven Surefire Plugin
    • Labels:
      None

      Description

      See SUREFIRE-964 as well. The XML produced is invalid because schemaLocation must include two URIs, as outlined in xmlschema-1.

      Because of this, the Xerces parser fails in the Jenkins XUnit plugin and e.g. IntelliJ is not able to parse the file correctly.

      Suggested solution is to replace xsi:schemaLocation by xsi:noNamespaceSchemaLocation, which fixes this for the Unit plugin as well the file is parseable by IntelliJ.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          Thanks for the hard work, congratz on the 2.20 release !

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 Thanks for the hard work, congratz on the 2.20 release !
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @jonenst you can have a look in this branch if you want to

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @jonenst you can have a look in this branch if you want to [new branch] SUREFIRE-1322 -> apache/ SUREFIRE-1322
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @jonenst I am still recovering the plugin. I would like to invite you to make code review if you like.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @jonenst I am still recovering the plugin. I would like to invite you to make code review if you like.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 thanks for sharing. Your work is much appreciated. I hope everything works out with this person.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 thanks for sharing. Your work is much appreciated. I hope everything works out with this person.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @jonenst
          I was about to finish the last one and suddenly we had internal collision and now we reverted 11 commits. I am going to fix them but the procedure will be that we have to create branch for each cherry pick, make code review and then merge with master. I don't want to blame anyone in ASF so I will rather work now and make you happy.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @jonenst I was about to finish the last one and suddenly we had internal collision and now we reverted 11 commits. I am going to fix them but the procedure will be that we have to create branch for each cherry pick, make code review and then merge with master. I don't want to blame anyone in ASF so I will rather work now and make you happy.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          Hi @Tibor17
          "54 of 55 issues have been resolved" on the roadmap, when can we expect a release ...?
          Is there something I can do to help with the release ?
          Cheers,
          Jon

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 Hi @Tibor17 "54 of 55 issues have been resolved" on the roadmap, when can we expect a release ...? Is there something I can do to help with the release ? Cheers, Jon
          Hide
          grfield Gary Field added a comment -

          Hi @Tibor17. Any ETA on the release of 2.19.2, as it has been over a year now? Unable to move to JUnit 5 M3 due to this bug. Anything specific preventing you releasing it? Thanks.

          Show
          grfield Gary Field added a comment - Hi @Tibor17. Any ETA on the release of 2.19.2, as it has been over a year now? Unable to move to JUnit 5 M3 due to this bug. Anything specific preventing you releasing it? Thanks.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          Hi @Tibor17, congratulations on the progress, 42/43 issues fixed. Any idea of the release date ? Cheers.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 Hi @Tibor17, congratulations on the progress, 42/43 issues fixed. Any idea of the release date ? Cheers.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @jonenst
          Next week on Friday it should be already in Maven Central.
          See the raod map [1]. We have last issue in good progress with 100% coverage of stream encoder and the only decoder is missing. I can push a new pull request to see the progress or commit directly.
          [1] https://issues.apache.org/jira/browse/SUREFIRE/?selectedTab=com.atlassian.jira.jira-projects-plugin:roadmap-panel

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @jonenst Next week on Friday it should be already in Maven Central. See the raod map [1] . We have last issue in good progress with 100% coverage of stream encoder and the only decoder is missing. I can push a new pull request to see the progress or commit directly. [1] https://issues.apache.org/jira/browse/SUREFIRE/?selectedTab=com.atlassian.jira.jira-projects-plugin:roadmap-panel
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 Hi, thanks for the releases. Any idea of the release date ? Cheers.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 Hi, thanks for the releases. Any idea of the release date ? Cheers.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @justinharringa
          Yes fixing the critical issues is never ending story.
          I will release 2.19.2 and 2.19.3 later.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @justinharringa Yes fixing the critical issues is never ending story. I will release 2.19.2 and 2.19.3 later.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jonenst commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 Hi, thanks for working on this. I'm also waiting for the release. Cheers.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jonenst commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 Hi, thanks for working on this. I'm also waiting for the release. Cheers.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stdweird commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 i almost don't dare to ask, but is there any release coming up with this fix?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stdweird commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 i almost don't dare to ask, but is there any release coming up with this fix?
          Hide
          benno.markiewicz+dev@googlemail.com Benno Markiewicz added a comment -

          FYI: NetBeans IDE has also troubles integrating the test result using 2.19.1 https://netbeans.org/bugzilla/show_bug.cgi?id=257563

          Show
          benno.markiewicz+dev@googlemail.com Benno Markiewicz added a comment - FYI: NetBeans IDE has also troubles integrating the test result using 2.19.1 https://netbeans.org/bugzilla/show_bug.cgi?id=257563
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user justinharringa commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          Cool. Thanks for the update @Tibor17!

          Show
          githubbot ASF GitHub Bot added a comment - Github user justinharringa commented on the issue: https://github.com/apache/maven-surefire/pull/110 Cool. Thanks for the update @Tibor17!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @justinharringa
          We are close to cut release version 2.19.2. Only 2 issues are still open and other critical/blocker issues must be fixed in 2.19.3.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 @justinharringa We are close to cut release version 2.19.2. Only 2 issues are still open and other critical/blocker issues must be fixed in 2.19.3.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user justinharringa commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 I'm also broken on this.

          Show
          githubbot ASF GitHub Bot added a comment - Github user justinharringa commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 I'm also broken on this.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stdweird commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          @Tibor17 is there and ETA for 2.19.2?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stdweird commented on the issue: https://github.com/apache/maven-surefire/pull/110 @Tibor17 is there and ETA for 2.19.2?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          I will start release 2.19.2 with this fix.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the issue: https://github.com/apache/maven-surefire/pull/110 I will start release 2.19.2 with this fix.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stdweird commented on the issue:

          https://github.com/apache/maven-surefire/pull/110

          is there any ETA for a release with this fix? or should i try to patch the local `.m2` cache?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stdweird commented on the issue: https://github.com/apache/maven-surefire/pull/110 is there any ETA for a release with this fix? or should i try to patch the local `.m2` cache?
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in maven-surefire #1552 (See https://builds.apache.org/job/maven-surefire/1552/)
          SUREFIRE-1216: TEST-*.xml files generated by Surefire are invalid. (mfriedenhagen: rev 536f5c621ca55f05df295f64a69eca8b1056db14)

          • maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in maven-surefire #1552 (See https://builds.apache.org/job/maven-surefire/1552/ ) SUREFIRE-1216 : TEST-*.xml files generated by Surefire are invalid. (mfriedenhagen: rev 536f5c621ca55f05df295f64a69eca8b1056db14) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/maven-surefire/pull/110

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/maven-surefire/pull/110
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the pull request:

          https://github.com/apache/maven-surefire/pull/110#issuecomment-170285026

          Feel free to push it to master. I will then update a branch 3.0-rc1.
          You can then close it in jira.
          If you have time we would need to alter `StatelessXmlReporter` with surefire|failsafe xsd. Now they are same but in the future both may split. The same as we are going to do with system properties which lack of prefix surefire|failsafe. Additionally this xsd https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/surefire-test-report.xsd needs to be renamed to `failsafe-test-report.xsd` which is still possible because the class `StatelessXmlReporter` does not alter such xsd. They are both the same, hopefully now, but may necessarily not to be same.
          Thx.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the pull request: https://github.com/apache/maven-surefire/pull/110#issuecomment-170285026 Feel free to push it to master. I will then update a branch 3.0-rc1. You can then close it in jira. If you have time we would need to alter `StatelessXmlReporter` with surefire|failsafe xsd. Now they are same but in the future both may split. The same as we are going to do with system properties which lack of prefix surefire|failsafe. Additionally this xsd https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/surefire-test-report.xsd needs to be renamed to `failsafe-test-report.xsd` which is still possible because the class `StatelessXmlReporter` does not alter such xsd. They are both the same, hopefully now, but may necessarily not to be same. Thx.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mfriedenhagen commented on the pull request:

          https://github.com/apache/maven-surefire/pull/110#issuecomment-170283705

          Show
          githubbot ASF GitHub Bot added a comment - Github user mfriedenhagen commented on the pull request: https://github.com/apache/maven-surefire/pull/110#issuecomment-170283705 @Tibor17, I think I was confused by test files in the Jenkins' XUnit plugin (see https://github.com/jenkinsci/xunit-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/xunit/types/junit/testcase1/input.xml ). To reproduce the Jenkins issue I just copied `input.xml` to testcase5 and added the schema declarations. Now this firstly failed because of SUREFIRE-1216 and after I used `nonamespaceschemalocation` lateron the input data was just incorrect (more than 3 digits after the decimal separator). Sorry for the confusion. I can go ahead and just rebase this patch into master.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the pull request:

          https://github.com/apache/maven-surefire/pull/110#issuecomment-170281465

          @mfriedenhagen
          Can you answer my question to the exec time we spoke abot in https://issues.apache.org/jira/browse/SUREFIRE-964 ? It is related to this issue but I could not reproduce 66.864949.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the pull request: https://github.com/apache/maven-surefire/pull/110#issuecomment-170281465 @mfriedenhagen Can you answer my question to the exec time we spoke abot in https://issues.apache.org/jira/browse/SUREFIRE-964 ? It is related to this issue but I could not reproduce 66.864949.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Tibor17 commented on the pull request:

          https://github.com/apache/maven-surefire/pull/110#issuecomment-170281272

          LGTM

          Show
          githubbot ASF GitHub Bot added a comment - Github user Tibor17 commented on the pull request: https://github.com/apache/maven-surefire/pull/110#issuecomment-170281272 LGTM
          Show
          mfriedenhagen Mirko Friedenhagen added a comment - https://github.com/apache/maven-surefire/pull/110
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user mfriedenhagen opened a pull request:

          https://github.com/apache/maven-surefire/pull/110

          SUREFIRE-1216: TEST-*.xml files generated by Surefire are invalid.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/mfriedenhagen/maven-surefire SUREFIRE-1216

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/maven-surefire/pull/110.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #110


          commit 104ff2b71bd587fc08edbcc5e91fa1b20b1efccb
          Author: Mirko Friedenhagen <mfriedenhagen@apache.org>
          Date: 2016-01-09T20:21:43Z

          SUREFIRE-1216: TEST-*.xml files generated by Surefire are invalid.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user mfriedenhagen opened a pull request: https://github.com/apache/maven-surefire/pull/110 SUREFIRE-1216 : TEST-*.xml files generated by Surefire are invalid. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mfriedenhagen/maven-surefire SUREFIRE-1216 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-surefire/pull/110.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #110 commit 104ff2b71bd587fc08edbcc5e91fa1b20b1efccb Author: Mirko Friedenhagen <mfriedenhagen@apache.org> Date: 2016-01-09T20:21:43Z SUREFIRE-1216 : TEST-*.xml files generated by Surefire are invalid.

            People

            • Assignee:
              mfriedenhagen Mirko Friedenhagen
              Reporter:
              mfriedenhagen Mirko Friedenhagen
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development