Is there more information beyond examples to help me understand TDML?
TDML stands for Test Data Markup Language. In short, it is an XML file used for testing DFDL schemas. A TDML file can embed DFDL schemas (tdml:defineSchema) and defines parser and unparser tests cases (tdml:parserTestCase and tdml:unparserTestCase) which reference the embeded schemas or external schemas. The test cases include a data (tdml:document & tdml:documentPart) which allows specifying the data format in either bytes, bits, text, or an external file. Test cases also include an infoset (tdml:infoset & tdml:dfdlInfoset).
When executing a parserTestCase the tdml:document is parsed and the result is compared with the contents of the tdml:dfdlInfoset. Similarly, when executing an unparserTestCase, the contents of the tdml:dfdlInfoset are unparsed and the result is compared with the tdml:document.
Furthmore, a test case can also include tdml:errors, which are strings used to define if a test will fail, and if so, what strings must appear in the error messages.
Lastly, Daffodil supports a roundTrip attribute that allows one to specify if a test should go through the DFDL lifecycle (i.e. parse a document, unparse the resulting infoset, and ensure the resulting of the unparse matches the original document).
To run tests in a TDML file, the Daffodil CLI has a 'test' suboption that allows you to specify which tdml file to read and which tests within the TDML to execute. See the "Test Subcommand" section on the Daffodil Command Line Interface page.
For some more information, a document was created in the OGF which discusses the TDML file: https://redmine.ogf.org/dmsf_files/13311?download=
Note that the TDML format has change overtime to meet specific needs of Daffodil, so the schema describe in that document is likely out of date. The most recent schema describing TDML can be found at https://opensource.ncsa.illinois.edu/bitbucket/projects/DFDL/repos/daffodil/browse/daffodil-lib/src/main/resources/xsd/tdml.xsd
An example of a TDML file numerous contents explaining each tag can be found on the How to Report a Bug page.
Powered by a free Atlassian Confluence Open Source Project License granted to NCSA OpenSource. Evaluate Confluence today.