kyrus/python-junit-xml

Invalid attribute "skipped" in <testsuites> block

dmilotic opened this issue · 5 comments

generated output does not produce valid xml for any XSD schema from

https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model//src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/

so it can't be used by xUnit jenkins plugin

block has unknown attribute "skipped",
"documentation" on http://llg.cubic.org/docs/junit/ specifies attribute "disabled" instead

I have a similar problem. The fix is very simple. The XSD defines that the testsuites element should not have a skipped attribute, but that testsuite elements should. The new to_xml_string function accidentally includes the skipped attribute in the attributes it sums for the testsuites from the testsuite

LINE 209: for key in ['failures', 'errors', 'skipped', 'tests']:

Should be: for key in ['failures', 'errors', 'tests']:

EDIT: I have made the modifications myself and made a pull request. #34

Any chance that this will be merged?

I am not sure, it seems that no new updates have happened for a while. You are welcome to use my fork in the meanwhile of course. https://github.com/InbarRose/python-junit-xml

Sorry guys - I didn't seen this PR. I've merged into master and will be republishing to pypi

@brianebeyer Thanks for merging this!