Package org.eclipse.ease.lang.unittest
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.internal.jobs.InternalJob>,IAdaptable,IDebugEngine,IScriptEngine
Script engine executing *.suite files and
ITestEntity elements.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringName of variable to be injected into executing test engines.static final StringFields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITINGFields inherited from interface org.eclipse.ease.IScriptEngine
TRACE_SCRIPT_ENGINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateScriptEngine(ITestSuite testSuite, Object resource) Create a script engine for a given testsuite and resource.Get the root container for all executed test entities.getVariables(Object scope) Get variables within a specific scope or child elements for a given object.voidregisterJar(URL url) Register a jar file and add it to the classpath.removeVariable(String name) Remove a variable from the scope.voidreset()voidsetupDebugger(ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode) voidTerminate this interpreter.voidStops the currently executed piece of code.Methods inherited from class org.eclipse.ease.AbstractScriptEngine
addExecutionListener, addSecurityCheck, execute, getCurrentScriptEngine, getDescription, getErrorStream, getExecutedFile, getInputStream, getLaunch, getOutputStream, getStackTrace, getVariable, getVariables, hasVariable, inject, isFinished, joinEngine, joinEngine, removeExecutionListener, setCloseStreamsOnTerminate, setEngineDescription, setErrorStream, setExecutionRootFile, setInputStream, setLaunch, setOutputStream, setVariableMethods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, create, create, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRuleMethods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareToMethods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.ease.IDebugEngine
getStackTrace, getThreadMethods inherited from interface org.eclipse.ease.IScriptEngine
addExecutionListener, addSecurityCheck, execute, getDescription, getErrorStream, getExecutedFile, getInputStream, getLaunch, getName, getOutputStream, getVariable, getVariables, hasVariable, inject, isFinished, joinEngine, joinEngine, removeExecutionListener, schedule, setCloseStreamsOnTerminate, setErrorStream, setInputStream, setOutputStream, setVariable
-
Field Details
-
ENGINE_ID
- See Also:
-
TEST_FILE_VARIABLE
Name of variable to be injected into executing test engines.- See Also:
-
TEST_SUITE_VARIABLE
- See Also:
-
-
Constructor Details
-
TestSuiteScriptEngine
public TestSuiteScriptEngine()
-
-
Method Details
-
terminateCurrent
public void terminateCurrent()Description copied from interface:IScriptEngineStops the currently executed piece of code. Will continue to execute the next scheduled piece of code.- Specified by:
terminateCurrentin interfaceIScriptEngine
-
registerJar
Description copied from interface:IScriptEngineRegister a jar file and add it to the classpath. After registering, classes within the jar file shall be usable within the script.- Specified by:
registerJarin interfaceIScriptEngine- Parameters:
url- url to load jar file from
-
removeVariable
Description copied from interface:IDebugEngineRemove a variable from the scope.- Specified by:
removeVariablein interfaceIDebugEngine- Parameters:
name- variable to be removed.- Returns:
- variable content
-
setupDebugger
public void setupDebugger(ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode) - Specified by:
setupDebuggerin interfaceIDebugEngine
-
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
-
terminate
public void terminate()Description copied from interface:IScriptEngineTerminate this interpreter. Addresses a request to terminate current script execution. When the request will be handled is implementation specific.- Specified by:
terminatein interfaceIScriptEngine- Overrides:
terminatein classAbstractScriptEngine
-
createScriptEngine
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 ornullresource- resource to execute ornull- Returns:
- script engine or
null
-
getVariables
Description copied from interface:IDebugEngineGet variables within a specific scope or child elements for a given object.- Specified by:
getVariablesin interfaceIDebugEngine- Parameters:
scope- scope or parent object- Returns:
- variables assigned to scope
-
reset
public void reset()
-