unitee.common
Interface TestManager

All Known Implementing Classes:
DefaultTestManager, RemoteTestManagerStub

public interface TestManager

A manager interface for unitee framework. Client test developers which develop must use an implementation of this class in order to work with unitee, e.g. find tests, run tests , etc.


Method Summary
 Test findTest(java.lang.String qualifiedName)
          Finds a test.
 TestSuite getRootTestSuite()
          Returns a built TestSuite object which is the root test suite in the system.
 TestFactory getTestFactory()
          Returns the factory with which the client can create Test related objects.
 void listTest(Test test, java.io.PrintStream output, boolean printHTML)
          Lists the test identified by qualifiedName, its subtests and parameters.
 void runTest(Test test, java.io.PrintStream output, boolean printHTML)
          Runs the test.
 void saveChanges()
          Saves the changes made to the root test suite and its subtests to a persistent store.
 

Method Detail

getRootTestSuite

public TestSuite getRootTestSuite()
Returns a built TestSuite object which is the root test suite in the system.
Returns:
TestSuite the root test suite

saveChanges

public void saveChanges()
Saves the changes made to the root test suite and its subtests to a persistent store. The state of any of the tests could have changed by any other thread/client. The method saves the tree as it is NOW.

findTest

public Test findTest(java.lang.String qualifiedName)
Finds a test. This method is a convenient method (mostly in terms of network traffic) that is logically equivilent to getRootTestSuite().findTest(qualifiedName).

listTest

public void listTest(Test test,
                     java.io.PrintStream output,
                     boolean printHTML)
Lists the test identified by qualifiedName, its subtests and parameters.
Parameters:
test - the test to be inspected
output - to which text will be printed to
printHTML - weather to emit output as HTML or not

runTest

public void runTest(Test test,
                    java.io.PrintStream output,
                    boolean printHTML)
Runs the test. Called by Unitee clients. A client specifies the tests (if using a compound test objects) and the report depending on the type of the client (command prompt, servlet). Clients should not call test.test(report) directly ,as the processing of the test need to be on unitee's JVM.
Parameters:
test - the test object to be tested
output - where to print the test results
printHTML - true if the output should be HTML formatted

getTestFactory

public TestFactory getTestFactory()
Returns the factory with which the client can create Test related objects.
Returns:
TestFactory
Throws:
-