public class TestRunner
extends java.lang.Object
TestRegistry
,
CoordinatorServer
Modifier and Type | Class and Description |
---|---|
static class |
TestRunner.ExecutionMode |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyrightNotice |
Constructor and Description |
---|
TestRunner(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerConfiguration) |
Modifier and Type | Method and Description |
---|---|
static int |
execSuite(java.lang.String marFile,
boolean autoStart)
Provides a single-method interface into execution of a test suite.
|
static int |
execSuite(java.lang.String suiteFile,
java.lang.String configFile,
boolean autoStart)
Provides a single-method interface into execution of a test suite.
|
protected static int |
executeTestRunnerPlugin(java.lang.String pluginClassName,
java.lang.String[] args) |
static int |
executeTestRunnerPlugin(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerContext,
java.lang.String[] args) |
protected static int |
exit(TestRunner.ExecutionMode mode,
int result,
java.lang.String message) |
static com.itko.lisa.coordinator.TestRunnerConfiguration |
generateConfiguration(java.lang.String[] args) |
static java.util.List<com.itko.lisa.acl.standards.shared.IResource> |
getAvailableResources(com.itko.lisa.model.mar.ModelArchive mar,
com.itko.lisa.test.Project project,
com.itko.lisa.acl.standards.shared.IResource.ResourceTypes resourceType)
This method is used to get a list of resources available to the current user (when ACL is enabled) or defined through the RESOURCE_GROUP property
in the active project configuration.
|
static java.lang.String |
getPluginClassName(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerContext) |
com.itko.lisa.coordinator.TestRunnerConfiguration |
getTestRunnerConfiguration() |
static void |
initialize() |
static void |
main(java.lang.String[] args) |
static java.lang.Integer |
runPluginIfSpecified(java.lang.String[] args)
Runs the TestRunner plugin instead of the default one if so specified
|
static int |
runThisTest(Coordinator c,
int updateSecs,
java.io.PrintStream statusOut)
This method simplifies exeuting a test case and receiving stats output through
the given stream.
|
static int |
runThisTest(Coordinator c,
int updateSecs,
java.io.PrintStream statusOut,
TestRunner.ExecutionMode mode)
This method simplifies exeuting a test case and receiving stats output through
the given stream.
|
static int |
runThisTest(java.util.List<?> cList,
Coordinator c,
int updateSecs,
java.io.PrintStream statusOut,
java.lang.String htmlReportPath,
TestRunner.ExecutionMode mode)
This method simplifies exeuting a test case and receiving stats output through
the given stream.
|
static int |
runThisTest(java.util.List<?> cList,
Coordinator c,
int updateSecs,
java.io.PrintStream statusOut,
TestRunner.ExecutionMode mode)
This method simplifies exeuting a test case and receiving stats output through
the given stream.
|
static TestCoordinator |
stageTest(Coordinator parent,
com.itko.lisa.model.mar.ModelArchive mar)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTest(Coordinator parent,
com.itko.lisa.model.mar.ModelArchive mar,
com.itko.lisa.test.Project project) |
static TestCoordinator |
stageTest(Coordinator parent,
RunInfo stage,
java.lang.String testCaseFileName,
TestCase test,
java.lang.String csName)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTest(Coordinator parent,
java.lang.String testRun,
java.lang.String testName,
java.lang.String configFile,
java.lang.String csName)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTest(Coordinator parent,
java.lang.String testRun,
java.lang.String testName,
java.lang.String configFile,
java.lang.String csName,
java.util.List<java.lang.String> extras)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTest(RunInfo stage,
java.lang.String testFileName,
TestCase test,
java.lang.String csName)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTest(java.lang.String testRun,
java.lang.String testName,
java.lang.String configFile,
java.lang.String csName)
This method will stage a test with the given parameters onto the network and
return the Coordinator that can be used to start, query, and stop the test.
|
static TestCoordinator |
stageTestByMAR(Coordinator parent,
java.lang.String marFileLocation,
java.lang.String csName)
This as of 5.1 will become probably the most commonly used of the ways to stage tests with TestRunner; we take a
reference to a mar file and we read it and stage it to a possibly remote Coordinator.
|
static TestCoordinator |
stageTestFromMARInfo(Coordinator parent,
java.lang.String marInfoFileName,
java.lang.String csName)
This allows for the staging of a test case by way of a descriptive MAR info file.
|
public static final java.lang.String copyrightNotice
public TestRunner(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerConfiguration)
testRunnerConfiguration
- public com.itko.lisa.coordinator.TestRunnerConfiguration getTestRunnerConfiguration()
public static int execSuite(java.lang.String marFile, boolean autoStart) throws java.lang.Exception
marFile
- the model archive containing the suite you wish to runautoStart
- do you want a System.in-based prompt when the suite is ready
to run?java.io.IOException
java.io.FileNotFoundException
java.lang.Exception
TestDefException
public static int execSuite(java.lang.String suiteFile, java.lang.String configFile, boolean autoStart) throws java.lang.Exception
suiteFile
- the suite you wish to runconfigFile
- the testRunnerContext to run for this suite, or null to use test
default configsautoStart
- do you want a System.in-based prompt when the suite is ready
to run?java.io.IOException
java.io.FileNotFoundException
java.lang.Exception
TestDefException
public static void initialize()
public static void main(java.lang.String[] args)
protected static int executeTestRunnerPlugin(java.lang.String pluginClassName, java.lang.String[] args) throws java.lang.Exception
pluginClassName
- args
- java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.Exception
public static int executeTestRunnerPlugin(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerContext, java.lang.String[] args) throws java.lang.Exception
testRunnerContext
- args
- java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.Exception
public static java.lang.Integer runPluginIfSpecified(java.lang.String[] args)
args
- public static java.lang.String getPluginClassName(com.itko.lisa.coordinator.TestRunnerConfiguration testRunnerContext)
public static com.itko.lisa.coordinator.TestRunnerConfiguration generateConfiguration(java.lang.String[] args)
public static TestCoordinator stageTestByMAR(Coordinator parent, java.lang.String marFileLocation, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
parent
- [opt] the parent Coordinator of the one you want us to make (like a StagedSuite)marFileLocation
- the relative, absolute, http, or classpath reference to a .mar filecsName
- [opt] the name of the specific coordinator server you want to serve this testjava.rmi.RemoteException
TestDefException
public static TestCoordinator stageTest(java.lang.String testRun, java.lang.String testName, java.lang.String configFile, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
testRun
- - the Run document file spectestName
- - the Test Case document file specconfigFile
- - named config in the test case OR the properties document file spec, or null if not usedcsName
- - the name of the CoordinatorServer you want to stage this test upon. If you provide
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static TestCoordinator stageTest(Coordinator parent, java.lang.String testRun, java.lang.String testName, java.lang.String configFile, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
parent
- - the parent Coordinator -- not yet fully implementedtestRun
- - the Run document file spectestName
- - the Test Case document file specconfigFile
- - named config in the test case OR the properties document file spec, or null if not usedcsName
- - the name of the CoordinatorServer you want to stage this test upon. If you provide
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static TestCoordinator stageTest(Coordinator parent, java.lang.String testRun, java.lang.String testName, java.lang.String configFile, java.lang.String csName, java.util.List<java.lang.String> extras) throws java.rmi.RemoteException, TestDefException
parent
- - the parent Coordinator -- not yet fully implementedtestRun
- - the Run document file spectestName
- - the Test Case document file specconfigFile
- - named config in the test case OR the properties document file spec, or null if not usedcsName
- - the name of the CoordinatorServer you want to stage this test upon. If you provide
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static TestCoordinator stageTestFromMARInfo(Coordinator parent, java.lang.String marInfoFileName, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
parent
- [opt] the parent Coordinator of the one you want us to make (like a StagedSuite)marInfoFileName
- the name of the MAR info file to read.csName
- [opt] the name of the specific coordinator server you want to serve this testjava.rmi.RemoteException
TestDefException
public static TestCoordinator stageTest(Coordinator parent, com.itko.lisa.model.mar.ModelArchive mar) throws java.rmi.RemoteException, TestDefException
parent
- - the parent Coordinator -- not yet fully implementedmar
- - the model archive containing the test to deploy.
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static TestCoordinator stageTest(Coordinator parent, com.itko.lisa.model.mar.ModelArchive mar, com.itko.lisa.test.Project project) throws java.rmi.RemoteException, TestDefException
java.rmi.RemoteException
TestDefException
public static TestCoordinator stageTest(RunInfo stage, java.lang.String testFileName, TestCase test, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
stage
- - the Run information file spectest
- - the Test CasecsName
- - the name of the CoordinatorServer you want to stage this test upon. If you provide
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static TestCoordinator stageTest(Coordinator parent, RunInfo stage, java.lang.String testCaseFileName, TestCase test, java.lang.String csName) throws java.rmi.RemoteException, TestDefException
parent
- - the parent Coordinator of this test (not yet fully implemented)stage
- - the Run information file spectest
- - the Test CasecsName
- - the name of the CoordinatorServer you want to stage this test upon. If you provide
a null or empty name, the test is staged locally. If you don't provide a name but you
did provide a tr, then we pick one randomly for you.java.rmi.RemoteException
TestDefException
- if their was an issue with the Run/TestCase/Registry documentsXMLUtils.openXMLDoc(java.lang.String)
,
Coordinator
public static int runThisTest(Coordinator c, int updateSecs, java.io.PrintStream statusOut) throws java.rmi.RemoteException, TestRunException
c
- - the Coordinator that should run this testupdateSecs
- - how frequently you want stats output into the Stream (min of 1)statusOut
- - the Stream object that should receive status output, or nulljava.rmi.RemoteException
TestRunException
Coordinator
,
Environment
public static int runThisTest(Coordinator c, int updateSecs, java.io.PrintStream statusOut, TestRunner.ExecutionMode mode) throws java.rmi.RemoteException, TestRunException
c
- - the Coordinator that should run this testupdateSecs
- - how frequently you want stats output into the Stream (min of 1)statusOut
- - the Stream object that should receive status output, or nullmode
- - the type (standalone or embedded) of execution this test should run underjava.rmi.RemoteException
TestRunException
Coordinator
,
Environment
public static int runThisTest(java.util.List<?> cList, Coordinator c, int updateSecs, java.io.PrintStream statusOut, TestRunner.ExecutionMode mode) throws java.rmi.RemoteException, TestRunException
cList
- - the List of all Coordinators running, or null if it's just one.
very important -- if you pass a list here, LISA will System.exit(0) when
the last test has ended!c
- - the Coordinator that should run this testupdateSecs
- - how frequently you want stats output into the Stream (min of 1)statusOut
- - the Stream object that should receive status output, or nullmode
- - the type (standalone or embedded) of execution this test should run underjava.rmi.RemoteException
TestRunException
Coordinator
,
Environment
public static int runThisTest(java.util.List<?> cList, Coordinator c, int updateSecs, java.io.PrintStream statusOut, java.lang.String htmlReportPath, TestRunner.ExecutionMode mode) throws java.rmi.RemoteException, TestRunException
cList
- - the List of all Coordinators running, or null if it's just one.
very important -- if you pass a list here, LISA will System.exit(0) when
the last test has ended!c
- - the Coordinator that should run this testupdateSecs
- - how frequently you want stats output into the Stream (min of 1)statusOut
- - the Stream object that should receive status output, or nullhtmlReportPath
- - the absolute path to output an HTML report tomode
- - the type (standalone or embedded) of execution this test should run underjava.rmi.RemoteException
TestRunException
Coordinator
,
Environment
protected static int exit(TestRunner.ExecutionMode mode, int result, java.lang.String message)
mode
- result
- message
- public static java.util.List<com.itko.lisa.acl.standards.shared.IResource> getAvailableResources(com.itko.lisa.model.mar.ModelArchive mar, com.itko.lisa.test.Project project, com.itko.lisa.acl.standards.shared.IResource.ResourceTypes resourceType) throws java.lang.Exception
mar
- project
- resourceType
- java.lang.Exception
Copyright © 1998-2014 CA, Inc. All Rights Reserved.