public interface Coordinator
extends com.itko.util.MonitoredObject, com.itko.lisa.coordinator.SyncPointSupport, com.itko.lisa.net.LisaServerObject
Once the test has started, the only methods that will have any effect are:
Simulator
,
TestCase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTO_SIMULATOR
name of the "auto" Simulator that will cause the TestRegistry to find Simulators
|
static java.lang.String |
LOCAL_SIMULATOR
name of the local Simulator that is colocated with the Coordinator
|
static int |
STATUS_ENDED |
static int |
STATUS_INIT |
static int |
STATUS_NOINIT
Possible status of the Coordinator returned by Coordinator.getStatus()
STATUS_NOINIT: Object created but knows nothing (has not been initialized yet).
|
static int |
STATUS_RUNNING |
Modifier and Type | Method and Description |
---|---|
void |
addTestEventListener(TestEventListener tel,
int[] filter)
Use this method to hook into the event mechanism LOCALLY; use the RMI version
for adding remote listeners.
|
void |
configureForLoadTest()
Tells the coord to prepare for a load test.
|
void |
destroy()
Call this method to ensure that the Coordinator will release resources
and not remain in any network collections.
|
void |
endTest(boolean immediately)
This method will stop execution of the test.
|
void |
fireTestEvent(TestEvent ev)
Simulators use this method to propogate events back to the coordinator
so that they can be reported as requested.
|
void |
fireTestEvents(TestEvent[] ev)
This method allows you to send multiple events in one method invocation,
which is a cool thing to do for reducing RMI/threading noise.
|
long |
getActualTestTime()
Once the test has ended, this method will tell you how long the Coordinator
ran the test.
|
java.util.List<?> |
getAllTests()
Get a list of all testcases that can possibly run.
|
com.itko.lisa.net.CoordinatorClient |
getClient()
We are over-riding LisaServerObject to deeper the type of the return
|
com.itko.lisa.net.CoordinatorServerClient |
getCoordinatorServer()
When you want to know the cs -- and it can be null if staged locally!
|
java.util.List<?> |
getCurrentTests()
Get a list of all the currently running Tests -- this will generally be a list of 1 TestCase except when
we are a Suite running in parallel
|
com.itko.lisa.test.IDataSetManager |
getDataSetManager()
Returns a handle to the Data Set Manager.
|
java.util.Map<java.lang.String,DataSet> |
getDataSets()
Returns the data sets of the test case.
|
ParameterList |
getDefaultReportHistoryParameters()
This coordinator will find if the default report generator is on, and if so,
give you the ParameterList of the params.
|
int |
getErrorEventListSize()
Return the size of the ErrorEvent list
|
java.util.List<TestEvent> |
getErrorEvents()
If the test has received errors, here are the error events
If the test has not failed, you will get null.
|
long |
getEstimatedEndTime()
This method will try to tell you when the test should be done.
|
StatKeeper |
getFinalStats(java.lang.String uid)
Gets the 'final' version of the statkeeper object; this is a signal to the coord that the
vuser/instance is going down and that we should keep it around in our summary totals.
|
java.lang.String |
getLocator()
This returns an encoded string that LISA can use to find this coordinator.
|
MetricController |
getMetricController()
This is a workhorse -- the metric data controller
|
com.itko.lisa.model.mar.ModelArchive |
getModelArchive()
This method returns the current Model Archive.
|
java.lang.String |
getName()
The coordinator's name is not necessarily unique throughout the network
and is NOT a network name.
|
com.itko.lisa.net.CoordinatorClient |
getParent()
When a Suite has staged this test, you can get a handle to that Suite here.
|
RunInfo |
getRunInfo()
When the Coordinator initially starts it is generally given a Run Document.
|
java.lang.String |
getRunName()
This is the name given to the Run.
|
long |
getStartTime()
This method will tell you when the test was started.
|
StatKeeper |
getStats()
Returns the whole stat keeper object (as a value since we are RMI) so you can look at
the test run info & the step-by-step performance info
|
int |
getStatus()
This method can be used to track what the coordinator status is.
|
TestRunInfo |
getTestStats()
Will report the info struct as a snapshot of what's going on on this
test run.
|
java.lang.String |
getUniqueId()
Names are great but there are so many, just ask the author typing this for proof ;)
This method gives you access to a should-be-unique code for this particular Coordinator
that should be useful if you need to coordinate objects within this context.
|
boolean |
hasTestErrorFired()
While the Coordinator runs the test, it is checking for non-test fatal and fatal
error events.
|
boolean |
isLoadTesting()
Some components need to know if the coord is load testing, classic example is the TestRunPanel which would
normally allow a pulldown to include all events.
|
java.lang.String |
makeMessageFromErrorEvents()
If the test has received errors, you can call this method to get an error message
produced from those error events.
|
java.lang.String |
notifyOfRemoteEventListener(java.lang.String listenerId,
int[] filter)
There is a JMS Topic related to this Coordinator that remote event listeners use to get events
pushed into their consumers.
|
void |
raiseException(TestRunException ex)
Simulators use this method to propogate a serious test execution
error.
|
void |
removeRemoteEventListener(java.lang.String listenerId) |
void |
removeTestEventListener(TestEventListener tel)
The obvious complement to addTestEventListener so we can remove
event listeners as needed
|
void |
setParent(com.itko.lisa.net.CoordinatorClient parent)
Called internally at just the right time, please don't try this at home
|
void |
setRunName(java.lang.String runName)
Used to set the name of this test run in all events.
|
void |
stageModelArchive(com.itko.lisa.model.mar.ModelArchive mar)
This is called when a test wants to provide the Model Archive to execute the model
|
void |
startTest()
Starts execution of the test.
|
void |
updateRemoteEventListener(java.lang.String listenerId,
int[] filter) |
static final int STATUS_NOINIT
getStatus()
,
Constant Field Valuesstatic final int STATUS_INIT
STATUS_NOINIT
,
Constant Field Valuesstatic final int STATUS_RUNNING
STATUS_NOINIT
,
Constant Field Valuesstatic final int STATUS_ENDED
STATUS_NOINIT
,
Constant Field Valuesstatic final java.lang.String LOCAL_SIMULATOR
static final java.lang.String AUTO_SIMULATOR
java.lang.String getName() throws java.rmi.RemoteException
java.rmi.RemoteException
com.itko.lisa.net.CoordinatorClient getClient() throws java.rmi.RemoteException
getClient
in interface com.itko.lisa.net.LisaServerObject
java.rmi.RemoteException
java.lang.String getLocator() throws java.rmi.RemoteException
java.rmi.RemoteException
com.itko.lisa.net.CoordinatorClient getParent() throws java.rmi.RemoteException
java.rmi.RemoteException
TestCoordinator
,
StagedSuite
void setParent(com.itko.lisa.net.CoordinatorClient parent) throws java.rmi.RemoteException
java.rmi.RemoteException
void stageModelArchive(com.itko.lisa.model.mar.ModelArchive mar) throws java.rmi.RemoteException, LisaException
java.rmi.RemoteException
LisaException
com.itko.lisa.model.mar.ModelArchive getModelArchive() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String getRunName() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String getUniqueId() throws java.rmi.RemoteException
java.rmi.RemoteException
int getStatus() throws java.rmi.RemoteException
java.rmi.RemoteException
STATUS_NOINIT
RunInfo getRunInfo() throws java.rmi.RemoteException
java.rmi.RemoteException
RunInfo
com.itko.lisa.net.CoordinatorServerClient getCoordinatorServer() throws java.rmi.RemoteException
java.rmi.RemoteException
void addTestEventListener(TestEventListener tel, int[] filter) throws java.rmi.RemoteException
tel
- - is the listenter that will get the eventsfilter
- - an array that holds the list of events you want. See
TestEventMgr for the list of what values mean what. Null or empty array means you will
get the default filter, not noFilter, per the TestEvent javadocjava.rmi.RemoteException
TestEvent.defaultFilter
,
TestEventMgr
,
TestEventListener
,
TestEvent
void removeTestEventListener(TestEventListener tel) throws java.rmi.RemoteException
tel
- - is the listenter to removejava.rmi.RemoteException
ParameterList getDefaultReportHistoryParameters() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String notifyOfRemoteEventListener(java.lang.String listenerId, int[] filter) throws java.rmi.RemoteException, TestRunException
listenerId
- some identifier of who this is (make it a GUID that you can remember from call to call)filter
- the TestEvent filter to minimize undesired eventsjava.rmi.RemoteException
TestRunException
void updateRemoteEventListener(java.lang.String listenerId, int[] filter) throws java.rmi.RemoteException
java.rmi.RemoteException
void removeRemoteEventListener(java.lang.String listenerId) throws java.rmi.RemoteException
java.rmi.RemoteException
MetricController getMetricController() throws java.rmi.RemoteException
java.rmi.RemoteException
void startTest() throws java.rmi.RemoteException, TestRunException
java.rmi.RemoteException
TestRunException
- if the test could not be startedlong getStartTime() throws java.rmi.RemoteException
java.rmi.RemoteException
long getEstimatedEndTime() throws java.rmi.RemoteException
java.rmi.RemoteException
long getActualTestTime() throws java.rmi.RemoteException
java.rmi.RemoteException
TestRunInfo getTestStats() throws java.rmi.RemoteException
java.rmi.RemoteException
TestRunInfo
StatKeeper getStats() throws java.rmi.RemoteException
java.rmi.RemoteException
StatKeeper getFinalStats(java.lang.String uid) throws java.rmi.RemoteException
java.rmi.RemoteException
boolean hasTestErrorFired() throws java.rmi.RemoteException
java.rmi.RemoteException
TestEvent.isWholeTestFailureEvent()
java.util.List<TestEvent> getErrorEvents() throws java.rmi.RemoteException
java.rmi.RemoteException
int getErrorEventListSize() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String makeMessageFromErrorEvents() throws java.rmi.RemoteException
java.rmi.RemoteException
void endTest(boolean immediately) throws java.rmi.RemoteException
immediately
- - answers the question do you want the current
test iteration to finish to normal completion? If not, then the
threads running the testcase are interrupted and terminated abruptlyjava.rmi.RemoteException
void setRunName(java.lang.String runName) throws java.rmi.RemoteException
runName
- is the new name to use for this run of the testjava.rmi.RemoteException
void fireTestEvent(TestEvent ev) throws java.rmi.RemoteException
ev
- - the TestEvent object to deliver to all test even consumersjava.rmi.RemoteException
TestEvent
void fireTestEvents(TestEvent[] ev) throws java.rmi.RemoteException
ev
- - an array of TestEvent objects to deliver to all test even consumersjava.rmi.RemoteException
fireTestEvent(com.itko.lisa.test.TestEvent)
void raiseException(TestRunException ex) throws java.rmi.RemoteException
ex
- the TestRunException that has ocurredjava.rmi.RemoteException
TestRunException
void destroy() throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.List<?> getCurrentTests() throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.List<?> getAllTests() throws java.rmi.RemoteException
java.rmi.RemoteException
com.itko.lisa.test.IDataSetManager getDataSetManager() throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.Map<java.lang.String,DataSet> getDataSets() throws java.rmi.RemoteException
java.rmi.RemoteException
void configureForLoadTest() throws java.rmi.RemoteException
java.rmi.RemoteException
boolean isLoadTesting() throws java.rmi.RemoteException
java.rmi.RemoteException
Copyright © 1998-2014 CA, Inc. All Rights Reserved.