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

Subject: Re: [xsl] ANN: 'Testing XSLT' training course PDF available
From: "Jacek Radajewski" <jacekrad@xxxxxxxxx>
Date: Fri, 28 Dec 2007 08:06:45 +1000
Hi All,

It certainly is possible to unit test XSLT in a 'JUnit like manner'.
The approach we've take in UTF-X is to define the tests outside the
stylesheets.  Each test contains two XML fragments (sequences), source
and expected.  Source is transformed using the stylesheet under test
and becomes 'actual' (using the JUnit lingo).  Both actual and
expected are converted into their canonical forms and compared.

When designing UTF-X we tried to support the extreme programming
test-first-design principle.  UTF-X has a functionality which allows
you to render tests which works well for both HTML and XSL:FO
generating XSLTs.  The idea is that you can write your test first,
visually inspect it, and only when happy with the result implement the
XSLT templates.

If interested please check



BTW: we have room for more developers on the team.

On Dec 14, 2007 11:16 PM, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> 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.

Current Thread