public int execute_test(String testName, List<String> params, XdmNode contextNode) throws Exception { if (LOGR.isLoggable( FINE)) { String logMsg = String.format( "Preparing test %s for execution, using params:%n %s", testName, params); LOGR.fine(logMsg); } TestEntry test = index.getTest(testName); if (test == null) { throw new Exception("Error: Test " + testName + " not found."); } XdmNode paramsNode = engine.getBuilder().build( new StreamSource(new StringReader(getParamsXML(params)))); if (contextNode == null && test.usesContext()) { String contextNodeXML = "<context><value>" + test.getContext() + "</value></context>"; contextNode = engine.getBuilder().build( new StreamSource(new StringReader(contextNodeXML))); } XPathContext context = getXPathContext(test, opts.getSourcesName(), contextNode); return executeTest(test, paramsNode, context); }
public int execute_test(String testName, List<String> params, XdmNode contextNode) throws Exception { if (LOGR.isLoggable( FINE)) { String logMsg = String.format( "Preparing test %s for execution, using params:%n %s", testName, params); LOGR.fine(logMsg); } TestEntry test = index.getTest(testName); if (test == null) { throw new Exception("Error: Test " + testName + " not found."); } XdmNode paramsNode = engine.getBuilder().build( new StreamSource(new StringReader(getParamsXML(params)))); if (contextNode == null && test.usesContext()) { String contextNodeXML = "<context><value>" + test.getContext() + "</value></context>"; contextNode = engine.getBuilder().build( new StreamSource(new StringReader(contextNodeXML))); } XPathContext context = getXPathContext(test, opts.getSourcesName(), contextNode); return executeTest(test, paramsNode, context); }
testPath += "/" + callId; try{ this.verdict = executeTest(test, S9APIUtils.makeNode(params), context); } catch(Exception e){
contextNode); setTestPath(testPath); executeTest(test, paramsNode, context); if (testPath.equals(opts.getSessionId())) {
executeTest(test, S9APIUtils.makeNode(params), context); testPath = oldTestPath; if (verdict == FAIL && oldResult != FAIL) {
testPath += "/" + callId; try{ this.verdict = executeTest(test, S9APIUtils.makeNode(params), context); } catch(Exception e){
executeTest(test, S9APIUtils.makeNode(params), context); testPath = oldTestPath; if (verdict == FAIL && oldResult != FAIL) {
contextNode); setTestPath(testPath); executeTest(test, paramsNode, context); if (testPath.equals(opts.getSessionId())) {