Class TestSuiteScriptEngine

java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.ease.AbstractScriptEngine
org.eclipse.ease.lang.unittest.TestSuiteScriptEngine
All Implemented Interfaces:
Comparable, org.eclipse.core.runtime.IAdaptable, IDebugEngine, IScriptEngine

public class TestSuiteScriptEngine
extends AbstractScriptEngine
implements IDebugEngine
Script engine executing *.suite files and ITestEntity elements.
  • Field Details

  • Constructor Details

    • TestSuiteScriptEngine

      public TestSuiteScriptEngine()
  • Method Details

    • terminateCurrent

      public void terminateCurrent()
      Description copied from interface: IScriptEngine
      Stops the currently executed piece of code. Will continue to execute the next scheduled piece of code.
      Specified by:
      terminateCurrent in interface IScriptEngine
    • registerJar

      public void registerJar​(URL url)
      Description copied from interface: IScriptEngine
      Register a jar file and add it to the classpath. After registering, classes within the jar file shall be usable within the script.
      Specified by:
      registerJar in interface IScriptEngine
      Parameters:
      url - url to load jar file from
    • removeVariable

      public Object removeVariable​(String name)
      Description copied from interface: IDebugEngine
      Remove a variable from the scope.
      Specified by:
      removeVariable in interface IDebugEngine
      Parameters:
      name - variable to be removed.
      Returns:
      variable content
    • setupDebugger

      public void setupDebugger​(org.eclipse.debug.core.ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode)
      Specified by:
      setupDebugger in interface IDebugEngine
    • getTestRoot

      public ITestContainer getTestRoot()
      Get the root container for all executed test entities. This container gets created once and remains constant for the whole lifecycle of this engine. Its child elements may change however depending on what entities get executed.
      Returns:
      root container
    • getExceptionStackTrace

      public ScriptStackTrace getExceptionStackTrace()
      Description copied from interface: IDebugEngine
      Get the stack trace of the last thrown exception of the current thread. Will be populated when an exception is thrown by the script engine. Can be evaluated in a try/catch statement within the script. Only available during script runtime.
      Specified by:
      getExceptionStackTrace in interface IDebugEngine
      Returns:
      last exception stack trace or null
    • getExceptionStackTrace

      public ScriptStackTrace getExceptionStackTrace​(Object thread)
      Description copied from interface: IDebugEngine
      Get the stack trace of the last thrown exception of the given thread. Will be populated when an exception is thrown by the script engine. Can be evaluated in a try/catch statement within the script. Only available during script runtime.
      Specified by:
      getExceptionStackTrace in interface IDebugEngine
      Parameters:
      thread - thread to get last exception stacktrace from
      Returns:
      last exception stack trace or null
    • terminate

      public void terminate()
      Description copied from interface: IScriptEngine
      Terminate this interpreter. Addresses a request to terminate current script execution. When the request will be handled is implementation specific.
      Specified by:
      terminate in interface IScriptEngine
      Overrides:
      terminate in class AbstractScriptEngine
    • createScriptEngine

      public IScriptEngine createScriptEngine​(ITestSuite testSuite, Object resource)
      Create a script engine for a given testsuite and resource. The testsuite might provide information on the default engine to use. The resource might need a different engine to execute.
      Parameters:
      testSuite - testsuite to be executed from or null
      resource - resource to execute or null
      Returns:
      script engine or null
    • getVariables

      public Collection<EaseDebugVariable> getVariables​(Object scope)
      Description copied from interface: IDebugEngine
      Get variables within a specific scope or child elements for a given object.
      Specified by:
      getVariables in interface IDebugEngine
      Parameters:
      scope - scope or parent object
      Returns:
      variables assigned to scope