public abstract class AbstractRunner extends java.lang.Object implements JSAFSConfiguredClassStore
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARG_AUTORUN_CLASS
"-autorunclass", the parameter to indicate the class name to run test automatically.
Example, "-autorunclass autorun.full.classname". |
protected static java.util.Vector<java.lang.Object> |
callers |
protected AbstractDriver |
driver
The model driver embedded with JSAFSDriver/InputProcessor, which will handle the keyword at the back-end.
|
protected static java.util.Hashtable<java.lang.String,java.lang.Object> |
instances |
protected boolean |
running |
Constructor and Description |
---|
AbstractRunner() |
Modifier and Type | Method and Description |
---|---|
TestRecordHelper |
action(Component comp,
java.lang.String command,
java.lang.String... params) |
TestRecordHelper |
action(java.lang.String command,
java.lang.String window,
java.lang.String component,
java.lang.String... params) |
void |
addConfiguredClassInstance(java.lang.String classname,
java.lang.Object object)
normally only used internally to store objects as we instantiate them.
|
void |
autorun(java.lang.String[] args)
This is the critical method users could call to commence the automatic
instantiation, configuration, and execution of JSAFSTest methods.
|
protected void |
beforeRun()
Prepare something before running.
|
TestRecordHelper |
command(java.lang.String command,
java.lang.String... params) |
static void |
debug(java.lang.String message) |
AbstractDriver |
driver() |
static void |
error(java.lang.String message) |
java.lang.Object |
getConfiguredClassInstance(java.lang.String classname)
When using JSAFS to automatically instantiate, configure, and execute tests
across many classes and packages the user can retrieve those otherwise
unavailable class object instances here.
|
abstract AbstractDriver |
getDriver()
The model driver embedded with JSAFSDriver/InputProcessor, which will handle the keyword at the back-end.
|
abstract JavaHook |
hookDriver() |
DriverInterface |
iDriver() |
protected boolean |
isRunning()
The indicator tells if the runner/embedded-driver is running or not.
|
JSAFSDriver |
jsafs() |
void |
logFAILED(java.lang.String message,
java.lang.String detail) |
void |
logGENERIC(java.lang.String message,
java.lang.String detail) |
void |
logPASSED(java.lang.String message,
java.lang.String detail) |
InputProcessor |
processor() |
void |
run()
Initiates the embedded drivers and engines to start running if it is not already running.
|
void |
setDriver(AbstractDriver driver) |
void |
terminate()
Shutdown the driver and all related resources such as hooks, engines, services and logs etc.
|
public static final java.lang.String ARG_AUTORUN_CLASS
protected static java.util.Vector<java.lang.Object> callers
protected static java.util.Hashtable<java.lang.String,java.lang.Object> instances
protected boolean running
protected AbstractDriver driver
public java.lang.Object getConfiguredClassInstance(java.lang.String classname)
getConfiguredClassInstance
in interface JSAFSConfiguredClassStore
classname
- -- the full package name of the class to retrieve.
ex: my.test.package.MyTestpublic void addConfiguredClassInstance(java.lang.String classname, java.lang.Object object)
addConfiguredClassInstance
in interface JSAFSConfiguredClassStore
classname
- -- the full path case-sensitive Class name that was used to
instantiate the object.object
- -- the object that was instantiated and used for processing.public abstract AbstractDriver getDriver()
public AbstractDriver driver()
public abstract JavaHook hookDriver()
public void setDriver(AbstractDriver driver)
protected boolean isRunning()
public void run() throws java.lang.Exception
java.lang.Exception
protected void beforeRun()
run()
public void terminate() throws java.lang.Exception
java.lang.Exception
public void autorun(java.lang.String[] args) throws java.lang.Throwable
Minimalist example:
public static void main(String[] args)throws Throwable{ MyTestApp app = new MyTestApp(); new Runner().autorun(args); ... }
Automatic configuration and usage is not required. The user can control test configuration and execution within their custom code if they want.
args
- passed in from command-line Java-- the primordial main(String[] args)java.lang.Throwable
JSAFSTest
public DriverInterface iDriver()
public JSAFSDriver jsafs()
public InputProcessor processor()
public TestRecordHelper action(Component comp, java.lang.String command, java.lang.String... params) throws java.lang.Throwable
java.lang.Throwable
public TestRecordHelper action(java.lang.String command, java.lang.String window, java.lang.String component, java.lang.String... params) throws java.lang.Throwable
java.lang.Throwable
public TestRecordHelper command(java.lang.String command, java.lang.String... params) throws java.lang.Throwable
java.lang.Throwable
public void logGENERIC(java.lang.String message, java.lang.String detail)
public void logPASSED(java.lang.String message, java.lang.String detail)
public void logFAILED(java.lang.String message, java.lang.String detail)
public static void debug(java.lang.String message)
public static void error(java.lang.String message)
Copyright © SAS Institute. All Rights Reserved.