XSLT Unit testing

CodeHelp picture CodeHelp · Apr 11, 2011 · Viewed 11.3k times · Source

Does anyone know of a way to write unit tests for the XSLT transformation?

I've a lot of XSLT files and it's getting harder to test them manually. We have an example XML and can compare it to the resulting output XML from the XSL transormation. However, I'm looking for a better test method.

Answer

Scott picture Scott · Jul 26, 2012

I am currently looking for some good options to do this as well. As a result, I came across this question, and a few other potential candidate solutions. Admittedly, I haven't tried any of them yet, so I can't speak to their quality, but at least they are some other avenues potentially worthy of researching.

  1. Jenni Tennison's Unit Testing Package
  2. UTF-X Unit Testing Framework
  3. Juxy
  4. XTC

Additionally, I found the following article to be informative in terms of a general methodology for unit testing XSLT.

Unit test XSL transformations