public interface ExecutionListener
Pluggable interface for objects which need to attach to a script execution.
Classes implementing this interface and plugged in to T-Plan Robot Enterprise through
the standard Plugin API
will be instantiated when
the very first script execution starts.
Code returned by the Plugin.getCode()
method plays a role in the
instantiation order. When a script execution is being started, the ScriptManager
loads a list of plugins implementing this interface sorted in ascending order
by its code. Each class in the list is then instantiated and its
executionStarted(com.tplan.robot.scripting.ScriptingContext)
is called.
Should you want to instantiate the classes in a certain order, design the
plugin codes to be in the ascending alphabetic order reflecting the desired
instantiation order.
All necessary execution related objects such as the test script interpret
or script manager are available through the argument context. Classes
interested in script and/or command events may implement the ScriptListener
resp. CommandListener
interfaces and register with the script manager
available through the context (ScriptingContext.getScriptManager()
).
An event of the execution end may be received through the ScriptListener
interface with the script event code equal to ScriptEvent.SCRIPT_EXECUTION_FINISHED
.
T-Plan Robot Enterprise, (C) 2009-2025 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
executionStarted(ScriptingContext context)
This method gets called just once when the very first script execution
is started.
|
void executionStarted(ScriptingContext context)
ScriptListener
with the script manager available through the context.context
- context of the very first test script execution.