Friday, August 18, 2006

unit testing xslts

Some XSLT testing frameworks

XSLTUnit
http://xsltunit.org

Outdated
Tough to setup the testing environment

Tennison’s testing framework
http://tennison-tests.sourceforge.net/
http://www.jenitennison.com/xslt/utilities/unit-testing/

Test cases could be written in xml itself
Easy to write test cases
Supports xpath based expressions testing of nodes and values
Tests are more readable than XSLT unit
Don’t support global variable and params setting properly

UTF-X
(http://utf-x.sourceforge.net/)

Test cases could be written in xml itself
Supports template generation for writing test cases
Support for ant tasks to run test while executing builds
Needs java 1.5
Supports Junit
Don’t support advanced xslt testing needs

Juxy
(http://juxy.tigris.org/)

Java Based
Needs to have knowledge of java programming
Could be integrated with JUnit
Support param set-up for xslt and global variable setup and other options for xslt testing
Drawback: need knowledge of java to write test cases.

Recommendations:

If you are okie to write xslt test cases in java, then Juxy will provide us with much flexible framework.

Or else if you need to stick with XML based test case building (which can be written just with knowledge of xml/xslt alone), then we could use the Tennison Testing framework.

No comments:

Recommended Blog Posts