TestStarterNoThread Class Reference

List of all members.


Detailed Description

This class is a wrapper thread supposed to load the needed test module.

Therefore the test type has to be specified (e.g. 'db' to load module 'modules.DbTest'). Additionally it provides methods to configure the test. Every test module is expected to implement a method 'run' which is called by this test starter.

Author:
Enrico Hartung <enrico@iptel.org>
License:
GPL

Definition at line 36 of file TestStarterNoThread.py.


Public Member Functions

def __init__
 Constructor.
def set
 Generic setter for the attributes of loaded test.
def setParameter
 Generic setter for configuration parameters of loaded test.
def start
 Start the loaded test.
def join
 Dummy method to emulate a threads behavior.
def run
 Run the loaded test.

Static Private Attributes

 __test = None

Member Function Documentation

def __init__ (   self,
  testType,
  name,
  timeout,
  caller,
  server = ('localhost', None,
  expectedResult = None 
)

Constructor.

Parameters:
testType type of the test to be loaded (string)
name name of this process (string)
timeout the timeout after which the process is terminated (int)
caller a reference to the object that called this one (needed for callback) (TestCase)
thread True = use a starter thread, False use a simple starter (boolean)
server server to run tool on ((hostname , xmlrpclib.Server object))
expectedResult exptected test result (TestResult)

Definition at line 54 of file TestStarterNoThread.py.

def set (   self,
  name,
  value 
)

Generic setter for the attributes of loaded test.

Only attributes with status protected or public can be set. If no test has been loaded this method does nothing.

Parameters:
name name of the attribute (string)
value value to which attribute should be set (void)

Definition at line 110 of file TestStarterNoThread.py.

def setParameter (   self,
  name,
  value 
)

Generic setter for configuration parameters of loaded test.

If no test has been loaded this method does nothing.

Parameters:
name name of the config parameter (string)
value value to which parameter should be set (void)

Definition at line 126 of file TestStarterNoThread.py.

def start (   self  ) 

Start the loaded test.

This method just calls the run method to emulate a threads behavior.

Definition at line 139 of file TestStarterNoThread.py.

def join (   self  ) 

Dummy method to emulate a threads behavior.

Definition at line 147 of file TestStarterNoThread.py.

def run (   self  ) 

Run the loaded test.

Therefore the method 'run' of the loaded test module is called. So it is expected that the loaded test module implements the method 'run'. If no test has been loaded this method does nothing.

Definition at line 158 of file TestStarterNoThread.py.


Member Data Documentation

__test = None [static, private]

Definition at line 39 of file TestStarterNoThread.py.


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 17:28:33 2008 for TestEnv by  doxygen 1.5.5