public void processConfigXML(URI uri) throws Exception {
  Element testCasesElem=loadXMLFromURL(uri);
  NodeList children=testCasesElem.getChildNodes();
  for (int childIdx=0; childIdx < children.getLength(); childIdx++) {
    Node n=children.item(childIdx);
    if (n.getNodeType() == Node.ELEMENT_NODE) {
      final String nodeName=n.getNodeName();
      if (nodeName.equals(ELEM_SETTING)) {
        NamedNodeMap attrs=n.getAttributes();
        for (int attrIdx=0; attrIdx < attrs.getLength(); attrIdx++) {
          Attr attr=(Attr)attrs.item(attrIdx);
          testSuiteSettings.put(attr.getName(),attr.getValue());
        }
      }
 else       if (nodeName.equals(ELEM_TEST_CASE)) {
        for (        TemplateTestCase testCase : createTestCasesFromElement((Element)n)) {
          addTest(testCase);
        }
      }
    }
  }
}

public void processConfigXML ( URI uri ) throws Exception { Element testCasesElem = loadXMLFromURL ( uri ) ; NodeList children = testCasesElem . getChildNodes ( ) ; for ( int childIdx = 0 ; childIdx < children . getLength ( ) ; childIdx ++ ) { Node n = children . item ( childIdx ) ; if ( n . getNodeType ( ) == Node . ELEMENT_NODE ) { final String nodeName = n . getNodeName ( ) ; if ( nodeName . equals ( ELEM_SETTING ) ) { NamedNodeMap attrs = n . getAttributes ( ) ; for ( int attrIdx = 0 ; attrIdx < attrs . getLength ( ) ; attrIdx ++ ) { Attr attr = ( Attr ) attrs . item ( attrIdx ) ; testSuiteSettings . put ( attr . getName ( ) , attr . getValue ( ) ) ; } } else if ( nodeName . equals ( ELEM_TEST_CASE ) ) { for ( TemplateTestCase testCase : createTestCasesFromElement ( ( Element ) n ) ) { addTest ( testCase ) ; } } } } }
read the test case configurations file and build up the test suite .
