xsl-list
[Top] [All Lists]

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

2007-12-14 06:18:25
I almost agree with Andrew, that it's not possible to unit test a XSLT
stylesheet, which is like JUnit testing.

I guess, Florent that your unit test scripts will duplicate XSLT code
from the *actual* stylesheet ? Whereas, ideal unit testing will be
(JUnit like) - the unit test script invokes the main stylesheet (which
doesn't have any testing code, i.e. it's pure) and supplies some data
to it (an input XML for e.g.), and do assertions.

Please correct me if I am wrong.

On Dec 14, 2007 6:35 PM, Florent Georges <lists(_at_)fgeorges(_dot_)org> wrote:
Andrew Welch wrote:

 Hi

Personally I don't think you can unit test XSLT

 Mmh, what do you think, in this context, about something that looks
like the following:

   <t:tests>
     <t:title>Fibonacci</t:title>
     <t:test>
       <t:assert expect="0" select="my:fibonacci(0)"/>
     </t:test>
     <t:test>
       <t:assert expect="1" select="my:fibonacci(1)"/>
     </t:test>
     <t:test>
       <t:assert expect="6765" select="my:fibonacci(20)"/>
     </t:test>
   </t:tests>

 ;-)

 Regards,

--drkm


-- 
Regards,
Mukul Gandhi

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