The only real change when compared to XMLUnit for Java 2.8.0 is the
introduction of a new xmlunit-assertj3
module that
requires AssertJ 3.18.1 or later in order to address a problem with
running AssertJ tests in an OSGi environment.
The original xmlunit-assertj
module will still be
supported.
The full changelog of XMLUnit for Java 2.8.1:
-
added a new xmlunit-assertj3 module that requires AssertJ 3.18.1 or later.
This module no longer uses AssertJ internal classes that are not exported to OSGi environments and thus fixes issue #203.
The module (like AssertJ 3.x itself) requires Java 8 at runtime and is similar to xmlunit-assertj but is no drop-in replacement. It uses a different Java package from xmlunit-assertj and
CompareAssert
will no longer throw a JUnit 4.xComparisonException
but an opentest4jAssertionFailedError
instead.The existing xmlunit-assertj module will still be supported in future releases but expect AssertJ 3.x specific changes to only get applied to xmlunit-assertj3.
Many thanks to @Zegveld, @scordio and @joel-costigliola.
path: /en/oss/XMLUnit | #
Both releases are mostly bugfix releases. Unfortunately both are going to break backwards compatibility for some people.
All modules of XMLUnit for Java now require Java7 as a minimum and
the optional JAXB dependency has been updated to use the Jakarta XML
Binding API. XMLUnit.NET has made ISource
disposable
which is going to break custom implementations.
Details for XMLUnit for Java 2.8.0
- changed optional JAXB dependency to use Jakarta XML Binding API PR #186 by @endrejeges
- bumped the bytebuddy dependency to 1.10.10 for the AssertJ module in the hope it would help with #188 - and change its scope from provided to compile time, which should finally fix the issue.
- added a new
extractingText
method toMultipleNodeAssert
to make it possible to write AssertJ assertions against the textual content of nodes more easily. Issue #192 and PR #193 by @keesvandieren - changed the minimum Java version required from Java 6 to Java 7 for all modules (it has already been Java 7 for the AssertJ module before).
DefaultNodeMatcher
with multipleElementSelector
s could fail to find the best matches as the order ofElementSelector
s should select them. #197Input
builder now supportsjava.nio.file.Path
#196- It is now possible to specify a custom
TransformerFactory
forDefaultComparisonFormatter
. #195
Details for XMLUnit.NET 2.9.0
ISource
now extendsIDisposable
to allow releasing unmanaged resources used when building sources from files or URIs. This change is backwards incompatible if you are providingISource
implementations of your own. #33.DefaultNodeMatcher
with multipleElementSelector
s could fail to find the best matches as the order ofElementSelector
s should select them. Issue similar to xmlunit/#197
path: /en/oss/XMLUnit | #
Welcome to your new home.
path: /en/personal/family | #
These two releases contain an incompatible change to the
(I)PlaceholderHandler
interface, thus the new minor
versions. The Evaluate
method now receives a variable
number of string arguments in addition to the textual content of the
element/attribute. This allows placeholders like
${xmlunit.matchesRegex(some\s*regex)}
.
For XMLUnit.NET only the placeholders package has changed, for Java in addition the assertj module is now supposed to be compatible with AssertJ 3.15+.
Release Notes for XMLUnit for Java 2.7.0:
- the AssertJ tests now pass on non-English locales as well
Issue #180 - added a workaround for a binary incompatible change in AssertJ that caused xmlunit-assertj to be incompatible with AssertJ 3.15.0
Issue #181 - added a new
${xmlunit.matchesRegex(regex)}
placeholder
PR #178 by @Jazzyekim. - add a new
${xmlunit.isDateTime}
placeholder
inspired by #xmlunit.net/31 and #xmlunit.net/32 by MilkyWare
Issue #174 - avoid unnecessary creation of
DocumentBuilderFactory
inDOMDifferenceEngine
when a custom factory has been provided toDiffBuilder
.
Issue #182
Release Notes for XMLUnit.NET 2.8.0:
- add a new
${xmlunit.isDateTime}
placeholder
PRs #31 and #32 by MilkyWare - added a new
${xmlunit.matchesRegex(regex)}
placeholder
based on Java PR xmlunit/#178 by @Jazzyekim.
path: /en/oss/XMLUnit | #
Both releases fix a common bug where the XPath reported for missing nodes could be wrong in certain edge cases.
- the XPath values for comparisons resulting in
CHILD_LOOKUP
differences could be wrong whenNodeFilter
s were present. XMLUnit.NET Issue #29
This is the only change in XMLUnit.NET. In XMLUnit for Java the AssertJ module has also been improved and is supposed to be compatible with AssertJ 3.13+ now.
The full list of changes for XMLUnit for Java:
- the dependencies on JAXB implementation and its transitive dependencies has been promoted from test scope to optional for Java 9 and later Issue #162
- added
containsAnyNodeHavingXPath
,containsAllNodesHavingXPath
andhasXPath
assertions to xmlunit-assertj. - added
extractingAttribute
method to xmlunit-assertj. - removed some redundant
instanceof
checks. PR #171 by @PascalSchumacher. - xmlunit-assertj should now work with AssertJ-Core 3.13.x Issue #166
- xmlunit-legacy will now use
NewDifferenceEngine
even when anElementQualifier
different from the built-in ones is used.
path: /en/oss/XMLUnit | #