Re: [xml-dev] Testing XML don't use xUnit

From
Ihe Onwuka <>
To
Date
2013-04-10T16:14:37Z
ID
<CALfs7+wYxUamA6Nx7D9W5NHao64WOOt5=>
Thread
Re: [xml-dev] Testing XML don't use xUnit
On Wed, Apr 10, 2013 at 5:13 PM, Ihe Onwuka <> wrote:
> On Wed, Apr 10, 2013 at 5:03 PM, John Cowan <> wrote:
>> On Wed, Apr 10, 2013 at 10:27 AM, Michael Kay <> 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.)
>>
>

Yes thats another way of summarising it.

>
>>> 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.
>>
>
Then they are conflating the isolation of the component under test
(Good) with over-engineering their test cases (Bad).

It cannot be a good thing. If things change alot and they have alot of
test cases they generate alot of unnecessary unit test generating
cycles that do not add value to the product.