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 10:27 AM, Michael Kay <mike@saxonica.com> wrote:
I'm completely bemused. I thought Schematron assertions, like XMLUnit assertions, were both XPath. Why is one better than the other?

According to reports in other messages in this thread, because XMLUnit has no way of setting the context node, so all XPaths must be absolute.  (I don't know this of my own knowledge, I'm just reporting.) 

Unit testing has always been exposed to the problem that when things change, tests break.

Unit-test advocates consider this to be a Good Thing, and work hard to make unit tests depend only on the component being tested, all else being represented by mock objects whose behavior is stable because they don't have to really work.  Where things get Very Bad is when developers equate "all unit tests still pass" with "the application still works".  IMHO, this encourages a culture of "fix it by randomly mutating the code, and assuming you have it right when the unit tests pass", which is downright scary.  Programming is about understanding, not about code-whacking.

GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures

[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