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>
,org.eclipse.core.runtime.IAdaptable
,IDebugEngine
,IScriptEngine
Script engine executing *.suite files and
ITestEntity
elements.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
Name of variable to be injected into executing test engines.static final String
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
Fields 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.void
registerJar
(URL url) Register a jar file and add it to the classpath.removeVariable
(String name) Remove a variable from the scope.void
reset()
void
setupDebugger
(org.eclipse.debug.core.ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode) void
Terminate this interpreter.void
Stops 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, setVariable
Methods 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, yieldRule
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.ease.IDebugEngine
getStackTrace, getThread
Methods 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:IScriptEngine
Stops the currently executed piece of code. Will continue to execute the next scheduled piece of code.- Specified by:
terminateCurrent
in interfaceIScriptEngine
-
registerJar
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 interfaceIScriptEngine
- Parameters:
url
- url to load jar file from
-
removeVariable
Description copied from interface:IDebugEngine
Remove a variable from the scope.- Specified by:
removeVariable
in interfaceIDebugEngine
- 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 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: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 interfaceIScriptEngine
- Overrides:
terminate
in 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 ornull
resource
- resource to execute ornull
- Returns:
- script engine or
null
-
getVariables
Description copied from interface:IDebugEngine
Get variables within a specific scope or child elements for a given object.- Specified by:
getVariables
in interfaceIDebugEngine
- Parameters:
scope
- scope or parent object- Returns:
- variables assigned to scope
-
reset
public void reset()
-