xsl-list
[Top] [All Lists]

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

2007-12-17 16:03:55
On Mon, Dec 17 2007 11:55:55 +0000, 
andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com wrote:
On 17/12/2007, Tony Graham 
<Tony(_dot_)Graham(_at_)menteithconsulting(_dot_)com> wrote:
On Fri, Dec 14 2007 12:31:37 +0000, 
andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com 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]

Regards,


Tony Graham.
======================================================================
Tony(_dot_)Graham(_at_)MenteithConsulting(_dot_)com   
http://www.menteithconsulting.com

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
======================================================================

[1] http://www.jenitennison.com/xslt/utilities/unit-testing/
[2] http://utf-x.sourceforge.net/manual/manual.html
[3] http://xmlunit.sourceforge.net/userguide/html/index.html
[4] http://juxy.tigris.org/
[5] http://tennison-tests.sourceforge.net/tests.html

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--