XSpec is a Behavior Driven Development (BDD) framework for XSLT and XQuery. It is based on the Spec framework of RSpec, which is a BDD framework for Ruby.
XSpec consists of a syntax for describing the behaviour of your XSLT or XQuery code, and some code that enables you to test your code against those descriptions.