LogManager Class Reference

List of all members.


Detailed Description

This class manages all that has to do with logging test data.

Therefore following functionallity is provided:

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

Definition at line 43 of file LogManager.py.


Public Member Functions

def __init__
 Constructor Create and store log file directory.
def getLogFilePath
 Return path of current log file directory.
def sendLogsByEmail
 Collects all available log files and sends them together with the results of the test by email to the test administrator.

Private Member Functions

def __flattenDictionary
 Transform a multi-level dictionary into a flat on-level dictionary by writing the hierarchy into the key using an URL style.
def __formatTestResults
 Format test results to be displayed in email message (ASCII code).

Private Attributes

 __args
 __logFilePath
 __testDescription

Static Private Attributes

string __logFilePath = ""
string __testDescription = ""
dictionary __args = {}

Member Function Documentation

def __init__ (   self,
  description,
  args 
)

Constructor Create and store log file directory.

Parameters:
description description of current test case (string)
args arguments from configuration (dict)

Definition at line 62 of file LogManager.py.

def __flattenDictionary (   self,
  rootKey,
  dictionary 
) [private]

Transform a multi-level dictionary into a flat on-level dictionary by writing the hierarchy into the key using an URL style.

e.g.:

                        {'a': {'b': {'c': 0}}} becomes {'a.b.c' : 0}

Parameters:
rootKey the root key (string)
dictionary the dictionary to be flattened (dict)
Returns:
a flat version of the dictionary (dict)

Definition at line 86 of file LogManager.py.

def getLogFilePath (   self  ) 

Return path of current log file directory.

Returns:
path to log files (string)

Definition at line 106 of file LogManager.py.

def __formatTestResults (   self,
  results 
) [private]

Format test results to be displayed in email message (ASCII code).

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

Definition at line 117 of file LogManager.py.

def sendLogsByEmail (   self,
  testResults 
)

Collects all available log files and sends them together with the results of the test by email to the test administrator.

Parameters:
testResults {'success', '(list of testenv.core.TestResult)'} (dict)

Definition at line 149 of file LogManager.py.


Member Data Documentation

string __logFilePath = "" [static, private]

Definition at line 46 of file LogManager.py.

string __testDescription = "" [static, private]

Definition at line 49 of file LogManager.py.

dictionary __args = {} [static, private]

Definition at line 52 of file LogManager.py.

__args [private]

Definition at line 63 of file LogManager.py.

__logFilePath [private]

Definition at line 66 of file LogManager.py.

__testDescription [private]

Definition at line 68 of file LogManager.py.


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

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