How to create test XML documents with DTM Test XML Generator?

There are three simple steps to generate your set of test XML files. They are structure definition, output specification, and project execution.

DTM Test XML Generator: sample XML document structure

At the first step, the user should define internal structure of the XML document. If the file with the same structure already exists the XML generator can import it. This case is suitable for the situation when the team has a few documents but need a big set of test XML files with the same structure.

The second source for file structure import is XSD Schema that defines required document. It is a preferred way because XSD file can contain useful restrictions like regular expressions, minimum and maximum values, etc. DTM Test XML Generator will use all detailed information about each node, attribute and leaf of the XML.

The last case is to enter structure manually. It is suitable for new projects if no sample XML files are present. The user interface of the generator has two blocks of buttons to manage XML structure. The first one operates with nodes and the second - with attributes. Each node has predefined attribute named $VALUE$ that defines the content of the node. An empty generator is acceptable for this attribute. The user allowed assigning "fill factor" for specified attribute. It defines how often DTM Test XML Generator generates value for the attribute: 100% means always and 0 means never.

The user should define the generator for each attribute. Otherwise, the program will use empty value for. The generator can be selected from the drop-down menu.

To generate a set of test files the user must provide target folder name and number of files to be generated. The program will create files 1.xml, 2.xml,... and n.xml in the specified folder.

See Also