public interface JavaTestScript
ApplicationSupport.createAutomatedRunnable(com.tplan.robot.scripting.JavaTestScript, java.lang.String, java.lang.String[], java.io.PrintStream, boolean)
method and get their test()
method executed when user invokes the
appropriate action in the T-Plan Robot Enterprise GUI or starts the associated automated
test thread programatically from a Java program.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
setContext(ScriptingContext context)
Set context.
|
void |
setInterpret(TestScriptInterpret interpret)
Associate a test script interpret with this Java test script.
|
void |
test()
Test method with the test script code.
|
void test()
void setContext(ScriptingContext context)
Set context. Scripting context is a map holding various objects and
structures which may be needed for script compilation and execution.
A new context instance is passed to this test class before
every execution (i.e. before the test()
method is called).
Context instances are typically created by ScriptManager
.
context
- a context instance.void setInterpret(TestScriptInterpret interpret)
Associate a test script interpret with this Java test script.
This method will be called just once shortly after
this test script gets plugged into an automated test thread through
the ApplicationSupport.createAutomatedRunnable(com.tplan.robot.scripting.JavaTestScript, java.lang.String, java.lang.String[], java.io.PrintStream, boolean)
method.
Object implementing this interface are
recommended to save a reference to the interpret in the method body
and use it to access objects from the execution context and/or register for
script or command events.
interpret
- instance of TestScriptInterpret
which will interpret the code and control execution of this script.