xsl-list
[Top] [All Lists]

Re: [xsl] XSLT Unit testing

2011-08-18 09:06:24
On Thu, August 18, 2011 2:46 pm, Florent Georges wrote:
davep wrote:
For what its worth, I've not used xslt specific test
frameworks, instead using standard junt tests that run the
transform and then use xpaths on the result (well, xquery).

Ever thought about using Schematron here Andrew?

  The fundamental difference is that Schematron is aimed at
representing assertions to be always true in all instance
documents but are not representable in a schema (like "there must

If you wanted to, you could write test-specific Schematron rules.  If you
really wanted to slow down the processing, you could even transform XSpec
tests into Schematron (which would then be transformed into XSLT rather
than the XSpec framework transforming XSpec tests into XSLT).

But sometimes the test runner and the report format are as important as
the test itself: if you have, say, a lot of Java code and a bit of XSLT in
your project, it can be better to have the XSLT unit test results appear
in the same summary report as the Java tests, rather than having to run
them a different way and look somewhere else for the results.

Which is why several frameworks [1], including Juxy and <jxsl/> work with
JUnit or NUnit.

Regards,


Tony Graham                                   tgraham(_at_)mentea(_dot_)net
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming

[1] http://www.mentea.net/wiki/TestingXSLT

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

<Prev in Thread] Current Thread [Next in Thread>