|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.javatest.TestRunner
public abstract class TestRunner
TestRunner is the abstract base class providing the ability to control how tests are run. A default is provided that executes each test by means of a script class.
If a test suite does not wish tom use the default test runner,
it should provide its own implementation of this class. The primary
method which should be implemented is runTests(java.util.Iterator).
| Constructor Summary | |
|---|---|
TestRunner()
|
|
| Method Summary | |
|---|---|
BackupPolicy |
getBackupPolicy()
Get the backup policy to be used when creating the test result files generated by this test runner. |
int |
getConcurrency()
Get the concurrency to be used when running the tests, if applicable. |
TestEnvironment |
getEnvironment()
Get the test environment to be used to execute the tests that will be run by this test runner. |
java.lang.String[] |
getExcludedTestCases(TestDescription td)
Get the names of the test cases to be excluded when running a specific test. |
ExcludeList |
getExcludeList()
Get the exclude list to be used to identify the test cases to be excluded when running tests. |
TestSuite |
getTestSuite()
Get the test suite containing the tests to be run by this test runner. |
WorkDirectory |
getWorkDirectory()
Get the work directory to be used to store the test results generated by this test runner. |
protected void |
notifyFinishedTest(TestResult tr)
This method must be called when each test is finished, to notify any registered observers. |
protected void |
notifyStartingTest(TestResult tr)
This method must be called as each test is started, to notify any registered observers. |
protected abstract boolean |
runTests(java.util.Iterator testIter)
Run the tests obtained from an iterator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestRunner()
| Method Detail |
|---|
public WorkDirectory getWorkDirectory()
public TestSuite getTestSuite()
public BackupPolicy getBackupPolicy()
TestResult.writeResults(WorkDirectory, BackupPolicy)public TestEnvironment getEnvironment()
getEnvironment()public ExcludeList getExcludeList()
getExcludedTestCases(com.sun.javatest.TestDescription)public java.lang.String[] getExcludedTestCases(TestDescription td)
td - the test for which the excluded test cases should be obtained
public int getConcurrency()
getConcurrency()
protected abstract boolean runTests(java.util.Iterator testIter)
throws java.lang.InterruptedException
notifyStartingTest(com.sun.javatest.TestResult).
When the test completes (however it completes) the implementation of
this method must call notifyFinishedTest(com.sun.javatest.TestResult).
testIter - the iterator to be used to obtain the tests to be run
java.lang.InterruptedException - if the test run was interruptedprotected void notifyStartingTest(TestResult tr)
tr - the TestResult object for the test that has been startedHarness.Observerprotected void notifyFinishedTest(TestResult tr)
tr - the TestResult object for the test that has been startedHarness.Observer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||