|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.qabase.BaseTestDriver
public abstract class BaseTestDriver
The BaseTestDrive is base class for test drivers used to qa and unit test components. This class takes as parameter a list of class names that extend the BaseTestCore interface. It will then invoke and log every method in the extender of BaseTestCore that has the following signature:
BaseTestCore
,
ResultStatus
Field Summary | |
---|---|
protected Configurator |
_configurator
|
protected java.util.Properties |
_properties
|
static java.lang.String |
SECTION_QA
|
Constructor Summary | |
---|---|
BaseTestDriver()
Default constructor and configurer the BaseTestDriver |
Method Summary | |
---|---|
ResultStatus |
cleanup()
The cleanup method should be used to clean the QA environment used to perform the test cases described in the TestCore class. |
protected static Logger |
getLogger()
This method returns a reference to the _logger associated to the BaseTestDriver. |
protected static Logger |
getLogger(java.lang.Class categoryName)
This method returns a Category class used for logging QA executions |
java.util.Properties |
getProperties()
This method returns a Properties object, corresponding to the global properties for the QA environment. |
java.util.Properties |
getProperties(java.lang.String section)
Returns a specific secion of the confiugrator properties. |
java.lang.String |
getProperty(java.lang.String propKey)
Retrieves the value associated to the key from the default property section. |
java.lang.String |
getProperty(java.lang.String section,
java.lang.String propKey)
Retrieves the value associated to the key from the specified property section. |
java.lang.String |
getPropertyWithDefault(java.lang.String propKey,
java.lang.String defaultValue)
Retrieves the value associated to the key from the default property section. |
java.lang.String |
getPropertyWithDefault(java.lang.String section,
java.lang.String propKey,
java.lang.String defaultValue)
Retrieves the value associated to the key from the specified property section. |
protected void |
initConfigurator()
The method for initializing the Configurator object. |
boolean |
isExcluded(java.lang.String coreClassName,
java.lang.String testCaseName)
The isExcluded method determines whether the specified test case is excluded from execution with this test driver. |
static void |
main(java.lang.String[] args)
main first intializes the test environment by calling the setup method of the desired TestDriver. |
protected static void |
printUsage()
Print out the usage of this executable, in case of error in the command line arguments. |
ResultStatus |
run(BaseTestCore tester)
The run method invokes every test cases described in the implementor of the BaseTestCore interface. |
ResultStatus |
setup()
The setup method should be used to ensure that the QA environment necessary to perform the test cases described in the TestCore class can be performed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SECTION_QA
protected java.util.Properties _properties
protected Configurator _configurator
Constructor Detail |
---|
public BaseTestDriver() throws ConfiguratorException
ConfiguratorException
Method Detail |
---|
protected void initConfigurator() throws ConfiguratorException
ConfiguratorException
protected static final Logger getLogger()
protected static final Logger getLogger(java.lang.Class categoryName)
categoryName
- The name of the new _logger instance
public ResultStatus setup()
ResultStatus
public final ResultStatus run(BaseTestCore tester)
tester
- A reference to an implementor of the BaseTestCore class. This
reference describes all the test cases that are to be invoked by
the test driver.
BaseTestCore
,
ResultStatus
public ResultStatus cleanup()
ResultStatus
public boolean isExcluded(java.lang.String coreClassName, java.lang.String testCaseName)
By default, this method will always return false, indicating all test cases will be executed.
coreClassName
- The test core class name.testCaseName
- The method name of the test case in question. This parameter comes
from the Strings returned by the TestCore's getMethodNames().
public static void main(java.lang.String[] args)
args
- An array of class names, there must be one class name associated with
the desired TestDriver and one or more class names associated with
each of the TestCore classes.public final java.lang.String getProperty(java.lang.String propKey)
propKey
- The property key.
public final java.lang.String getProperty(java.lang.String section, java.lang.String propKey)
section
- The section name.propKey
- The property key.
public final java.lang.String getPropertyWithDefault(java.lang.String propKey, java.lang.String defaultValue)
propKey
- The property key.defaultValue
- The default value to be returned if the property key has no value.
public final java.lang.String getPropertyWithDefault(java.lang.String section, java.lang.String propKey, java.lang.String defaultValue)
section
- The section name.propKey
- The property key.defaultValue
- The default value to be returned if the property key has no value.
public final java.util.Properties getProperties()
public final java.util.Properties getProperties(java.lang.String section)
protected static void printUsage()
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.