About

This project allows you to write unit-tests in XML, exercising your XSLT from Ant. When incorporated into your continuous integration environment, it allows you to run multiple XSLT tests as part of a build, failing the build when they go wrong.

When looking for the ability to unit-test XSLT it quickly becomes obvious that there are two camps of thought, XSLT testing using XSLT (which makes sense to XSLT programmers) and xUnit style testing (which makes sense to the Java boys for example) but there is very little convergence.

A brief history...

Historically, the xsltunit work (http://xsltunit.org/) represents the first publicised XSL templates for unit testing. These were always described as proof of concept but influenced subsequent work.

One such work was Jeni Tennison's XSLT templates ( http://www.jenitennison.com/xslt/utilities/unit-testing/).

Meanwhile in the xUnit camp, development of XMLUnit ( http://xmlunit.sourceforge.net/) was underway along with several similar projects, mostly extending and being used within a nUnit environment*.

nUnit solutions are fine (in fact XMLUnit is more than fine!) but often XSLT Developer's are more comfortable writing tests in XML. The drawback here is that the majority of the XML-based frameworks make it difficult to run tests against lots of files and offer no way to automate the testing.

Where Tennison Tests come in

The Tennison Tests (XSLT Unit Testing) project aims to harvest the best of both worlds, allowing XSLT Developer's to write their tests in XML and appease the nUnit camp by providing an easy integration into automated build tools, specifically Ant.

Final Thoughts

The reason the project was started is to share ideas and provide a shared space to distribute the work. This very much depends on the community's feedback, so please get in touch via the mailing lists, contributions of all kinds are always welcome.

Current Status

Get the RSS feed of the last changes Lastest changes

The project is currently usable, the majority of work has been around tweaking Jeni's orginal templates and providing a custom Ant task that can be used to run them.

We are currently in the process of updating these pages and making the first release via SourceForge. Feel free to browse SVN to get the latest source in the mean time.

Work still to do relates to rationalising Jeni's work, discussing with the community if it offers the best way of doing things and providing a more complete set of reports (currently each XSLT tested produces a single report - we'd like to combine and summarise these).