bookmark

SUT: XML Schema Unit Test


Description

W3C Schema can quickly become complex and difficult to determine if they are validating the correct vocabulary. The addition of embedded Schematron schema only makes this problem worse. Schema Unit Test (SUT) introduces a framework for testing XML Schema.

This framework has two parts.

The first is a namespace and vocabulary for embedding test cases into sample XML documents, designed to highlight what is legal and what is not legal in the vocabulary defined in the schema under test. This aspect is independent of what schema language is used and can in theory be applied to any schema language with automatic validation tools.

The second part is a Java implementation using JUnit for testing a W3C Schema with embedded Schematron schema. This implementation reads SUT test suite descriptions written in XML with embedded test cases as described above and then creates a JUnit test suite that can be executed inside JUnit in the usual way.

Preview

Tags

Users

  • @gresch

Comments and Reviews