XML Unit
XMLUnit provides assertions that help testing code that produces XML.
Description
XMLUnit extends JUnit and NUnit to enable unit testing of XML. It compares a control XML document to a test document or the result of a transformation, validates documents, and compares the results of XPath expressions.
The Java version is currently way more mature than the .NET version.
Categories
License
Update Notifications
User Ratings
User Reviews
-
Xmlunit works great.
-
It Is very useful Library for my tests. The Error Messages (in case of variations) are detailed enough (in most cases i only need the XPath) I initizialize XMLUnit with: @BeforeClass public static void initXmlUnit() { XMLUnit.setIgnoreWhitespace(true); XMLUnit.setIgnoreAttributeOrder(true); XMLUnit.setIgnoreComments(true); XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); } And run my Tests with : Diff diff = XMLUnit.compareXML(createInputSource(controlXml), createInputSource(resultXml)); diff.overrideDifferenceListener(new MyDifferenceListener()); // Special Cases: ignore some nodes and validate some Nodes with BigDecimal or Date compare() diff.overrideElementQualifier(new MyElementQualifier()); // Special Cases: ignore the Element-order of maxOccure > 1 Elements. assertTrue("XML similar " + diff.toString(), diff.similar()); assertTrue("XML identical " + diff.toString(), diff.identical()); // Helper Method: protected InputSource createInputSource(final byte[] xml) { return new InputSource(new ByteArrayInputStream(xml)); } FAZIT: XML Unit is Easy to Use. BW: is there a release Plan for 1.4? In SVN there are nice new Helper Classes like "ElementSelectors". With friendly regards, Harald
-
Love its user-friendly interface. Definitely, there's nothing more I could ask for.
-
simple and straight forward to use
-
deseo bajar xmlunit gratis
-
Great app