XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Testing XML don't use xUnit

On Wed, Apr 10, 2013 at 4:56 PM, Andrew Welch <andrew.j.welch@gmail.com> wrote:
>> I have never said  writing // anything. Maybe you are presuming thats
>> what is meant by a resilient test.
>
> That what my inference from all the talk about using a context instead
> of a full path... if I'm wrong please provide a simple concrete
> example.
>
>
>> So if the xquery you are referring to is your own homebrew... then my
>> advice stands as is. Again Uche's post identifies the correct nuance.
>
> What was the nuance - it was that subtle I missed it.
>

Maybe it's more constructive for me to summarize my recollection of
how Schematron works.

It traverses the XML tree and for each node it encounters it searches
for a(n assertion) rule to fire.

So it doesn't matter if the structure of the path leading to the XML
changes - because Schematron navigates it's way to the node itself.

All you have to do is work out a way to make the right rule fire. As
Mike Kay intimates - this reduces the amount of information you have
to supply for the test to succeed - that in turn limits what will
break if things change.

At a higher level you could say that Schematron is a declarative way
of writing assertions whereas XMLUnit is procedural. All the pros and
cons that we are familiar with apply.

The XMLUnit approach is (comparatively) overengineered and the usual
disadvantages apply.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS