- Renamed argument
filepath
of methodswrite_xml
,TestSuite.write
, andJUnitXml.write
tofile_or_filename
, as these methods now support file objects and file-like objects. - Turned positional argument
pretty
of methodswrite_xml
,TestSuite.write
, andJUnitXml.write
into keyword argument. Use aswrite_xml(obj, filename, pretty=True)
andobj.write(filename, pretty=True)
, respectively. - Removed argument
to_console
from methodswrite_xml
,TestSuite.write
, andJUnitXml.write
. Instead, usewrite_xml(obj, sys.stdout)
andobj.write(sys.stdout)
, respectively. - Renamed argument
filepath
of methodJUnitXml.fromfile
tofile
, to reflect that this method supports file objects, file-like objects, and urls. - Setter method
TestCase.result
used to ignore values of invalid types. This method now throws aValueError
instead. - Method
xunit2.TestCase.add_rerun_result
has been renamed toadd_interim_result
result to better reflect class hierarchy of interim (rerun and flaky) results.
- the
TestCase.result
type annotation xunit2.JUnitXml.fromroot
type annotation
- Excluded
TestCase
andTestSuite
from pytest discovery. Thanks to @kurtsansom
- More type annotations.
- Sphinx documentation, thanks to @cmarqu
- type check by adding
py.typed
file.
- 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-name
parameter for merging xmls with cli. Thanks to @yusijs
fromroot
class method to create object from a root element. Thanks to @EnricoMi
verify
subcommand. 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.result
is now a list instead of a single item.Failure
,Skip
, etc. are all treated as results.
TestCase
constructor supportstime
andclassname
as params.Result
object supportstext
attribute.- 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 --glob
also 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
testcase
as root node. - First beta release.