TestStarter Class Reference

List of all members.


Detailed Description

This class is a wrapper for the test module starter.

It is possible to use a simple starter or a starter thread. 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 the test starter.

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

Definition at line 32 of file TestStarter.py.


Public Member Functions

def __init__
 Constructor.
def set
 Wrapper method for the generic setter method: Generic setter for the attributes of loaded test.
def setParameter
 Wrapper method for the generic setter method: Generic setter for configuration parameters of loaded test.
def start
 Wrapper method for the start method.
def join
 Wrapper method for the join method.
def run
 Wrapper method for the run method: Run the loaded test.

Static Private Attributes

 __starter = None

Member Function Documentation

def __init__ (   self,
  testType,
  name,
  timeout,
  caller,
  thread,
  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 50 of file TestStarter.py.

def set (   self,
  name,
  value 
)

Wrapper method for the generic setter method: 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 68 of file TestStarter.py.

def setParameter (   self,
  name,
  value 
)

Wrapper method for the generic setter method: 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 85 of file TestStarter.py.

def start (   self  ) 

Wrapper method for the start method.

Definition at line 97 of file TestStarter.py.

def join (   self  ) 

Wrapper method for the join method.

Definition at line 105 of file TestStarter.py.

def run (   self  ) 

Wrapper method for the run method: 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 117 of file TestStarter.py.


Member Data Documentation

__starter = None [static, private]

Definition at line 35 of file TestStarter.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