TestStarterThread Class Reference

Inherits threading.Thread.

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 38 of file TestStarterThread.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 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 55 of file TestStarterThread.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 113 of file TestStarterThread.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 (void)
value value to which parameter should be set (void)

Definition at line 128 of file TestStarterThread.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 142 of file TestStarterThread.py.


Member Data Documentation

__test = None [static, private]

Definition at line 40 of file TestStarterThread.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