After three alpha releases this is the final release of XMLUnit 2.0.0.

XMLUnit 2.x provides APIs that allow you to

and provides simplified APIs for evaluating XPath expressions and XSLT transformations.

In addition there are Hamcrest matchers and NUnit constraints that help using XMLUnit as part of unit tests for code that produces XML.

XMLUnit 2.x builds on the ideas of XMLUnit for Java 1.x but provides a completely new API. XMLUnit for Java comes with a legacy module that provides a compatibility layer to ease the migration. A migration guide is available as part of the user guide.

XMLUnit.NET and XMLUnit for Java provide the same set of features with similar APIs that differ only to account for idioms of the respective platform.

XMLUnit 2.0.0 is available as source and binary release from GitHub: XMLUnit for Java and XMLUnit.NET.

XMLUnit for Java is also available via Maven Central, XMLUnit.NET is available via nuget.

Please report bugs via GitHub issues and feature request via the xmlunit-general mailing list hosted at Sourceforge or as GitHub issues. See the contributing guide for more details.

path: /en/oss/XMLUnit | # | Writebacks

This new pre-release introduces two backwards incompatible changes over 2.0.0-alpha-03:

Additional changes:

This is still an alpha release as the API may well change based on your feedback. Please provide feedback about the API in case it needs to get adapted before the final release on the xmlunit-general list or via GitHub issues.

XMLUnit 2.0.0-alpha-04 is available as GitHub release via https://github.com/xmlunit/xmlunit/releases/tag/v2.0.0-alpha-04/ and https://github.com/xmlunit/xmlunit.net/releases/tag/v2.0.0-alpha-04/ respectively.

XMLUnit for Java is also available via Maven Central.

    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>2.0.0-alpha-04</version>
    </dependency>

with additional artifacts xmlunit-matchers and xmlunit-legacy.

XMLUnit.NET is also available as nuget packages XMLUnit.Core, XMLUnit.NUnit2.Constraints and XMLUnit.NUnit3.Constraints.

For more information please visit http://www.xmlunit.org.

path: /en/oss/XMLUnit | # | Writebacks

This new pre-release introduces two backwards incompatible changes over 2.0.0-alpha-02:

XMLUnit.NET now comes with two different constraint assemblies targeting NUnit 2.x and 3.x respectively. To reflect this the XMLUnit.Constraints nuget package has been renamed to XMLUnit.NUnit2.Constraints.

This is still an alpha release as the API may well change based on your feedback. Please provide feedback about the API in case it needs to get adapted before the final release on the xmlunit-general list or via GitHub issues.

XMLUnit 2.0.0-alpha-03 is available as GitHub release via https://github.com/xmlunit/xmlunit/releases/tag/v2.0.0-alpha-03/ and https://github.com/xmlunit/xmlunit.net/releases/tag/v2.0.0-alpha-03/ respectively.

XMLUnit for Java is also available via Maven Central.

    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>2.0.0-alpha-03</version>
    </dependency>

with additional artifacts xmlunit-matchers and xmlunit-legacy.

XMLUnit.NET is also available as nuget packages XMLUnit.Core, XMLUnit.NUnit2.Constraints and XMLUnit.NUnit3.Constraints.

For more information please visit http://www.xmlunit.org.

path: /en/oss/XMLUnit | # | Writebacks

XMLUnit 2.0 is a complete rewrite of XMLUnit that is available for Java and .NET. It builds upon the ideas and experience of XMLUnit for Java 1.x but comes with a new API and new implementation.

XMLUnit 2.0 consists of a Core library without any external dependencies and an additional library of Hamcrest Matchers / NUnit Constraints.

XMLUnit for Java provides a third artifact that provides a compatibility layer with XMLUnit 1.6 that bridges the old API to the new implementation.

The 2.0.0-alpha-02 release is the first official pre-release of XMLUnit 2.0 (there has been a nuget package with the version 2.0.0-alpha-01 before, therefore the 02). We'd like to encourage people to use it and provide feedback about the API in case it needs to get adapted before the final release. Please join the xmlunit-general list or use GitHub issues to provide feedback.

XMLUnit 2.0.0-alpha-02 is available as GitHub release via https://github.com/xmlunit/xmlunit/releases/tag/v2.0.0-alpha-02/ and https://github.com/xmlunit/xmlunit.net/releases/tag/v2.0.0-alpha-02/ respectively.

XMLUnit for Java is also available via Maven Central.

    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>2.0.0-alpha-02</version>
    </dependency>

with additional artifacts xmlunit-matchers and xmlunit-legacy.

XMLUnit.NET is also available as nuget packages Core and Constraints.

For more information please visit www.xmlunit.org.

path: /en/oss/XMLUnit | # | Writebacks

I wanted to track test coverage for XMLUnit for Java using Coveralls (could be better and I should do the same for XMLUnit.NET, but these are different stories).

In theory this is pretty easy, given that there already is a Travis CI build. I added the Jacoco and Coveralls plugins in a Maven profile and made Travis run the profile as an after_success script. But instead of publishing data, I was greeted by

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project xmlunit-parent:
  Unable to parse configuration of mojo org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report for parameter timestamp:
  Cannot convert '1425416381951' to Date -> [Help 1]

Well, I never configured the timestamp for coveralls and I was pretty sure I wasn't setting a timestamp property, either. Searching around didn't lead to anything, there was no environment variable configured, strange. Finally it dawned on me that the buildnumber plugin I used in order to get the git hash into the jar manifests also sets a property named timestamp as a side-effect. So far I wasn't using it but rather maven.build.timestamp for the manifest so I had ignored said property. With that

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.3</version>
        <configuration>
            ...
            <timestampFormat>{0,date,yyyy-MM-dd HH:mm:ssa}</timestampFormat>
            ...
        </configuration>
    </plugin>

finally did the trick.

path: /en/oss/XMLUnit | # | Writebacks