public class StagedSuite extends com.itko.lisa.coordinator.BaseCoordinator implements SuiteCoordinator, TestEventListener, com.itko.util.MonitoredObject
Modifier and Type | Class and Description |
---|---|
static class |
StagedSuite.SuiteEvent
The class that hold suite-level event info.
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
cat |
static java.lang.String |
copyrightNotice |
cs, eventLogger, mar, MAX_FAILURE_EVENTS, MAXUNRUNAGE, mcontroller, name, realMC, ri, runName, statcat, STATS_REFRESH_RATE_MS, tem, testEndedTS, testStartedTS, uniqueId
SUITE_DEF_NAME
AUTO_SIMULATOR, LOCAL_SIMULATOR, STATUS_ENDED, STATUS_INIT, STATUS_NOINIT, STATUS_RUNNING
Constructor and Description |
---|
StagedSuite() |
StagedSuite(com.itko.lisa.net.CoordinatorServerClient cs,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addRegressions(java.lang.String suiteDoc)
This method is called to initialize the suite from a suite file.
|
void |
addSingleRegression(java.lang.String testCaseFilename)
This allows you to add a single test to the suite with a name/value pair semantic.
|
void |
addSingleRegression(java.lang.String stagingDoc,
java.lang.String testCase,
java.lang.String coordServer,
java.lang.String auditDoc)
Want to add a test to the suite dynamically at run time before the testing starts?
|
void |
addTestByMARInfo(java.lang.String marInfoFileName)
This allows you to add a single test referenced via a MAR info file to the suite.
|
void |
buildFailureSummary(java.io.PrintWriter o) |
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)
How the LISA execution framework ends the suite execution.
|
java.util.List<RegressionRunner> |
getAbortedTests()
This is a list of RegressionRunner objects that aborted.
|
java.util.List<junit.framework.Test> |
getAllTests()
This will give you a List object containing RegressionRunner objects for all the tests that should run, or
have run, or are running.
|
com.itko.lisa.net.SuiteCoordinatorClient |
getClient()
We are over-riding LisaServerObject to deeper the type of the return
|
int |
getCompletedTests() |
java.lang.String |
getConfigFile()
The name of the configuration we are running.
|
java.util.List<RegressionRunner> |
getCurrentTests()
This will return you a List of the currently running tests.
|
long |
getEstimatedEndTime()
Suites do not support this, so you'll always get -1
|
int[] |
getEventFilter() |
com.itko.util.GenericEventSink |
getEventSink()
Call this method and add your GenericEventSink.Listener implementation to get
suite-level events and no others.
|
java.util.List<RegressionRunner> |
getFailedTests()
This is a list of RegressionRunner objects that failed.
|
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.
|
com.itko.lisa.model.mar.ModelArchiveInfo |
getMARInfo()
This method returns the MAR info file we were staged with, if any.
|
java.lang.String |
getPath()
If we have a suite document path, this is the full path to the suite document
|
RunInfo |
getRunInfo()
The staging info like metrics and reports for this suite are stored in a RunInfo object
If you would like to query it, here you go.
|
java.lang.String |
getRunName()
When you want to know the name of this particular run.
|
java.lang.String |
getRunType()
This this suite running in serial or parallel?
|
junit.framework.TestSuite |
getSuite()
If you want a JUnit test suite of the tests, here they are
|
com.itko.lisa.history.SuiteExecHistory |
getSuiteExecHistory()
This class keeps a history of the suite run.
|
SuiteInfo |
getSuiteInfo()
This holds all the meta data about this suite.
|
int |
getTestCount()
Total number of tests that will run in this suite
|
int |
getTestsNotActive() |
int |
getTestsStaged() |
boolean |
isJUnitMode()
When this staged suite is running in a JUnit emulation mode, this will
tell you so
|
boolean |
isPreview()
CORE-1084: Preview Mode outputs the test names and descriptions but does not actually run the tests.
|
boolean |
isRunLocally() |
boolean |
isUseWhateverCoordinator() |
static void |
main(java.lang.String[] args) |
void |
notifySuiteFinished() |
void |
notifySuiteStarted() |
void |
notifyTestAborted(RegressionRunner rr) |
void |
notifyTestFailed(RegressionRunner rr) |
void |
notifyTestNotActive(RegressionRunner rr) |
void |
notifyTestPassed(RegressionRunner rr) |
void |
notifyTestStaged(RegressionRunner rr) |
StatKeeper |
refreshStatKeeper() |
void |
runNative()
To programmatically run this suite, call this method.
|
int |
runTextRegression(java.io.PrintStream ps) |
void |
setConfigFile(java.lang.String configFile)
Set during init.
|
void |
setJUnitMode(boolean on)
Set by initialization logic, don't do this unless you really know what
you are doing!
|
void |
setModelArchive(com.itko.lisa.model.mar.ModelArchive mar)
Called during init to load this stagedsuite with tests from the suite doc in the
specified model archive.
|
void |
setMonitorArchive(com.itko.lisa.model.mar.ModelArchive mar)
Called during init to load this stagedsuite with tests from the suite doc in the
specified model archive.
|
void |
setPreview(boolean preview)
CORE-1084: Preview Mode outputs the test names and descriptions but does not actually run the tests
|
void |
setRunLocally(boolean runLocally) |
void |
setRunName(java.lang.String runName)
Be careful calling this as it is usually done as part of
initialization
|
void |
setRunType(java.lang.String runType)
Set during init.
|
boolean |
setupRegression(java.lang.String[] args) |
void |
setUseWhateverCoordinator(boolean useWhateverCoordinator) |
void |
startTest()
Call when it's time to run the suite.
|
void |
stopRunningNative()
This will stop a running suite by notifying running tests to stop and
not running any additional tests
|
void |
testEvent(TestEvent event)
The method called on all listeners when we have an event
that was not filtered out.
|
void |
testEvent(TestEvent[] events) |
java.lang.String |
toString() |
protected void |
updateDependentFilters() |
addTestEventListener, destroyCommon, doArchiveCleanup, endTestCommon, fireTestEvent, fireTestEvents, getActualTestTime, getCoordinatorServer, getDataSetManager, getDataSets, getDefaultReportHistoryParameters, getErrorEventListSize, getErrorEvents, getMetricController, getModelArchive, getName, getParent, getServiceName, getStartTime, getStats, getStatus, getTestStats, getUniqueId, getVse, hasTestErrorFired, isLoadTesting, makeMessageFromErrorEvents, makeObject, monitorAlert, notifyOfRemoteEventListener, raiseException, registerSyncPoint, removeRemoteEventListener, removeTestEventListener, resetErrorEvents, runDocSetupCommon, setAsNotVse, setAsVse, setParent, setStatus, stageModelArchive, startTestCommon, unexportFromRMI, updateRemoteEventListener, waitForSyncPoint
deregister, deregister, dumpHeap, dumpThreads, gc, getAttachedMobileDevices, getDeadlockedThreads, getDiagnosticZip, getGcTimePercent, getMetrics, getMetrics, getMetrics, getPerformanceStats, makeZipFromDir, popLogging, pushLogging, register, safeFilename, serviceNameToFilename
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addTestEventListener, fireTestEvent, fireTestEvents, getActualTestTime, getCoordinatorServer, getDataSetManager, getDataSets, getDefaultReportHistoryParameters, getErrorEventListSize, getErrorEvents, getMetricController, getModelArchive, getName, getParent, getStartTime, getStats, getStatus, getTestStats, getUniqueId, hasTestErrorFired, isLoadTesting, makeMessageFromErrorEvents, notifyOfRemoteEventListener, raiseException, removeRemoteEventListener, removeTestEventListener, setParent, stageModelArchive, updateRemoteEventListener
public static final java.lang.String copyrightNotice
protected static org.apache.commons.logging.Log cat
public StagedSuite() throws java.rmi.RemoteException
java.rmi.RemoteException
public StagedSuite(com.itko.lisa.net.CoordinatorServerClient cs, java.lang.String name) throws java.rmi.RemoteException
java.rmi.RemoteException
public com.itko.lisa.net.SuiteCoordinatorClient getClient()
Coordinator
getClient
in interface Coordinator
getClient
in interface com.itko.lisa.net.LisaServerObject
public java.lang.String getLocator()
Coordinator
getLocator
in interface Coordinator
public StatKeeper refreshStatKeeper()
refreshStatKeeper
in class com.itko.lisa.coordinator.BaseCoordinator
public StatKeeper getFinalStats(java.lang.String uid) throws java.rmi.RemoteException
Coordinator
getFinalStats
in interface Coordinator
java.rmi.RemoteException
public com.itko.util.GenericEventSink getEventSink()
public java.util.List<RegressionRunner> getFailedTests()
public java.util.List<RegressionRunner> getAbortedTests()
public void startTest() throws java.rmi.RemoteException, TestRunException
startTest
in interface Coordinator
java.rmi.RemoteException
TestRunException
- if the test could not be startedpublic long getEstimatedEndTime() throws java.rmi.RemoteException
getEstimatedEndTime
in interface Coordinator
java.rmi.RemoteException
public void endTest(boolean immediately) throws java.rmi.RemoteException
endTest
in interface Coordinator
immediately
- -- not supported for suite executionjava.rmi.RemoteException
public void setRunName(java.lang.String runName) throws java.rmi.RemoteException
setRunName
in interface Coordinator
runName
- what you want to call this suite runjava.rmi.RemoteException
public java.lang.String getRunName() throws java.rmi.RemoteException
getRunName
in interface Coordinator
java.rmi.RemoteException
public RunInfo getRunInfo() throws java.rmi.RemoteException
getRunInfo
in interface Coordinator
getRunInfo
in class com.itko.lisa.coordinator.BaseCoordinator
java.rmi.RemoteException
RunInfo
protected void updateDependentFilters() throws java.rmi.RemoteException
updateDependentFilters
in class com.itko.lisa.coordinator.BaseCoordinator
java.rmi.RemoteException
public void destroy() throws java.rmi.RemoteException
Coordinator
destroy
in interface Coordinator
destroy
in class com.itko.lisa.coordinator.BaseCoordinator
java.rmi.RemoteException
public boolean isJUnitMode()
public void setJUnitMode(boolean on)
on
- turn on the subtle differences between running with JUnit or notpublic java.lang.String getConfigFile()
public void setConfigFile(java.lang.String configFile)
configFile
- public java.lang.String getRunType()
public void setRunType(java.lang.String runType)
public boolean isPreview()
public void setPreview(boolean preview)
preview
- Whether to enable preview mode or notpublic junit.framework.TestSuite getSuite()
public SuiteInfo getSuiteInfo()
public void setModelArchive(com.itko.lisa.model.mar.ModelArchive mar) throws java.lang.Exception
setModelArchive
in interface SuiteCoordinator
mar
- the model archive that contains all the suite assets.java.lang.Exception
public void setMonitorArchive(com.itko.lisa.model.mar.ModelArchive mar) throws java.lang.Exception
mar
- the model archive that contains all the suite assets.java.lang.Exception
public com.itko.lisa.model.mar.ModelArchiveInfo getMARInfo()
public void addRegressions(java.lang.String suiteDoc) throws java.lang.Exception
suiteDoc
- the full name of the suite document to load.java.lang.Exception
public void addSingleRegression(java.lang.String stagingDoc, java.lang.String testCase, java.lang.String coordServer, java.lang.String auditDoc)
public void addSingleRegression(java.lang.String testCaseFilename) throws TestDefException
TestDefException
public void addTestByMARInfo(java.lang.String marInfoFileName) throws TestDefException
marInfoFileName
- the MAR info file name to add.TestDefException
public java.util.List<junit.framework.Test> getAllTests()
getAllTests
in interface Coordinator
public void configureForLoadTest() throws java.rmi.RemoteException
Coordinator
configureForLoadTest
in interface Coordinator
configureForLoadTest
in class com.itko.lisa.coordinator.BaseCoordinator
java.rmi.RemoteException
public void runNative()
public com.itko.lisa.history.SuiteExecHistory getSuiteExecHistory() throws java.rmi.RemoteException
getSuiteExecHistory
in interface SuiteCoordinator
java.rmi.RemoteException
public java.lang.String getPath()
public void stopRunningNative() throws java.rmi.RemoteException
java.rmi.RemoteException
public void notifySuiteStarted()
public void notifySuiteFinished() throws java.rmi.RemoteException
java.rmi.RemoteException
public void notifyTestNotActive(RegressionRunner rr)
public void notifyTestStaged(RegressionRunner rr)
public void notifyTestFailed(RegressionRunner rr)
public void notifyTestAborted(RegressionRunner rr)
public void notifyTestPassed(RegressionRunner rr)
public int[] getEventFilter()
getEventFilter
in class com.itko.lisa.coordinator.BaseCoordinator
public void testEvent(TestEvent event)
TestEventListener
testEvent
in interface TestEventListener
event
- the TestEvent that is being publishedpublic void testEvent(TestEvent[] events) throws java.lang.Exception
java.lang.Exception
public java.util.List<RegressionRunner> getCurrentTests()
getCurrentTests
in interface Coordinator
public int getTestCount()
public int getTestsNotActive()
public int getCompletedTests()
public int getTestsStaged()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean setupRegression(java.lang.String[] args) throws java.lang.RuntimeException
java.lang.RuntimeException
public int runTextRegression(java.io.PrintStream ps)
public void buildFailureSummary(java.io.PrintWriter o)
public static void main(java.lang.String[] args)
public void setRunLocally(boolean runLocally)
public boolean isRunLocally()
public boolean isUseWhateverCoordinator()
public void setUseWhateverCoordinator(boolean useWhateverCoordinator)
Copyright © 1998-2014 CA, Inc. All Rights Reserved.