Generate XML test examples from XSD


You can easily combine xslt transformations with CAM templates that generate XML test cases and examples from XSD schema. The jCAM tool implementation supports this via the included saxon xslt processor. The XSLT scripts provided in the camprocessor tool from Sourceforge allow you to ingest your original XSD schema, then make refinements and changes to the content model and structure. Then when you are ready you can simply create a range of example XML instances quickly and easily with a variety of output generation options. There is also a content hinting option so that you can create realistic test cases not just random XML.

Tutorial on generating XML test examples from XSD

A tutorial is available that shows the steps needed to ingest an existing XSD schema into a CAM template and then generate XML examples and test instances from that.

The tutorial is available here.

Notes on the xslt for generating XML test instances

The xslt used in the camprocessor tool is available from svn download at Sourceforge and consists of a set of tools including:

<!-- Provided "as is" License: Creative Commons - Author: David RR Webber, February, 2008 -->

Generating_XML_test_examples_from_XSD (last edited 2009-08-12 18:02:28 by localhost)