nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

XML output is not compatible to JUnit #1083

Open jadoro opened 6 years ago

jadoro commented 6 years ago

After upgrading the xUnit plugin within a corporate Jenkins installation, we are facing multiple failing pipelines due to xml parsing errors.

The cause of the problem seems to be a more strict parsing methodology within the xUnit plugin, as stated in the changelog:

Version 2.0.0

Breaking Changes

I have introduce some schemas validation becase the large number of issues opened to xUnit plugin. Those issues are caused by custom attributes or XML DOM in the report generated by some user/tools report logger also if they declare to produce a valid report file. This cause me to spend a lot of time to investigate what is right and what is wrong and how to implement the XSL without it goes in error during transformation.

Official supported JUnit schema are Ant junit and Maven Surefire).

In case you are using a non java tools that declares to produce a JUnit compatible report, ensure the report respects one of the widely used supported schemas. If not than select as test type the build step "Custom Tool" and use this XSL as described here.

This issue has already been reported to the plugin's issue tracker (JENKINS-51914) by another user.

The developer @nfalco79 there stated that the xml output of nose is not compatible to the original JUnit format, since

Skip or Skips is not a valid attribute for the testsuite element of JUnit report. The correct name for that attribute is skipped.

It would be nice if this could somehow be sorted out, making every user supply a custom XSL would be a pity.

For reference: We are currently using nosetests version 1.3.7 and generate our reports with nosetests --with-xunit.

nfalco79 commented 6 years ago

I suppose this tool is no more maitained, you could have more luck with a fork

ghost commented 5 years ago

See pull request [https://github.com/nose-devs/nose/pull/1090]