org.jete.cases
Class MultiTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jete.cases.BaseActionTestCase
              extended byorg.jete.cases.MultiTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ContextFileTestCase

public class MultiTestCase
extends BaseActionTestCase

This class promotes a grouping of various test cases cases sets, allowing the the logical relation of test cases to each other.

The main advantage of this class is the capacity for providing a thread pool for running several instances of testcases at once, thereby significantly reducing overall test time (especially for tests where communication overhead is high). It should be noted that when using the pool, only 1 set of tests should be accessing the pool at any one time. This shouldn't normally be a problem, as pooled tests are usually run sequential (e.g. 1 pooled set of tests, then another). Any heirarchy of pooled tests will be a problem, as multiple tests accessing the same pool causes both tests to wait until all tests have completed execution.

Version:
$Id: MultiTestCase.html,v 1.3 2006/03/12 02:46:52 tdeast Exp $

Field Summary
protected  junit.framework.TestResult result
           
 
Constructor Summary
MultiTestCase()
           
 
Method Summary
 EDU.oswego.cs.dl.util.concurrent.PooledExecutor getPooledExecutor()
           
 long getPoolShutdownWaitTime()
           
 java.util.List getTestCases()
           
 void run(junit.framework.TestResult result)
          Override the run(TestResult) method to store the results locally, allowing the runTestCases method to pass the results to each specified sub test.
 void setPooledExecutor(EDU.oswego.cs.dl.util.concurrent.PooledExecutor pooledExecutor)
           
 void setPoolShutdownWaitTime(long poolShutdownWaitTime)
           
 void setTestCases(java.util.List testCases)
           
 
Methods inherited from class org.jete.cases.BaseActionTestCase
getSetupActions, getTearDownActions, runActions, setSetupActions, setTearDownActions, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, 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

result

protected junit.framework.TestResult result
Constructor Detail

MultiTestCase

public MultiTestCase()
Method Detail

run

public void run(junit.framework.TestResult result)
Override the run(TestResult) method to store the results locally, allowing the runTestCases method to pass the results to each specified sub test.

Because this overrides the run(TestResult) method, it calls setup and teardown manually.

Parameters:
result -

getPooledExecutor

public EDU.oswego.cs.dl.util.concurrent.PooledExecutor getPooledExecutor()

setPooledExecutor

public void setPooledExecutor(EDU.oswego.cs.dl.util.concurrent.PooledExecutor pooledExecutor)

getTestCases

public java.util.List getTestCases()

setTestCases

public void setTestCases(java.util.List testCases)

getPoolShutdownWaitTime

public long getPoolShutdownWaitTime()

setPoolShutdownWaitTime

public void setPoolShutdownWaitTime(long poolShutdownWaitTime)