Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2241

Java Junit Test TDML not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.4.0
    • 2.5.0
    • TDML Runner
    • None

    Description

      If i create the following small junit test

      public class TestTDML {
      
      	
      	private DFDLTestSuite testSuite;
      
      	@BeforeEach
      	public void setup() {
      		String tpktProtocolTestCases = "handshake.tdml";
      		testSuite = new DFDLTestSuite(Misc.getRequiredResource(tpktProtocolTestCases), true, true, true,
      				Runner.defaultRoundTripDefaultDefault(), Runner.defaultValidationDefaultDefault(), Runner.defaultImplementationsDefaultDefault(), true, true);
      
      	}
      
      	@Test
      	public void testFirst() {
      				
      		Option<Node> node = scala.Option.apply(this.testSuite.ts() );
      		this.testSuite.runAllTests(node);
      	}
      }
      
      

      With this tdml file:

      https://github.com/apache/incubator-daffodil/blob/master/tutorials/src/main/resources/tdmlTutorial.tdml.xml

       

      I get the following error:

      org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) SchemaDefinitionError: Schema Definition Error: The file [file:/C:/Users/E521642/AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file:///C:/Users/E521642/AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd] did not contain a schema element as the document element. Found testSuite in namespace [http://www.ibm.com/xmlns/dfdl/testData].
       Schema context: [file:AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file://appdata/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd] Location in [file:AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file://appdata/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd]
      

       

      I cant execute any tests. 

      Can you help me or assist what i can do?

      Thanks

      Greetings

      Alex

      Attachments

        1. tdmlTutorial.tdml.xml
          9 kB
          Mike Beckerle

        Activity

          People

            mbeckerle Mike Beckerle
            adeutschmann Alexander Deutschmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: