private Model generateEarlReport( String suiteName, Map params, Document document ) throws UnsupportedEncodingException { Model model = initializeModel( suiteName ); addTestInputs( model, params ); this.reqs = model.createSeq(); NodeList executionList = document.getElementsByTagName( "execution" ); for ( int temp = 0; temp < executionList.getLength(); temp++ ) { Node executionNode = executionList.item( temp ); Element executionElement = (Element) executionNode; NodeList logList = executionElement.getElementsByTagName( "log" ); Element logElement = (Element) logList.item( 0 ); NodeList testcallList = logElement.getElementsByTagName( "testcall" ); getSubtestResult( model, testcallList, logList ); } this.testRun.addProperty( CITE.requirements, this.reqs ); this.testRun.addLiteral( CITE.testsPassed, new Integer( this.totalPassCount ) ); this.testRun.addLiteral( CITE.testsFailed, new Integer( this.totalFailCount ) ); this.testRun.addLiteral( CITE.testsSkipped, new Integer( this.totalSkipCount ) ); this.testRun.addLiteral( CITE.testsContinue, new Integer( this.totalContinueCount ) ); this.testRun.addLiteral( CITE.testsBestPractice, new Integer( this.totalBestPracticeCount ) ); this.testRun.addLiteral( CITE.testsNotTested, new Integer( this.totalNotTestedCount ) ); this.testRun.addLiteral( CITE.testsWarning, new Integer( this.totalWarningCount ) ); this.testRun.addLiteral( CITE.testsInheritedFailure, new Integer( this.totalInheritedFailureCount ) ); this.testRun.addLiteral( CITE.testSuiteType, "ctl" ); this.earlModel.add( model ); return this.earlModel; }
private Model generateEarlReport( String suiteName, Map params, Document document ) throws UnsupportedEncodingException { Model model = initializeModel( suiteName ); addTestInputs( model, params ); this.reqs = model.createSeq(); NodeList executionList = document.getElementsByTagName( "execution" ); for ( int temp = 0; temp < executionList.getLength(); temp++ ) { Node executionNode = executionList.item( temp ); Element executionElement = (Element) executionNode; NodeList logList = executionElement.getElementsByTagName( "log" ); Element logElement = (Element) logList.item( 0 ); NodeList testcallList = logElement.getElementsByTagName( "testcall" ); getSubtestResult( model, testcallList, logList ); } this.testRun.addProperty( CITE.requirements, this.reqs ); this.testRun.addLiteral( CITE.testsPassed, new Integer( this.totalPassCount ) ); this.testRun.addLiteral( CITE.testsFailed, new Integer( this.totalFailCount ) ); this.testRun.addLiteral( CITE.testsSkipped, new Integer( this.totalSkipCount ) ); this.testRun.addLiteral( CITE.testsContinue, new Integer( this.totalContinueCount ) ); this.testRun.addLiteral( CITE.testsBestPractice, new Integer( this.totalBestPracticeCount ) ); this.testRun.addLiteral( CITE.testsNotTested, new Integer( this.totalNotTestedCount ) ); this.testRun.addLiteral( CITE.testsWarning, new Integer( this.totalWarningCount ) ); this.testRun.addLiteral( CITE.testsInheritedFailure, new Integer( this.totalInheritedFailureCount ) ); this.testRun.addLiteral( CITE.testSuiteType, "ctl" ); this.testRun.addLiteral( CITE.passedCoreConformanceClasses, passedCoreConformanceClasses ); this.earlModel.add( model ); return this.earlModel; }