TestEnv Class Reference

Inheritance diagram for TestEnv:

TestContainer

List of all members.


Detailed Description

This abstract class is the parent class for all test cases.

It provides all the functionalities a test case need.

The following features are provided:

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

Definition at line 58 of file TestEnv.py.


Public Member Functions

def __init__
 Basic constructor of all test containers.
def init
 Pseudo constructor.
def main
 Main method of test environment.

Private Member Functions

def _paramCallback
 Handle the parameters provided via command line.
def __runTestCases
 Walk recursivly through test structure and run all included test cases.
def __parseTestResults
 Walk recursivly through test structure and get all results from included test cases.
def __formatTestResults
 Format test results to be displayed on command line (ASCII code).

Private Attributes

 __name

Static Private Attributes

string __name = ""
 __logManager = None
 __userManager = None
 __setupManager = None

Member Function Documentation

def _paramCallback (   self,
  name,
  value 
) [private]

Handle the parameters provided via command line.

Parameters:
name name of parameter (string)
value value of parameter (string)

Definition at line 79 of file TestEnv.py.

def __init__ (   self  ) 

Basic constructor of all test containers.

Reimplemented from TestContainer.

Definition at line 86 of file TestEnv.py.

def init (   self  ) 

Pseudo constructor.

This function is called by the __init__ function from the parent. Don't define your own __init__ here!

Definition at line 99 of file TestEnv.py.

def __runTestCases (   self,
  units,
  args 
) [private]

Walk recursivly through test structure and run all included test cases.

For every test case the environment is created. This includes the creation of the test users, the generation of the log file path, the result handling and logging. After the test all needed resources are cleaned up.

Additional arguments:

  • 'logfilepath' - path to the log file directory

Parameters:
units test units (list of testenv.core.TestUnit)
args additional arguments (e.g. log file path) (dict)

Definition at line 126 of file TestEnv.py.

def __parseTestResults (   self,
  units 
) [private]

Walk recursivly through test structure and get all results from included test cases.

Parameters:
units test units (list of testenv.core.TestUnit)
Returns:
test results (dict)

Definition at line 188 of file TestEnv.py.

def __formatTestResults (   self,
  results 
) [private]

Format test results to be displayed on command line (ASCII code).

Parameters:
results test results (dict)
Returns:
formatted string of test results (string)

Definition at line 212 of file TestEnv.py.

def main (   self  ) 

Main method of test environment.

It starts the test case and handles its result.

Definition at line 243 of file TestEnv.py.


Member Data Documentation

string __name = "" [static, private]

Definition at line 60 of file TestEnv.py.

__logManager = None [static, private]

Definition at line 63 of file TestEnv.py.

__userManager = None [static, private]

Definition at line 66 of file TestEnv.py.

__setupManager = None [static, private]

Definition at line 69 of file TestEnv.py.

__name [private]

Definition at line 81 of file TestEnv.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