Unit Testing XML for Java and .NET

2016-06-19: XMLUnit for Java 2.2.1 Released

We are happy to announce the release of XMLUnit for Java 2.2.1.

About XMLUnit

When testing XML your application creates, simple string comparisons don't cut it as there are many different ways the same XML content is serialized to a string. It doesn't even stop with serialization as sometimes you don't care for the order of XML elements and sometimes you do.

XMLUnit provides you with the tools to verify the XML you emit is the one you want to create. It provides helpers to validate against an XML Schema, assert the values of XPath queries or compare XML documents against expected outcomes.

The most important part is a diff-engine that provides you with full control over what kind of difference is important to you and which part of the generated document to compare with which part of your reference document.

About XMLUnit 2.x

XMLUnit 2.x is developed for Java and .NET.

XMLUnit 2.x is a complete rewrite and is based on the experience of XMLUnit for Java 1.x. It's main goals are:

The code has been split into separate git repositories for Java and .NET, but both share quite a bit of history. The user's is available as a github wiki.

XMLUnit for Java 2.2.1 has been on 2016-06-19. XMLUnit.NET 2.2.0 has been released on 2016-06-04.

XMLUnit for Java 2.x

XMLUnit for Java also contains a legacy module that provides an API compatible to XMLUnit 1.x on top of the new API. The legacy component is distributed using the same three-clause BSD license XMLUnit 1.x used.

XMLUnit.NET 2.x

XMLUnit.NET doesn't share anything with the old 0.x releases. Snapshot assemblies and nuget packages are available from our AppVeyour builds.

XMLUnit 1.x

XMLUnit for Java 1.x still has its home at sourceforge, if you want to report bugs, please use the issue tracker over there - any feature request should go against the 2.x version here.


We need your help!

Some ideas are outlined here. Contributions of tests, documentation and code are more than welcome. Please see our contributing page for details. In short, we like pull requests, please use github's infrastructure for XMLUnit 2.x and Sourceforge's infrastructure for XMLUnit 1.x.

The future of XMLUnit is discussed on the xmlunit-general mailing list hosted at Sourceforge