Training/TestingXSLT

Sample Course Outline: Testing XSLT

Provides a grounding in approaches to testing XSLT.

This course suits organisations looking to improve the quality of their XSLT and the quality of the output from their XSLT but have not yet settled on an approach or a particular tool set.

Creating a working stylesheet may seem like an end in itself, but once it's written you may want it to run faster or you may not be sure that the output is correct (And if you are sure, how sure are you?).

Profilers, unit test frameworks, and other tools of conventional programming are similarly available for XSLT but are not widely used. This course surveys the available tools for ensuring the quality of your XSLT.

There is no one-size-fits-all solution when looking for tools. For example, if you are using Saxon and Ant, then you are looking for a different set of tools than if you are using libXSLT and Makefiles.

By the end of the course, the participants will:

  • Understand the strengths and limitations of XSLT profilers
  • Be familiar with available XSLT unit testing frameworks
  • Understand the different types of tests and their purposes
  • Be aware of the limitations of over-reliance on automated testing

The course includes a number of exercises based on your documents.

Duration: 1/2 day or 1 day, depending on requirements and time allocated for exercises

Overview of XSLT testing tools

Overview of the categories of XSLT and XSL FO testing tools

XSLT profilers

More detailed look at XSLT profilers and some of the potential for inaccuracy in the reported results

XSLT unit testing frameworks

A look at the available XSLT unit testing frameworks and their differing technologies and differing approaches.

Black box unit testing

What tests can you infer from the input and desired output?.

White box unit testing

Writing tests when you can see the code being tested.

  • The roles of both 'clean' tests and 'dirty' tests, where the template is supposed to throw an error.
  • How many tests are enough?

XSLV Static Validation tool

A different approach to testing transformations

Errors not caught by unit testing or static validation

Review of the types of errors – misleading comments, off-by-one errors, empty #PCDATA, etc. – that are not caught by either unit testing or static validation.

Concluding Remarks

Review of the tool types and their strength