congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TECore
Code IndexAdd Tabnine to your IDE (free)

How to use
TECore
in
com.occamlab.te

Best Java code snippets using com.occamlab.te.TECore (Showing top 20 results out of 315)

origin: org.opengis.cite.teamengine/teamengine-core

public void run() {
 threadComplete = false;
 // activeThread = Thread.currentThread();
 try {
  opts.testLogDir.mkdir();
  threadOutput = new ByteArrayOutputStream();
  out = new PrintStream(threadOutput);
  execute();
  out.close();
 } catch (Exception e) {
  jlogger.log( SEVERE, "", e);
 }
 // activeThread = null;
 threadComplete = true;
}
origin: opengeospatial/teamengine

public NodeInfo executeXSLFunction(XPathContext context, FunctionEntry fe,
    NodeInfo params) throws Exception {
 String oldFnPath = fnPath;
 CRC32 crc = new CRC32();
 crc.update((fe.getPrefix() + fe.getId()).getBytes());
 fnPath += Long.toHexString(crc.getValue()) + "/";
 XdmNode n = executeTemplate(fe, S9APIUtils.makeNode(params), context);
 fnPath = oldFnPath;
 if (n == null) {
  return null;
 }
 return n.getUnderlyingNode();
}
origin: org.opengis.cite.teamengine/teamengine-core

      + getResultDescription(result));
      if (result == WARNING) {
   warning();
      } else if (result == CONTINUE) {
   throw new IllegalStateException(
       "Error: 'continue' is not allowed when a test is called using 'call-test' instruction");
      } else if (result != PASS) {
   inheritedFailure();
testPath += "/" + callId;
try{
  this.verdict = executeTest(test, S9APIUtils.makeNode(params), context);
} catch(Exception e){
     "Error: 'continue' is not allowed when a test is called using 'call-test' instruction");
updateParentTestResult(test);
testStack.pop();
origin: opengeospatial/teamengine

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);
}
origin: org.opengis.cite.teamengine/teamengine-core

Document oldPrevLog = prevLog;
if (opts.getMode() == Test.RESUME_MODE) {
 prevLog = readLog();
} else if (opts.getMode() == Test.REDO_FROM_CACHE_MODE) {
 prevLog = readLog();
} else {
 prevLog = null;
String assertion = getAssertionValue(test.getAssertion(), params);
out.print(" in " + getMode() + " with defaultResult "
    + defaultResultName + " ");
String testName = test.getName() + " type " + test.getType();
 if (getMode().contains("Retest")) {
  if(null!=dirPath){
  if (dirPath.isDirectory()) {
PrintWriter oldLogger = logger;
if (opts.getLogDir() != null) {
    logger = createLog();
    logger.println("<log>");
    logger.print("<starttest ");
this.verdict = defaultResult;
try {
 executeTemplate(test, params, context);
} catch (SaxonApiException e) {
 jlogger.log( SEVERE, e.getMessage());
origin: org.opengis.cite.teamengine/teamengine-spi-ctl

  Engine engine = new Engine(masterIndex,
      setupOpts.getSourcesName(), defaultLoader);
  TECore ctlRunner = new TECore(engine, masterIndex, runOpts);
  ctlRunner.execute();
} catch (Exception ex) {
  Logger.getLogger(getClass().getName()).log(Level.SEVERE,
origin: org.opengis.cite.teamengine/teamengine-core

 reexecute_test(sessionId);
} else if (mode == Test.REDO_FROM_CACHE_MODE) {
 reexecute_test(sessionId);
} else if (mode == Test.RETEST_MODE) {
 for (String testPath : opts.getTestPaths()) {
  reexecute_test(testPath);
 if (testName != null) {
  XdmNode contextNode = opts.getContextNode();
  execute_test(testName, params, contextNode);
 } else {
  String suiteName = opts.getSuiteName();
  List<String> profiles = opts.getProfiles();
  if (suiteName != null || profiles.size() == 0) {
   execute_suite(suiteName, params);
     execute_profile(profile, params, false);
    } catch (Exception e) {
     jlogger.log(Level.WARNING, e.getMessage(),
   for (String profile : profiles) {
    try {
     execute_profile(profile, params, true);
    } catch (Exception e) {
     jlogger.log(Level.WARNING, e.getMessage(),
 if(supportHtmlReport == true){
 Map<String, String> testInputMap = new HashMap<String, String>();
 testInputMap = extractTestInputs(userInputs, opts);
origin: org.opengis.cite.teamengine/teamengine-core

XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log);
XdmNode contextNode = LogUtils.getContextFromLog(builder, log);
XPathContext context = getXPathContext(test, opts.getSourcesName(),
    contextNode);
setTestPath(testPath);
executeTest(test, paramsNode, context);
if (testPath.equals(opts.getSessionId())) {
  for (String profile : index.getProfileKeys()) {
   try {
    execute_profile(profile, params, false);
   } catch (Exception e) {
    jlogger.log(Level.WARNING, e.getMessage(), e.getCause());
  for (String profile : profiles) {
   try { // 2011-12-21 PwD
    execute_profile(profile, params, true);
   } catch (Exception e) {
    jlogger.log(Level.WARNING, e.getMessage(), e.getCause());
origin: org.opengis.cite.teamengine/teamengine-core

return executeXSLFunction(context, fe, params);
  instance = getFunctionInstance(fe.hashCode());
  if (instance == null) {
   try {
        fe.getClassName(),
        fe.getClassParams(), cl);
    putFunctionInstance(fe.hashCode(), instance);
   } catch (Exception e) {
    throw new XPathException(e);
origin: org.opengis.cite.teamengine/teamengine-core

NodeInfo result = null;
try {
  NodeInfo paramsNode = core.getEngine().getBuilder().build(src)
      .getUnderlyingNode();
  result = core.executeXSLFunction(context, fe, paramsNode);
} catch (Exception e) {
  throw new RuntimeException(e);
origin: opengeospatial/teamengine

URLConnection uc = build_soap_request(request);
response = parse(uc, parserInstruction);
Date after = new Date();
elapsedTime = after.getTime() - before.getTime();
origin: org.opengis.cite.teamengine/teamengine-core

URLConnection uc = build_request(request);
response = parse(uc, parserInstruction);
Date after = new Date();
elapsedTime = after.getTime() - before.getTime();
origin: opengeospatial/teamengine

Document oldPrevLog = prevLog;
if (opts.getMode() == Test.RESUME_MODE) {
 prevLog = readLog();
} else if (opts.getMode() == Test.REDO_FROM_CACHE_MODE) {
 prevLog = readLog();
} else {
 prevLog = null;
String assertion = getAssertionValue(test.getAssertion(), params);
out.print(" in " + getMode() + " with defaultResult "
    + defaultResultName + " ");
String testName = test.getName() + " type " + test.getType();
 if (getMode().contains("Retest")) {
  if(null!=dirPath){
  if (dirPath.isDirectory()) {
PrintWriter oldLogger = logger;
if (opts.getLogDir() != null) {
    logger = createLog();
    logger.println("<log>");
    logger.print("<starttest ");
this.verdict = defaultResult;
try {
 executeTemplate(test, params, context);
} catch (SaxonApiException e) {
 jlogger.log( SEVERE, e.getMessage());
origin: opengeospatial/teamengine

  Engine engine = new Engine(masterIndex,
      setupOpts.getSourcesName(), defaultLoader);
  TECore ctlRunner = new TECore(engine, masterIndex, runOpts);
  ctlRunner.execute();
} catch (Exception ex) {
  Logger.getLogger(getClass().getName()).log(Level.SEVERE,
origin: opengeospatial/teamengine

 reexecute_test(sessionId);
} else if (mode == Test.REDO_FROM_CACHE_MODE) {
 reexecute_test(sessionId);
} else if (mode == Test.RETEST_MODE) {
 for (String testPath : opts.getTestPaths()) {
  reexecute_test(testPath);
 if (testName != null) {
  XdmNode contextNode = opts.getContextNode();
  execute_test(testName, params, contextNode);
 } else {
  String suiteName = opts.getSuiteName();
  List<String> profiles = opts.getProfiles();
  if (suiteName != null || profiles.size() == 0) {
   execute_suite(suiteName, params);
     execute_profile(profile, params, false);
    } catch (Exception e) {
     jlogger.log(Level.WARNING, e.getMessage(),
   for (String profile : profiles) {
    try {
     execute_profile(profile, params, true);
    } catch (Exception e) {
     jlogger.log(Level.WARNING, e.getMessage(),
 if(supportHtmlReport == true){
 Map<String, String> testInputMap = new HashMap<String, String>();
 testInputMap = extractTestInputs(userInputs, opts);
origin: opengeospatial/teamengine

XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log);
XdmNode contextNode = LogUtils.getContextFromLog(builder, log);
XPathContext context = getXPathContext(test, opts.getSourcesName(),
    contextNode);
setTestPath(testPath);
executeTest(test, paramsNode, context);
if (testPath.equals(opts.getSessionId())) {
  for (String profile : index.getProfileKeys()) {
   try {
    execute_profile(profile, params, false);
   } catch (Exception e) {
    jlogger.log(Level.WARNING, e.getMessage(), e.getCause());
  for (String profile : profiles) {
   try { // 2011-12-21 PwD
    execute_profile(profile, params, true);
   } catch (Exception e) {
    jlogger.log(Level.WARNING, e.getMessage(), e.getCause());
origin: org.opengis.cite.teamengine/teamengine-core

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);
}
origin: opengeospatial/teamengine

return executeXSLFunction(context, fe, params);
  instance = getFunctionInstance(fe.hashCode());
  if (instance == null) {
   try {
        fe.getClassName(),
        fe.getClassParams(), cl);
    putFunctionInstance(fe.hashCode(), instance);
   } catch (Exception e) {
    throw new XPathException(e);
origin: opengeospatial/teamengine

NodeInfo result = null;
try {
  NodeInfo paramsNode = core.getEngine().getBuilder().build(src)
      .getUnderlyingNode();
  result = core.executeXSLFunction(context, fe, paramsNode);
} catch (Exception e) {
  throw new RuntimeException(e);
origin: org.opengis.cite.teamengine/teamengine-core

URLConnection uc = build_soap_request(request);
response = parse(uc, parserInstruction);
Date after = new Date();
elapsedTime = after.getTime() - before.getTime();
com.occamlab.teTECore

Javadoc

Provides various utility methods to support test execution and logging. Primary ones include implementation and execution of ctl:suite, ctl:profile, ctl:test, ctl:function, ctl:request and ctl:soap-request instructions, and invocation of any parsers specified therein.

Most used methods

  • <init>
  • execute
  • addMissingInfo
  • build_request
    Submits a request to some HTTP endpoint using the given request details.
  • build_soap_request
    Create SOAP request, sends it and return an URL Connection ready to be parsed.
  • createLog
  • executeTemplate
  • executeTest
    Executes a test implemented as an XSLT template.
  • executeXSLFunction
  • execute_profile
  • execute_suite
  • execute_test
  • execute_suite,
  • execute_test,
  • extractTestInputs,
  • form,
  • getAssertionValue,
  • getEngine,
  • getFile,
  • getFormHtml,
  • getFunctionInstance,
  • getLabel

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • getSystemService (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now