Re: [xsl] XSLT Unit Testing and Coverage

Subject: Re: [xsl] XSLT Unit Testing and Coverage
From: "Tony Graham tgraham@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 May 2014 19:12:47 -0000
On Wed, May 28, 2014 7:58 pm, Vasudev Kandhadai vasu.kandhadai@xxxxxxxxx
wrote:
> is there a good reason to deploy a XSLT unit testing framework? I have

If it's going to be useful to you.

> never seen any serious XSLT dev env where the XSLT unit testing was either
> done religiously, or considered mandatory.  Other than a very religious
> Java development team with strict Junit set up with Maven etc, who have
> adopted XSLT into their dev env, who would now want to extend the same
> ideologies to the XSLT world?  I have personally never used or utilized
> practically any XSLT unit testing framework in any project and nor was
> there any requirement to do so...

Then don't.

I find it most useful with code involving regular expressions -- e.g.,
recognising part numbers in text -- since there can be a lot of variation
in the source and since the regular expressions are often built up from
multiple sub-expressions.

> So considering we need to do this, I came across,
> XSPEC, XUnit etc.. Xspec seems like a good one,  but doesnt look like a
> lot
> of discussions are  happening in the community.. The Coverage feature

Which can mean that it works well enough for multiple people.

> doesnt work ...
> The class is not being maintained.

That much is true.

> Cakupan, was very hard on my brains to read the manual.. Again something
> that has been out there for a while and not sure it is still maintained /
> supported.

Why does code have to be constantly churning to be seen to be useful,
particularly when it's just a utility?

> Does anyone has any ideas on what options we have in the XML world for
> XSL Unit Testing + Coverage Report

My page on testing XSLT is at
http://www.menteithconsulting.com/wiki/TestingXSLT

> I tried posting to the Xspec community but no one bothered to answer my
> questions , so I am inclined to think it is dead.

Sorry, but I, for one, haven't seen anything from you on the XSpec mailing
list [1].  Could it be stuck in moderation?

> Somehow I am also inclined to think Coverage feature is a very
> Java/C#/C/C++ paradigm... Doesnt make too much sense with the XSLT world?

If you're going for 100% test coverage, then yes; otherwise, it depends.

Regards,


Tony Graham                                         tgraham@xxxxxxxxxx
Consultant                                       http://www.mentea.net
Chair, Print and Page Layout Community Group @ W3C    XML Guild member
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
Mentea       XML, XSL-FO and XSLT consulting, training and programming

[1] https://groups.google.com/forum/#!forum/xspec-users

Current Thread