|
void addTestRunListener(DaemonTestRunListener listener, boolean synchronous, long timeout) |
|
Parameters |
listener | The listener to add. |
synchronous |
Whether the listener should get notified synchronously, in which case the test run
will be blocked while the listener is processing the event.
|
timeout |
Timeout in milliseconds for callbacks to the listener. If the listener does not
reply within that time the listener is automatically unregistered to prevent further
problems. In case of a synchronous listener the test run will then continue. A value
of 0 means no timeout which is dangerous but may be useful.
|
|
|
boolean callProcedure(String procedure, Properties bindings=None) |
|
Parameters |
procedure |
The procedure to run, of the form Suite#Procedure where
Procedure is the fully qualified name of the 'Procedure'.
|
bindings |
An optional set of variable bindings. These variables have higher precedence than
the globals or any bindings on the fallback stack.
|
Returns |
True if the procedure call was started, false if suite or procedure could not be
found.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If no run can be started in the current state, i.e. if the state is neither
STATE_IDLE nor STATE_FINISHED.
|
|
void clearGlobals() |
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
void clearTestRunListeners() |
|
|
|
String getGlobal(String name) |
|
Parameters |
name | The name of the variable. |
Returns |
The value of the variable or null if undefined.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
Properties getGlobals() |
|
Returns |
The global variables.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
String getIdentifier() |
|
Returns |
The identifier for the DaemonRunContext.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
String getLastTest() |
|
Returns |
The name of the currently running or most recently executed test.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
int getNumThreads() |
|
Returns |
The number of threads of the DaemonRunContext's group.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
Properties getProperties(String group) |
|
Parameters |
name | The name of the property or resource group. |
Returns |
The properties or null if no such group exists.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
String getProperty(String group, String name) |
|
Parameters |
name | The name of the property or resource group. |
name | The name of the property. |
Returns |
The value of the property or null if undefined.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
int getResult() |
|
Returns |
The result of the run, one of RESULT_OK, RESULT_WARNING, RESULT_ERROR or RESULT_EXCEPTION.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If the state isn't STATE_FINISHED.
|
|
byte[] getRunLog() |
|
Returns |
The run log dumped into a byte array.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If the state isn't STATE_FINISHED.
|
|
int getRunState() |
|
Returns |
The current run state, one of STATE_IDLE, STATE_SCHEDULED, STATE_RUNNING, STATE_PAUSED or
STATE_FINISHED.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
TestRunDaemon getTestRunDaemon() |
|
Returns |
The TestRunDaemon of the DaemonRunContext.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
int getThreadNum() |
|
Parameters |
| |
Returns |
The thread index of the DaemonRunContext.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
void release() |
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If no DaemonRunContext was allocated.
|
|
void removeTestRunListener(DaemonTestRunListener listener) |
|
Parameters |
listener | The listener to remove. |
|
|
void rollbackDependencies() |
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If no run can be started in the current state, i.e. if the state is neither
STATE_IDLE nor STATE_FINISHED.
|
|
boolean runTest(String test, Properties bindings=None) |
|
Parameters |
test |
The test to run, of the form Suite#Test where #Test is
optional and Test is the fully qualified name of a 'Test set' or
'Test case' or just ".". The latter is equivalent to specifying just
Suite and causes the whole test suite to be executed.
Examples:
MySuite | | Runs whole test suite MySuite . | MySuite#. | | Runs whole test suite MySuite . | MySuite#MyTestSet | | Runs test set MyTestSet in test suite MySuite . | MySuite#MyTestSet.MyTestCase | | Runs test case MyTestCase located in test set
MyTestSet in test suite MySuite . |
|
bindings |
An optional set of variable bindings. These variables have higher precedence than
the globals or any bindings on the fallback stack.
|
Returns |
True if the test was started, false if suite or test could not be found.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If no run can be started in the current state, i.e. if the state is neither
STATE_IDLE nor STATE_FINISHED.
|
|
void setGlobals(Properties globals) |
|
Parameters |
globals |
The global variables to set.
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
void setIdentifier(String identifier) |
|
Parameters |
identifier |
The identifier to set.
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
void setRootDirectory(String directory) |
|
Parameters |
directory |
The new root directory.
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|
void stopRun() |
|
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
IllegalStateException |
If no run was scheduled.
|
|
boolean waitForRunState(int state, long timeout) |
|
Parameters |
state |
The state to wait for.
|
timeout |
Maximum time in milliseconds to wait.
|
Returns |
True if the state was reached, false if timed out.
|
Throws |
RemoteException |
If something RMI specific goes wrong.
|
|