Unit Testing Framework – XSLT (UTF-X)

UTF-X, available from, is a Java-based framework where tests can be run from the command line, from an Ant build file, or using JUnit. Tests are written as XML. The following example from from the UTF-X web site asserts that the result of processing the content of the utfx:source element will match the content of the utfx:expected element.

  <utfx:name>sect1 with title only</utfx:name>
    <utfx:source validate="yes">
      <section id="section1">
        <heading>Section 1</heading>
    <utfx:expected validate="yes">
      <a name="section1" />
      <h1>Section 1</h1>

UTF-X includes a test generator that can generate a test definition file for an existing stylesheet.