-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML output from xmlrunner is not valid to the xUnit Plugin versions xunit-1.104 and above #201
Comments
Experiencing precisely the same issue +1 |
Exactly the same behaviour. Tried using the XSD provided in the readme using this tool but no luck. |
The version used was added in 2014 to xunit plugin by @gboissinot: @nfalco79 made several backwards incompatible changes to the schema while keeping the same version in 2018. A lot of tools came around between 2014 and 2018; if the claim was if you use |
if you care to try with a version earlier than xunit-2.2.4, please let me know. |
Hi, for anyone interested in a workaround, I've posted one there: #209 (comment), which works for me and with some adjustments, may work for others... |
…n no tests was executed Improve CppTest XSL to better handle 7.x and 9.x reports. Cover also the case no test was run.
In the README description you report:
xUnit does not define an own XML format, it translates external report format into an internal format that use to build a result graph using threasholds. JUnit does not define a standard, it is a library. There is an attempt by the JUnit team to create a sort of ISO format for the future (but it is firm). Since xUnit 2.x supports only a defined pair of defined JUnit format (Ant and Maven, the latest has been evolved recently). This breaking changes has been documented here: https://wiki.jenkins.io/display/JENKINS/xUnit+Plugin |
These attributes were present from 2014-2018 on the testcase element. Tools other than maven surefire or ant tasks use the XSD file to build a XML report file that xunit plugin can read. https://github.com/jenkinsci/xunit-plugin/blob/14c6e39c38408b9ed6280361484a13c6f5becca7/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd xunit 2.2.4 removed those optional attributes. `unittest-xml-reporting` is a python library that tries to generate xml report using that older schema definition. xmlrunner/unittest-xml-reporting#201
@dnozay I tried with previous versions of xunit (from here: https://updates.jenkins.io/download/plugins/xunit/). Went as far back as version 2.0.4, results in each:
So basically the same as reported. |
yes, put the wrong version, xunit I made additional changes based on #209; but the gist is that you need to perform XSL transformation (now described in readme) or chose
In this PR there are 2 ideas as well: relax the XSD validation, or provide another report type. I am also going to repeat my comment from
For those using I'm going to keep this issue open until jenkinsci/xunit-plugin#81 is closed. If someone has the time to work on it, I'd advise adding the other report type directly to the plugin, but I couldn't find enough time / info in the wiki. |
The junit-10.xsd used for testing does not match the junit-10.xsd file the xUnit plugin uses. https://github.com/jenkinsci/xunit-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd
Updating the file in this project and running unit tests results in the following errors:
These are not all the errors however, when using xmlrunner with the xUnit plugin for one of my build jobs, the following XML warnings are reported:
The text was updated successfully, but these errors were encountered: