- Drop support for Python 3.9 and below. Use version 4 if you're still on an older Python version.
- Update type annotations thanks to @nkr0
- Make TestCase support Properties tags thanks to @eap
write_xml- now supportsPathfrompathlib.
write_xml- Remove encoding kwarg to fixbinary mode doesn't take an encoding argument
-
Renamed argument
filepathof methodswrite_xml,TestSuite.write, andJUnitXml.writetofile_or_filename, as these methods now support file objects and file-like objects. -
Turned positional argument
prettyof methodswrite_xml,TestSuite.write, andJUnitXml.writeinto keyword argument. Use aswrite_xml(obj, filename, pretty=True)andobj.write(filename, pretty=True), respectively. -
Removed argument
to_consolefrom methodswrite_xml,TestSuite.write, andJUnitXml.write. Instead, usewrite_xml(obj, sys.stdout)andobj.write(sys.stdout), respectively. -
Renamed argument
filepathof methodJUnitXml.fromfiletofile, to reflect that this method supports file objects, file-like objects, and urls. -
Setter method
TestCase.resultused to ignore values of invalid types. This method now throws aValueErrorinstead. -
Method
xunit2.TestCase.add_rerun_resulthas been renamed toadd_interim_resultresult to better reflect class hierarchy of interim (rerun and flaky) results. -
Methods
JUnitXml.fromfile,JUnitXml.fromstring,JUnitXml.fromrootalways return aJUnitXmlinstance. Earlier versions return aTestSuiteinstance when the root of the file / string / element is a<TestSuite>. AJUnitXmlinstance has already been returned by earlier versions when the root of the file / string / element is a<TestSuites>.If you want to create a
TestSuiteinstance from a<TestSuite>element, useTestSuite.fromelem(elem)
- the
TestCase.resulttype annotation xunit2.JUnitXml.fromroottype annotation
- Excluded
TestCaseandTestSuitefrom pytest discovery. Thanks to @kurtsansom
- More type annotations.
- Sphinx documentation, thanks to @cmarqu
- type check by adding
py.typedfile.
- Tests converted to
pytest
- Support for different schemas.
- xunit2 flavor support
- Type hints
Python 2 is no longer supported. Version 2.x will keep supporting py2 and it will be maintained as long as possible, though no new features will be added.
--suite-nameparameter for merging xmls with cli. Thanks to @yusijs
fromrootclass method to create object from a root element. Thanks to @EnricoMi
verifysubcommand. Thanks to @teake
- Bulk add test cases. Thanks to @Goblenus
- Custom element not properly initiated according to the readme example.
- Fix the package build for a specific install method
- Parameter typo in the cli. Thanks to @petterssonandreas
This release addresses issues and PRs by @markgras.
- Parameter typo in function
write_xml(). - Properly closes file in
setup.py.
- Use generators in stead of lists in a few occasions.
- The time value now has a precision of 3 (#72). Thanks to @bryan-hunt.
- Unescaping attribute values (#71).
- CLI broken due to a quotation mark.
- Should not have used default sys locale to parse numbers. Thanks to @EnricoMi
- Merge parameter enhancement: output to console if output file name is set to "-"
- Support testcase tags inside testcase tags. Thanks to @EnricoMi
TestCase.resultis now a list instead of a single item.Failure,Skip, etc. are all treated as results.
TestCaseconstructor supportstimeandclassnameas params.Resultobject supportstextattribute.- Handles localized timestamps. Thanks to @ppalucha
JunitXML.fromstring()now handles various inputs.
- Exclude test file from package. Thanks to @Ishinomori
- Update licence and readme
- Custom parser option for
fromfile
- #47 result error when running merge in cli
- Runs with
python -m junitparser ...Thanks to @jkowalleck junitparser merge --globalso by @jkowalleck
- command line versioning
- A conditional statement error. Thanks to @dries007
- Retain suite name when merging test suites. Thanks to @alde
- Add skipped member to JUnitXml. Thanks to @arichardson
- Prevented an exception when test result is None. Thanks to @patbro
- Performance improvement for file merging. Thanks to @arichardson
- Ensure htmlentities are used in attributes. Thanks to @alde
- Install with --no-binary
- Merging test files doesn't merge test counts. Thanks to @andydawkins
- Support for reading custom attributes and elements. Thanks to @arewm
- a command to merge xml files. Thanks to @imsuwj
- Python 2 support. Thanks to @SteinHeselmans
- Supports xmls with
testcaseas root node. - First beta release.