kyrus / python-junit-xml

A Python module for creating JUnit XML test result documents that can be read by tools such as Jenkins. If you are ever working with test tool or test suite written in Python and want to take advantage of Jenkins' pretty graphs and test reporting capabilities, this module will let you generate the XML test reports.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid attribute "skipped" in <testsuites> block

dmilotic opened this issue · 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

commented

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?

commented

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!