Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Article: Unit-Testing XML

Article: Unit-Testing XML

There are many occasions where software creates XML output:  XML documents are used for data interchange between different applications, web application create (X)HTML output or respond to AJAX requests with XML, and this has to be tested as much as anything else.

The major problem with testing operations that produce XML results is to decide whether the result is correct or not, since a simple textual comparison is not enough.

In this exclusive InfoQ article, XMLUnit and Ant contributor Stefan Bodewig explains how to write tests in the presence of XML, showing detailed example scenarios and how to approach them with the help of the XMLUnit Java framework.

Rate this Article