TestCenter Reference
TestSupport.TestHelper.TestHelper Class Reference

Singleton for important helper facilities for the different tests. More...

Inheritance diagram for TestSupport.TestHelper.TestHelper:

Public Member Functions

def __new__ (self, *args, **kargs)
 The new method. More...
 
def __init__ (self, *args, **kargs)
 The default constructor. More...
 
def getInstance (self, *args, **kargs)
 The default constructor. More...
 
def hasInstance (self)
 Check if an instance has been initialized. More...
 
def setPackageList (self, packageList)
 Set the list of available packages. More...
 
def getPackageList (self)
 Return the list of available packages. More...
 
def getGlobalContext (self)
 
def setTestCaseContext (self, ctx)
 Set the context of the test. More...
 
def setMacrosLogOnSuccess (self, macrosLogOnSuccess)
 
def getMacrosLogOnSuccess (self)
 
def getTestCaseContext (self)
 Get the context of the test. More...
 
def getHelperContext (self)
 
def getResultDirectory (self)
 
def setModuleName (self, moduleName)
 
def getModuleName (self)
 
def setTestCaseName (self, testCaseName)
 
def getTestCaseName (self)
 
def setTestCaseDataDirectory (self, testCaseDataPath)
 
def getTestCaseDataDirectory (self)
 
def setTestCaseResultDirectory (self, testCaseName, functionName)
 
def getTestCaseResultDirectory (self)
 
def pushChangeSet (self)
 Push a new ChangeSet to the stack. More...
 
def popChangeSet (self)
 Pop a ChangeSet from the stack and delete it. More...
 
def clearChangeSet (self)
 Clear the change set stakc without restoring the field values. More...
 
def getChangeSet (self)
 Return the ChangeSet on top of the stack. More...
 
def getChangeSetStackLength (self)
 Get the length of the ChangeSet stack. More...
 
def setLogHandler (self, logHandler)
 Set the current log handler. More...
 
def unsetLogHandler (self)
 Unset the current log handler. More...
 
def getLogHandler (self)
 Get the current log handler. More...
 
def setCallerStackFrame (self, stackFrame)
 
def getCallerStackFrame (self)
 
def hasCallerStackFrame (self)
 
def resetCallerStackFrame (self)
 
def addExtraTestCaseResult (self, extraTestCaseResult)
 
def takeExtraTestCaseResults (self)
 
def pushEnvironment (self)
 Pushes the current environment to the stack. More...
 
def popEnvironment (self)
 Pops an environment dictionary from the stack and makes it the current environment. More...
 

Detailed Description

Singleton for important helper facilities for the different tests.

Warning
Please note: This is internal stuff and should not be used in tests! The functionality is provided through the TestSupport package.

Definition at line 271 of file TestHelper.py.

Constructor & Destructor Documentation

◆ __init__()

def TestSupport.TestHelper.TestHelper.__init__ (   self,
args,
**  kargs 
)

The default constructor.

Do nothing in here as construction must be done in the getInstance methode.

Definition at line 328 of file TestHelper.py.

Member Function Documentation

◆ __new__()

def TestSupport.TestHelper.TestHelper.__new__ (   self,
args,
**  kargs 
)

The new method.

Definition at line 320 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper.getInstance().

◆ addExtraTestCaseResult()

def TestSupport.TestHelper.TestHelper.addExtraTestCaseResult (   self,
  extraTestCaseResult 
)

◆ clearChangeSet()

def TestSupport.TestHelper.TestHelper.clearChangeSet (   self)

Clear the change set stakc without restoring the field values.

Definition at line 497 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mChangeSetStack, and TestSupport.TestHelper.TestHelper.popChangeSet().

◆ getCallerStackFrame()

def TestSupport.TestHelper.TestHelper.getCallerStackFrame (   self)

Definition at line 544 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mStackFrame.

◆ getChangeSet()

def TestSupport.TestHelper.TestHelper.getChangeSet (   self)

Return the ChangeSet on top of the stack.

Definition at line 506 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mChangeSetStack.

◆ getChangeSetStackLength()

def TestSupport.TestHelper.TestHelper.getChangeSetStackLength (   self)

Get the length of the ChangeSet stack.

Returns
Length of the stack.

Definition at line 516 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mChangeSetStack.

◆ getGlobalContext()

def TestSupport.TestHelper.TestHelper.getGlobalContext (   self)

Definition at line 391 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mCtx.

◆ getHelperContext()

def TestSupport.TestHelper.TestHelper.getHelperContext (   self)

Definition at line 420 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mHelperModule.

◆ getInstance()

◆ getLogHandler()

def TestSupport.TestHelper.TestHelper.getLogHandler (   self)

Get the current log handler.

This returns None if no log handler is set!

Returns
The current log handler.

Definition at line 537 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mLogHandler.

◆ getMacrosLogOnSuccess()

def TestSupport.TestHelper.TestHelper.getMacrosLogOnSuccess (   self)

◆ getModuleName()

def TestSupport.TestHelper.TestHelper.getModuleName (   self)

Definition at line 435 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mModuleName.

◆ getPackageList()

def TestSupport.TestHelper.TestHelper.getPackageList (   self)

Return the list of available packages.

Definition at line 386 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mPackageList.

◆ getResultDirectory()

def TestSupport.TestHelper.TestHelper.getResultDirectory (   self)

◆ getTestCaseContext()

def TestSupport.TestHelper.TestHelper.getTestCaseContext (   self)

Get the context of the test.

Definition at line 415 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mTestCaseContext.

◆ getTestCaseDataDirectory()

def TestSupport.TestHelper.TestHelper.getTestCaseDataDirectory (   self)

◆ getTestCaseName()

def TestSupport.TestHelper.TestHelper.getTestCaseName (   self)

Definition at line 445 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mTestCaseName.

◆ getTestCaseResultDirectory()

def TestSupport.TestHelper.TestHelper.getTestCaseResultDirectory (   self)

◆ hasCallerStackFrame()

def TestSupport.TestHelper.TestHelper.hasCallerStackFrame (   self)

Definition at line 547 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mStackFrame.

◆ hasInstance()

def TestSupport.TestHelper.TestHelper.hasInstance (   self)

Check if an instance has been initialized.

Definition at line 374 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper.__instance.

◆ popChangeSet()

def TestSupport.TestHelper.TestHelper.popChangeSet (   self)

Pop a ChangeSet from the stack and delete it.

Deleting a ChangeSet will revert the changes.

Returns
True if deleting the ChangeSet succeeded.

Definition at line 485 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mChangeSetStack.

Referenced by TestSupport.TestHelper.TestHelper.clearChangeSet().

◆ popEnvironment()

def TestSupport.TestHelper.TestHelper.popEnvironment (   self)

Pops an environment dictionary from the stack and makes it the current environment.

Returns
True if an environment dictionary was removed from the stack.

Definition at line 575 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mEnvironmentStack.

◆ pushChangeSet()

def TestSupport.TestHelper.TestHelper.pushChangeSet (   self)

Push a new ChangeSet to the stack.

Returns
The length of the ChangeSet stack.

Definition at line 476 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mChangeSetStack, and TestSupport.TestHelper.TestHelper._mTestCaseContext.

◆ pushEnvironment()

def TestSupport.TestHelper.TestHelper.pushEnvironment (   self)

Pushes the current environment to the stack.

Definition at line 567 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mEnvironmentStack.

◆ resetCallerStackFrame()

def TestSupport.TestHelper.TestHelper.resetCallerStackFrame (   self)

Definition at line 550 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mStackFrame.

◆ setCallerStackFrame()

def TestSupport.TestHelper.TestHelper.setCallerStackFrame (   self,
  stackFrame 
)

Definition at line 541 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mStackFrame.

◆ setLogHandler()

def TestSupport.TestHelper.TestHelper.setLogHandler (   self,
  logHandler 
)

Set the current log handler.

@params logHandler The current log handler.

Definition at line 523 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mLogHandler.

◆ setMacrosLogOnSuccess()

def TestSupport.TestHelper.TestHelper.setMacrosLogOnSuccess (   self,
  macrosLogOnSuccess 
)

◆ setModuleName()

def TestSupport.TestHelper.TestHelper.setModuleName (   self,
  moduleName 
)

Definition at line 430 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mModuleName.

◆ setPackageList()

def TestSupport.TestHelper.TestHelper.setPackageList (   self,
  packageList 
)

Set the list of available packages.

Definition at line 380 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mPackageList.

◆ setTestCaseContext()

def TestSupport.TestHelper.TestHelper.setTestCaseContext (   self,
  ctx 
)

◆ setTestCaseDataDirectory()

def TestSupport.TestHelper.TestHelper.setTestCaseDataDirectory (   self,
  testCaseDataPath 
)

◆ setTestCaseName()

def TestSupport.TestHelper.TestHelper.setTestCaseName (   self,
  testCaseName 
)

Definition at line 440 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mTestCaseName.

◆ setTestCaseResultDirectory()

def TestSupport.TestHelper.TestHelper.setTestCaseResultDirectory (   self,
  testCaseName,
  functionName 
)

◆ takeExtraTestCaseResults()

def TestSupport.TestHelper.TestHelper.takeExtraTestCaseResults (   self)

◆ unsetLogHandler()

def TestSupport.TestHelper.TestHelper.unsetLogHandler (   self)

Unset the current log handler.

Definition at line 529 of file TestHelper.py.

References TestSupport.TestHelper.TestHelper._mLogHandler.


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