TDML test suite runner
Base class for all document parts that contain data directly expressed in the XML
Base class for all document parts
Parses and runs tests expressed in IBM's contributed tdml "Test Data Markup Language"
Needs to be thread-safe (i.e., use all thread-local state) so that test can be run in parallel.
Needs to be thread-safe (i.e., use all thread-local state) so that test can be run in parallel.
Note however, that each thread will get its own copy of the DFDLTestSuite
Use when TDML Runner must add to diagnostic lists held by other objects.
This is a trait so that we can create these from various exception classes already defined by JUnit or other systems.
This is a trait so that we can create these from various exception classes already defined by JUnit or other systems. For example, allows us to define TDMLTestNotCompatibleException, as well as have a family of other exceptions.
Used to determine when a test will not be run due to not being compatible with the implementation.
Used to determine when a test will not be run due to not being compatible with the implementation. Useful since this isn't necessarily a failure and may want to be treated differently in some cases.
Test is just a parse test, or just an unparse, with no round trip involved.
Test round trips with a single pass.
Test round trips with a single pass. Unparse produces exactly the original data.
Creates the DFDLTestSuite object lazily, so the file isn't read into memory and parsed unless you actually try to run a test using it.
Creates the DFDLTestSuite object lazily, so the file isn't read into memory and parsed unless you actually try to run a test using it.
Creates the DFDLTestSuite only once.
Provides a reset method to be called from @AfterClass to drop the test suite object (and avoid memory leak).
Note: I have verified that this does get called after each test suite has been run.
defaultRoundTripDefault if true the round trip default for the test suite will be this value, if the test suite does not specify defaultRoundTrip attribute.
defaultRoundTripDefaultDefault
Unparse doesn't produce original data, parsing it doesn't produce the same infoset, but an equivalent infoset which if unparsed, reproduces the first unparse output.
Unparse doesn't produce original data, but equivalent canonical data which if reparsed in a second parse pass, produces the same infoset as the first parse.
TDML test suite runner
Keep this independent of Daffodil, so that it can be used to run tests against other DFDL implementations as well. E.g., it should only need an API specified as a collection of Scala traits, and some simple way to inject dependency on one factory to create processors.
Use the validateTDMLFile arg to bypass validation of the TDML document itself.
This is used for testing whether one can detect validation errors in the DFDL schema.
Without this, you can't get to the validation errors, because it rejects the TDML file itself.
defaultRoundTripDefault the round trip default for the test suite will be taken from this value if it is not specified on the testSuite itself.
defaultValidationDefault the validation default for the test suite will be taken from this value if it is not specified on the testSuite itself.
defaultImplementationsDefault the implementations default for the test suite will be taken from this value if it is not specified on the testSuite itself.
shouldDoErrorComparisonOnCrossTests controls whether negative test error messages are compared during cross testing, or the tests are just run to determine that they fail.
shouldDoWarningComparisonOnCrossTests controls whether test warning messages are compared during cross testing.