TestCenter Reference
|
Singleton for important helper facilities for the different tests. More...
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 | runTestInCurrentMlabInstance (self) |
Set if tests are not run in secure mode. More... | |
def | runTestInSecureMode (self) |
Set if tests are run in secure mode. More... | |
def | testIsRunInSecureMode (self) |
Check if tests are run in secure mode. 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... | |
Singleton for important helper facilities for the different tests.
Definition at line 298 of file TestHelper.py.
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 359 of file TestHelper.py.
def TestSupport.TestHelper.TestHelper.__new__ | ( | self, | |
* | args, | ||
** | kargs | ||
) |
The new method.
Definition at line 350 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper.getInstance().
def TestSupport.TestHelper.TestHelper.addExtraTestCaseResult | ( | self, | |
extraTestCaseResult | |||
) |
Definition at line 636 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mExtraTestCaseResults.
Referenced by TestCenterAdvanced.TestCase.TestCase.run().
def TestSupport.TestHelper.TestHelper.clearChangeSet | ( | self | ) |
Clear the change set stakc without restoring the field values.
Definition at line 552 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSetStack, and TestSupport.TestHelper.TestHelper.popChangeSet().
def TestSupport.TestHelper.TestHelper.getCallerStackFrame | ( | self | ) |
Definition at line 626 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mStackFrame.
def TestSupport.TestHelper.TestHelper.getChangeSet | ( | self | ) |
Return the ChangeSet on top of the stack.
Definition at line 562 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSetStack.
def TestSupport.TestHelper.TestHelper.getChangeSetStackLength | ( | self | ) |
Get the length of the ChangeSet stack.
Definition at line 573 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSetStack.
def TestSupport.TestHelper.TestHelper.getGlobalContext | ( | self | ) |
Definition at line 429 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mCtx.
def TestSupport.TestHelper.TestHelper.getHelperContext | ( | self | ) |
Definition at line 463 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mHelperModule.
def TestSupport.TestHelper.TestHelper.getInstance | ( | self, | |
* | args, | ||
** | kargs | ||
) |
The default constructor.
Static method to have a reference to **THE UNIQUE** instance
Definition at line 367 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper.__instance, TestSupport.TestHelper.TestHelper.__lockObj, TestSupport.TestHelper.TestHelper._mChangeSetStack, TestSupport.TestHelper.TestHelper._mCtx, TestSupport.TestHelper.TestHelper._mEnvironmentStack, TestSupport.TestHelper.TestHelper._mHelperModule, and TestSupport.TestHelper.TestHelper._mResultDirectory.
Referenced by TestSupport.TestHelper.TestHelper.__new__().
def TestSupport.TestHelper.TestHelper.getLogHandler | ( | self | ) |
Get the current log handler.
This returns None if no log handler is set!
Definition at line 618 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mLogHandler.
def TestSupport.TestHelper.TestHelper.getMacrosLogOnSuccess | ( | self | ) |
Definition at line 450 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mMacrosLogOnSuccess.
def TestSupport.TestHelper.TestHelper.getModuleName | ( | self | ) |
Definition at line 481 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mModuleName.
def TestSupport.TestHelper.TestHelper.getPackageList | ( | self | ) |
Return the list of available packages.
Definition at line 423 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mPackageList.
def TestSupport.TestHelper.TestHelper.getResultDirectory | ( | self | ) |
Definition at line 469 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mResultDirectory.
Referenced by TestSupport.TestHelper.TestHelper.setTestCaseResultDirectory().
def TestSupport.TestHelper.TestHelper.getTestCaseContext | ( | self | ) |
Get the context of the test.
Definition at line 457 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseContext.
def TestSupport.TestHelper.TestHelper.getTestCaseDataDirectory | ( | self | ) |
Definition at line 505 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseDataDirectory.
def TestSupport.TestHelper.TestHelper.getTestCaseName | ( | self | ) |
Definition at line 493 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseName.
def TestSupport.TestHelper.TestHelper.getTestCaseResultDirectory | ( | self | ) |
Definition at line 519 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseResultDirectory.
def TestSupport.TestHelper.TestHelper.hasCallerStackFrame | ( | self | ) |
Definition at line 629 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mStackFrame.
def TestSupport.TestHelper.TestHelper.hasInstance | ( | self | ) |
Check if an instance has been initialized.
Definition at line 409 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper.__instance.
def TestSupport.TestHelper.TestHelper.popChangeSet | ( | self | ) |
Pop a ChangeSet from the stack and delete it.
Deleting a ChangeSet will revert the changes.
Definition at line 539 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSetStack.
Referenced by TestSupport.TestHelper.TestHelper.clearChangeSet().
def TestSupport.TestHelper.TestHelper.popEnvironment | ( | self | ) |
Pops an environment dictionary from the stack and makes it the current environment.
Definition at line 660 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mEnvironmentStack.
def TestSupport.TestHelper.TestHelper.pushChangeSet | ( | self | ) |
Push a new ChangeSet to the stack.
Definition at line 529 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSetStack, and TestSupport.TestHelper.TestHelper._mTestCaseContext.
def TestSupport.TestHelper.TestHelper.pushEnvironment | ( | self | ) |
Pushes the current environment to the stack.
Definition at line 651 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mEnvironmentStack.
def TestSupport.TestHelper.TestHelper.resetCallerStackFrame | ( | self | ) |
Definition at line 632 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mStackFrame.
def TestSupport.TestHelper.TestHelper.runTestInCurrentMlabInstance | ( | self | ) |
Set if tests are not run in secure mode.
Definition at line 580 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mSecureTesting.
def TestSupport.TestHelper.TestHelper.runTestInSecureMode | ( | self | ) |
Set if tests are run in secure mode.
Definition at line 587 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mSecureTesting.
def TestSupport.TestHelper.TestHelper.setCallerStackFrame | ( | self, | |
stackFrame | |||
) |
Definition at line 623 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mStackFrame.
def TestSupport.TestHelper.TestHelper.setLogHandler | ( | self, | |
logHandler | |||
) |
Set the current log handler.
@params logHandler The current log handler.
Definition at line 602 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mLogHandler.
def TestSupport.TestHelper.TestHelper.setMacrosLogOnSuccess | ( | self, | |
macrosLogOnSuccess | |||
) |
Definition at line 444 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mMacrosLogOnSuccess.
def TestSupport.TestHelper.TestHelper.setModuleName | ( | self, | |
moduleName | |||
) |
Definition at line 475 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mModuleName.
def TestSupport.TestHelper.TestHelper.setPackageList | ( | self, | |
packageList | |||
) |
Set the list of available packages.
Definition at line 416 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mPackageList.
def TestSupport.TestHelper.TestHelper.setTestCaseContext | ( | self, | |
ctx | |||
) |
Set the context of the test.
Definition at line 436 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mChangeSet, TestSupport.TestHelper.TestHelper._mExtraTestCaseResults, and TestSupport.TestHelper.TestHelper._mTestCaseContext.
def TestSupport.TestHelper.TestHelper.setTestCaseDataDirectory | ( | self, | |
testCaseDataPath | |||
) |
Definition at line 499 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseDataDirectory.
def TestSupport.TestHelper.TestHelper.setTestCaseName | ( | self, | |
testCaseName | |||
) |
Definition at line 487 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseName.
def TestSupport.TestHelper.TestHelper.setTestCaseResultDirectory | ( | self, | |
testCaseName, | |||
functionName | |||
) |
Definition at line 511 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mTestCaseResultDirectory, and TestSupport.TestHelper.TestHelper.getResultDirectory().
def TestSupport.TestHelper.TestHelper.takeExtraTestCaseResults | ( | self | ) |
Definition at line 642 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mExtraTestCaseResults.
def TestSupport.TestHelper.TestHelper.testIsRunInSecureMode | ( | self | ) |
Check if tests are run in secure mode.
Definition at line 594 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mSecureTesting.
def TestSupport.TestHelper.TestHelper.unsetLogHandler | ( | self | ) |
Unset the current log handler.
Definition at line 609 of file TestHelper.py.
References TestSupport.TestHelper.TestHelper._mLogHandler.