Python version of XMLUnit?
kent at kentsjohnson.com
Mon Mar 6 13:28:02 CET 2006
Benjamin Niemann wrote:
> You'd still have to integrate this into your test framework though...
Thanks, that looks promising.
> And I'll have a look at XMLUnit - seem's like something I could use for my
> current project ;)
XMLUnit is *very* useful. For example here is a typical assertion error:
[different] Expected attribute value '1500' but was '150' - comparing
<HotspotModelItem height="1500"...> at
/PageItem/HotspotModelItem/@height to <HotspotModelItem
height="150"...> at /PageItem/HotspotModelItem/@height
Notice how it shows you exactly the error including XPath expressions to
the node containing the error!
In Jython I use unittest, not JUnit, so instead of subclassing
XMLTestCase I call the static methods of XLMAssert from my test cases.
More information about the Python-list