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); }
/** * Loads all of the XSL executables. This is a time consuming operation. * * @param index * @param sourcesName * A stylesheet reference. * @throws Exception * If the stylesheet fail to compile. */ public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functions = index.getFunctions(key); for (FunctionEntry fe : functions) { if (!fe.isJava()) { loadExecutable(fe, sourcesName); } } } }
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); }
/** * Loads all of the XSL executables. This is a time consuming operation. * * @param index * @param sourcesName * A stylesheet reference. * @throws Exception * If the stylesheet fail to compile. */ public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functions = index.getFunctions(key); for (FunctionEntry fe : functions) { if (!fe.isJava()) { loadExecutable(fe, sourcesName); } } } }
public void reexecute_test(String testPath) throws Exception { Document log = LogUtils.readLog(opts.getLogDir(), testPath); String testId = LogUtils.getTestIdFromLog(log); TestEntry test = index.getTest(testId); net.sf.saxon.s9api.DocumentBuilder builder = engine.getBuilder(); XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log);
int pause) throws Exception { String key = "{" + NamespaceURI + "}" + localName; TestEntry test = index.getTest(key);
throws Exception { String key = "{" + namespaceURI + "}" + localName; TestEntry test = index.getTest(key); if (logger != null) { logger.println("<testcall path=\"" + testPath + "/" + callId
throws Exception { String key = "{" + namespaceURI + "}" + localName; TestEntry test = index.getTest(key); if (logger != null) { logger.println("<testcall path=\"" + testPath + "/" + callId
int pause) throws Exception { String key = "{" + NamespaceURI + "}" + localName; TestEntry test = index.getTest(key);
public void reexecute_test(String testPath) throws Exception { Document log = LogUtils.readLog(opts.getLogDir(), testPath); String testId = LogUtils.getTestIdFromLog(log); TestEntry test = index.getTest(testId); net.sf.saxon.s9api.DocumentBuilder builder = engine.getBuilder(); XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log);
List<String> baseParams = LogUtils.getParamListFromLog( engine.getBuilder(), log); TestEntry test = index.getTest(testId); if (suite.getStartingTest().equals(test.getQName())) { ArrayList<String> kvps = new ArrayList<String>();
List<String> baseParams = LogUtils.getParamListFromLog( engine.getBuilder(), log); TestEntry test = index.getTest(testId); if (suite.getStartingTest().equals(test.getQName())) { ArrayList<String> kvps = new ArrayList<String>();