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.