Changelog History
Page 1
-
v2.8.1 Changes
November 15, 2020โ 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.
-
v2.8.0 Changes
October 30, 2020๐ This release now requires Java 7 for all modules and updates some dependencies - the changed JAXB dependency is a breaking change. It also fixes a few bugs.
Details of changes:
๐ 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).
0๏ธโฃ
DefaultNodeMatcher
with multipleElementSelector
s could fail to find the best matches as the order ofElementSelector
s should
select them.
#197๐
Input
builder now supportsjava.nio.file.Path
#1960๏ธโฃ It is now possible to specify a custom
TransformerFactory
forDefaultComparisonFormatter
.
#195 -
v2.7.0 Changes
May 12, 2020The biggest changes are to the placeholder and assertj modules. The assertj module should now work with AssertJ 3.15+.
This version contains a backwards incompatible change to the
PlaceholderHandler
interface that is part of the experimental placeholders module: Theevaluate
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)}
.โ 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 #174avoid unnecessary creation of
DocumentBuilderFactory
inDOMDifferenceEngine
when a custom factory has been provided toDiffBuilder
.
Issue #182 -
v2.6.4 Changes
March 08, 2020๐ This release fixes a bug that affects the XPath for missing nodes in certain corner cases and improves the AsssertJ module. In particular XMLUnit 2.6.4 is supposed to be compatible with AssertJ 3.13.x.
The full list of changes:
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 #166the XPath values for comparisons resulting in
CHILD_LOOKUP
differences could be wrong whenNodeFilter
s were present.
XMLUnit.NET Issue
xmlunit.net/#29xmlunit-legacy will now use
NewDifferenceEngine
even when an
ElementQualifier
different from the built-in ones is used. -
v2.6.3 Changes
June 21, 2019๐ The release fixes a bug in a corner-case and adds a new
isNumber
placeholder.The full list of changes:
โ add a new
${xmlunit.isNumber}
placeholder
Issue #153 via PR #154 by @NathanAtClarity.the XPath values of a comparison should not be affected by any
NodeFilter
being in effect.
Issue #156 -
v2.6.2 Changes
August 27, 2018๐ This release mainly fixes interop problems with more recent AssertJ versions and the Java module system.
The full list of changes:
xmlunit-assertj can now be used with AssertJ 3.9.1+ as well as 2.9.x.
Issue #135.โ added a new
TypeMatcher
to the xmlunit-matchers module that can be
๐ used to conveniently translate XPath result strings into numbers or
booleans and verify they match type safe assetions.
Issue #133 via PR #137.๐ fixed the
Automatic-Module-Name
of all modules to be valid Java
identifiers.
Issue #136. -
v2.6.1 Changes
August 16, 2018๐ This release adds a new module with AssertJ support thanks to the lates XMLUnit project member @krystiankaluzny
The full list of changes is:
โ add a new module with AssertJ support. This module requires Java7 at runtime.
Issue #117 via PRs #120, #126, #128, and #129 by @krystiankaluzny.๐ง The
XPathFactory
used by the XPath related Hamcrest matchers is now configurable.
Issue #131 via PRs #132 -
v2.6.0 Changes
April 22, 2018๐ This release fixes a few bugs and introduces a new experimental feature. In particular XMLUnit will now configure all XML parsing code in a way that prevents XML eXternal Entity injections (XXE) by default - the only exceptions are the validation package and the legacy module.
The full list of changes is:
โ add a new experimental project xmlunit-placeholders which aims to
๐ use${xmlunit.FOO}
expressions inside of the control document to
๐ allow for a DSL-like approach of defining more complex tests.
๐ This initial seed only supports${xmlunit.ignore}
which can be
๐ used to make XMLUnit ignore the element containing this text.
PR #105 by
@zheng-wang.โ added
withDocumentBuilderFactory
methods toHasXPathMatcher
and
๐งEvaluateXPathMatcher
to allow explicit configuration of the
DocumentBuilderFactory
used.
Issue #108.the
DocmentBuilderFactory
andTransformerFactory
instances used
๐ง by XMLUnit are now configured to not load any external DTDs or parse
๐ง external entities. They are now configured according to the OWASP
recommendations for XML eXternal Entity injection
preventions. The
TransformerFactory
used by the
๐งorg.xmlunit.transform.Transformation
class is still configured to
๐ load external stylesheets, though.๐ฆ For the
legacy
package XXE prevention has to be enabled via
XMLUnit.enableXXEProtection
explicitly.This is a breaking change and you may need to provide
DocmentBuilderFactory
orTransformerFactory
instances of your
own if you need to load external entities.๐ The
SAXParserFactory
andSchemaFactory
instances used inside of
๐ฆ thevalidation
package have not been changed as their use is
likely to require loading of external DTDs or schemas.Issue #91.
๐ง the configured
NodeFilter
is now applied before comparing
DocumentType
nodes.This change breaks backwards compatibility as the old behavior was
to ignoreDocumentType
when counting the children of the
Document
node but not when actually comparing the
DocumentType
. Prior to this change if one document had a document
type declaration but the other didn't, aHAS_DOCTYPE_DECLARATION
difference was detected, this will no longer be the case now. If you
want to detect this difference, you need to use a more lenient
0๏ธโฃNodeFilter
thanNodeFilters.Default
๐ (i.e.NodeFilters.AcceptAll
) but then you will see an additional
CHILD_NODELIST_LENGTH
difference.๐ฆ The legacy package has been adapted and will behave as before even
when usingNewDifferenceEngine
.Issue #116.
โ added a new
Source
implementation
ElementContentWhitespaceStrippedSource
which is similar to
WhitespaceStrippedSource
but only affects text nodes that solely
consist of whitespace and doesn't affect any other text nodes. Also
โ added convenienceignoreElementContentWhitespace
methods to
DiffBuilder
andCompareMatcher
.
Issue #119. -
v2.5.1 Changes
November 09, 2017๐ this release fixes a bug in
CompareMatcher
that could throw aNoSuchElementException
when combined with other hamcrest matchers.The full list of changes for XMLUnit for Java
๐ Made Travis build work with OpenJDK6 again.
PR #101 by
@PascalSchumacher.๐ป
CompareMatcher
'sdescribeTo
method threw an exception if the
comparison yielded no differences.
Issue #107. -
v2.5.0 Changes
September 03, 2017๐ this release upgrades the XSLT used by
CommentLessSource
to use XSLT 2.0 and adds an option to select the XSLT version.The full list of changes for XMLUnit for Java
CommentLessSource
,DiffBuilder#ignoreComments
and
CompareMatcher#ignoreComments
now all use XSLT version 2.0
๐ stylesheets in order to strip comments. New constructors and methods
have been added if you need a different version of XSLT (in
0๏ธโฃ particular if you need 1.0 which used to be the default up to
XMLUnit 2.4.0).
Issue #99.