|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.extensions.TestDecorator
|
+--junit.extensions.TestSetup
|
+--org.exolab.jmscts.core.AbstractTestRunner
This class enables test cases to be run against different JMS providers
The provider configuration file path is passed at construction. This contains a list of providers to run the tests against.
| Argument | Description | Required |
| config | the provider configuration file path | No |
| output | the report output directory | No |
| filter | the test filter configuration file path | No |
| port | the registry port | No |
| Field Summary | |
static java.lang.String |
DEFAULT_PORT
The default registry port |
| Fields inherited from class junit.extensions.TestDecorator |
fTest |
| Constructor Summary | |
AbstractTestRunner(java.lang.Class test,
java.lang.String[] args)
Construct an instance using the class of the test case, and the list of arguments to configure the test suite |
|
AbstractTestRunner(junit.framework.Test test,
java.lang.String[] args)
Construct an instance with the test to run, and the list of arguments to configure the test suite |
|
| Method Summary | |
void |
abort()
Generate a report, and abort the test |
void |
basicRun(junit.framework.TestResult result)
Runs the test case against each provider |
abstract TestContext |
createContext()
Creates a test context |
protected java.lang.String |
getHome()
Returns the value of the jmscts.home system property,
defaulting to the value of user.dir if its not set |
int |
getPort()
Returns the registry port |
protected ProviderLoader |
getProvider()
Returns the current provider being tested against |
protected void |
mergeSuites(junit.framework.TestSuite suite,
junit.framework.Test test)
Removes nested TestSuite instances from test, adding the
contained Test instances to suite, in order for the
ProviderTestRunner to be invoked successfully. |
protected void |
registerServices(org.exolab.core.service.ServiceGroup services)
Register services |
abstract void |
report(java.lang.String path)
Generate a report |
protected void |
setUp()
Reads the provider configuration |
void |
snapshot(java.lang.String path)
Snapshot the current state of the test |
protected void |
startServices()
Start the services |
void |
stop()
Generate a report and stop the test |
protected void |
tearDown()
Clean up any resources allocated |
| Methods inherited from class junit.extensions.TestSetup |
run |
| Methods inherited from class junit.extensions.TestDecorator |
countTestCases, getTest, toString |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_PORT
| Constructor Detail |
public AbstractTestRunner(java.lang.Class test,
java.lang.String[] args)
test - a class implementing the ConnectionFactoryTestCase
interfaceargs - command line arguments
public AbstractTestRunner(junit.framework.Test test,
java.lang.String[] args)
test - the test to runargs - command line arguments| Method Detail |
public abstract void report(java.lang.String path)
throws java.lang.Exception
path - the path to write the report tojava.lang.Exception - for any error
public void snapshot(java.lang.String path)
throws java.lang.Exception
path - the path to write the report tojava.lang.Exception - for any errorpublic void stop()
public void abort()
public abstract TestContext createContext()
public void basicRun(junit.framework.TestResult result)
basicRun in class junit.extensions.TestDecoratorresult - the instance to collect results inpublic int getPort()
protected void setUp()
throws java.lang.Exception
setUp in class junit.extensions.TestSetupjava.lang.Exception - if the configuration cannot be initialisedprotected ProviderLoader getProvider()
null
if no test is being run
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.extensions.TestSetupjava.lang.Exception - for any error
protected void startServices()
throws java.lang.Exception
java.lang.Exception - for any error
protected void registerServices(org.exolab.core.service.ServiceGroup services)
throws org.exolab.core.service.ServiceException
services - the service group to register the services withorg.exolab.core.service.ServiceException - for any errorprotected java.lang.String getHome()
jmscts.home system property,
defaulting to the value of user.dir if its not setjmscts.home system property
protected void mergeSuites(junit.framework.TestSuite suite,
junit.framework.Test test)
test, adding the
contained Test instances to suite, in order for the
ProviderTestRunner to be invoked successfully.suite - the resulting test suitetest - if an instance of TestSuite, this method will be called
recursively with each contained Test; else the test will be added
directly to suite
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||