Re: [xsl] ANN: 'Testing XSLT' training course PDF available

Subject: Re: [xsl] ANN: 'Testing XSLT' training course PDF available
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Dec 2007 23:03:15 +0000
On Mon, Dec 17 2007 11:55:55 +0000, andrew.j.welch@xxxxxxxxx wrote:
> On 17/12/2007, Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> On Fri, Dec 14 2007 12:31:37 +0000, andrew.j.welch@xxxxxxxxx wrote:
>> ...
>> > You mention black box testing under the unit test heading... which
>> > doesn't quite fit.
>> >
>> > Personally I don't think you can unit test XSLT*, it's only really
>> > worthwhile to test the output for a given set of inputs.
>> Which is the sense in which I used "black box".
> It's not "unit testing" then... surely?

I didn't say that it was unit testing, I said that you could use one of
the XSLT unit testing frameworks (among other tools) to do it, since
many of the frameworks explicitly support it:

   If you want to test the stylesheet as a whole, the easiest thing to
   do is to create external input/output files and reference them. [1][5]

   XSLT transformation test case. This is achieved by passing the
   contents of the <utfx:source> fragment through the XSLT stylesheet
   that is being tested and asserting that the result is the same as the
   contents of the <utfx:expected> fragment. [2]

   Knowing the input XML, input stylesheet and expected output XML we
   can assert that the output of the transformation matches the expected
   output as follows [3]

   Often template requires current node to be set up. By default, it is
   a root node of the input document... [4]


Tony Graham.

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Menteith Consulting -- Understanding how markup works


Current Thread