TestCenter Reference
|
The superclass for the different test case categories. More...
Public Member Functions | |
def | __init__ (self, testCaseName, isNewlyCreated=False) |
Default constructor for the test case. More... | |
def | __del__ (self) |
The default destructor. More... | |
def | destroyContext (self) |
def | activate (self) |
def | deactivate (self) |
def | setTestCaseListener (self, testCaseListener) |
def | addExtraTestCaseResult (self, extraTestCaseResult) |
def | callFieldValueTestCase (self, filename, testcase) |
Call the given field-value test case from the given field-value test case set. More... | |
def | isValid (self) |
Has test case loaded without syntax errors? More... | |
def | hasNetwork (self) |
Check whether the test case has a network attached. More... | |
def | networkFileName (self) |
Returns the absolute file name of the attached network or an empty string if no network is attached. More... | |
def | openFiles (self) |
Open the files associated with the test case. More... | |
def | openNetwork (self) |
Open the internal network of the test case. More... | |
def | getType (self) |
Return the type of this test case (generic of functional). More... | |
def | getModule (self) |
Return the module, might be None. More... | |
def | getName (self) |
Return the name of the test case. More... | |
def | getListOfTestFuncs (self) |
Get a list of test functions this test has. More... | |
def | getPackage (self) |
Return the identifier of the package the test case is in. More... | |
def | getTestCaseNode (self) |
Return the XML node with the test case's information. More... | |
def | run (self, resultNode) |
Run the test case and store results in the given xml data structure. More... | |
def | getDocumentation (self, functionName) |
Get the documentation for the given test function. More... | |
Public Attributes | |
futureDone | |
The superclass for the different test case categories.
Definition at line 90 of file TestCase.py.
def TestCenterAdvanced.TestCase.TestCase.__init__ | ( | self, | |
testCaseName, | |||
isNewlyCreated = False |
|||
) |
Default constructor for the test case.
testCaseName | The name of the test case. |
isNewlyCreated | Indicates if the test case is newly created to suppress the warning that no test functions exist. |
Reimplemented in TestCenterAdvanced.TestCaseGeneric.GenericTestCase, and TestCenterAdvanced.TestCaseFunctional.FunctionalTestCase.
Definition at line 121 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__collectedStartupErrorsState, TestCenterAdvanced.TestCase.TestCase.__collectedStartupLog, TestCenterAdvanced.TestCase.TestCase.__collectedStartupWarningsState, TestCenterAdvanced.TestCase.TestCase.__createVirtualTestFunction(), TestCenterAdvanced.TestCase.TestCase.__dummyTestSuite, TestCenterAdvanced.TestCase.TestCase.__functionDict, TestCenterAdvanced.TestCase.TestCase.__perFunctionResultDirectory, TestCenterAdvanced.TestCase.TestCase.__previousTestClass, TestCenterAdvanced.TestCase.TestCase.__setupTestCaseCalled, TestCenterAdvanced.TestCase.TestCase.__stopCollectingAndStoreAsStartupLog(), TestCenterAdvanced.Master.Master.__testCaseListener, TestCenterAdvanced.Slave.Slave.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__valid, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, TestCenterAdvanced.TestCase.TestCase._buildVirtualFunctions(), TestCenterAdvanced.TestCase.TestCase._ctx, TestCenterAdvanced.TestCase.TestCase._dataDirectory, TestCenterAdvanced.TestCase.TestCase._getTestCaseInfo(), TestCenterAdvanced.TestCase.TestCase._loadScriptFile(), TestCenterAdvanced.TestCase.TestCase._testCaseName, TestCenterAdvanced.TestCase.TestCase._testCaseType, TestCenterAdvanced.TestCaseFunctional.FunctionalTestCase._testCaseType, TestCenterAdvanced.TestCaseGeneric.GenericTestCase._testCaseType, TestCenterAdvanced.TestCase.TestCase._testHelper, TestCenterAdvanced.TestCase.TestCase.activate(), and TestCenterAdvanced.TestCase.TestCase.deactivate().
def TestCenterAdvanced.TestCase.TestCase.__del__ | ( | self | ) |
The default destructor.
Definition at line 219 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.destroyContext().
def TestCenterAdvanced.TestCase.TestCase.activate | ( | self | ) |
Definition at line 231 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx, TestCenterAdvanced.TestCase.TestCase._dataDirectory, TestCenterAdvanced.TestCase.TestCase._testCaseName, TestCenterAdvanced.TestCase.TestCase._testHelper, and TestSupport.Base.pushChangeSet().
Referenced by TestCenterAdvanced.TestCase.TestCase.__init__(), and TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.addExtraTestCaseResult | ( | self, | |
extraTestCaseResult | |||
) |
Definition at line 258 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__currentResultNode, TestCenterAdvanced.TestCase.TestCase.__extraTestCasesResults, TestCenterAdvanced.TestCase.TestCase.__functionDict, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, TestCenterAdvanced.TestCase.TestCase._ctx, TestCenterAdvanced.TestCase.TestCase._getTestFunction(), TestCenterAdvanced.TestCase.TestCase._testHelper, and TestSupport.Base.pushChangeSet().
Referenced by TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase | ( | self, | |
filename, | |||
testcase | |||
) |
Call the given field-value test case from the given field-value test case set.
This method is required as the FIELDVALUETEST test methods don't have a valid counterpart in the script file itself.
filename | The field-value test case set. |
testcase | The test case to be executed. |
Definition at line 373 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__createFieldValueTestNode(), TestCenterAdvanced.TestCase.TestCase.__createIterativeTestNode(), TestCenterAdvanced.TestCase.TestCase.__createNormalTestNode(), TestCenterAdvanced.TestCase.TestCase.__createTestGroupNode(), TestCenterAdvanced.TestCase.TestCase.__createUnitTestWrapperNode(), TestCenterAdvanced.TestCase.TestCase.__dummyTestSuite, TestCenterAdvanced.TestCase.TestCase.__functionDict, TestCenterAdvanced.TestCase.TestCase.__getFunctionInfo(), TestCenterAdvanced.TestCase.TestCase.__previousTestClass, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, TestCenterAdvanced.TestCase.TestCase._callableFunctions(), TestCenterAdvanced.TestCase.TestCase._callGroupFunction(), TestCenterAdvanced.TestCase.TestCase._ctx, TestCenterAdvanced.TestCase.TestCase._testHelper, TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase(), TestCenterAdvanced.TestCase.TestCase.getDocumentation(), TestSupport.Base.popChangeSet(), TestSupport.Base.pushChangeSet(), and TestCenterAdvanced.TestCase.unicode.
Referenced by TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase().
def TestCenterAdvanced.TestCase.TestCase.deactivate | ( | self | ) |
Definition at line 242 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._testHelper, and TestSupport.Base.popChangeSet().
Referenced by TestCenterAdvanced.TestCase.TestCase.__init__(), and TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.destroyContext | ( | self | ) |
Definition at line 224 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx.
Referenced by TestCenterAdvanced.TestCase.TestCase.__del__(), and TestCenterAdvanced.TestCase.TestCase.getTestCaseNode().
def TestCenterAdvanced.TestCase.TestCase.getDocumentation | ( | self, | |
functionName | |||
) |
Get the documentation for the given test function.
The found string will be modified such that all trailing whitespace will be removed.
functionName | The function to gather documentation for. |
Definition at line 1161 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx.
Referenced by TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase().
def TestCenterAdvanced.TestCase.TestCase.getListOfTestFuncs | ( | self | ) |
Get a list of test functions this test has.
Definition at line 944 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__functionDict.
Referenced by TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.getModule | ( | self | ) |
Return the module, might be None.
Definition at line 930 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx.
def TestCenterAdvanced.TestCase.TestCase.getName | ( | self | ) |
Return the name of the test case.
Reimplemented in TestCenterAdvanced.TestCaseGeneric.GenericTestCase.
Definition at line 937 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._testCaseName.
Referenced by TestCenterAdvanced.TestCase.TestCase.openFiles(), and TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.getPackage | ( | self | ) |
Return the identifier of the package the test case is in.
Definition at line 951 of file TestCase.py.
References TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot.
def TestCenterAdvanced.TestCase.TestCase.getTestCaseNode | ( | self | ) |
Return the XML node with the test case's information.
Definition at line 958 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__callTearDownTestCase(), TestCenterAdvanced.TestCase.TestCase.__dummyTestSuite, TestCenterAdvanced.TestCase.TestCase.__previousTestClass, TestCenterAdvanced.TestCase.TestCase.__setupTestCaseCalled, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, TestCenterAdvanced.TestCase.TestCase._ctx, and TestCenterAdvanced.TestCase.TestCase.destroyContext().
def TestCenterAdvanced.TestCase.TestCase.getType | ( | self | ) |
Return the type of this test case (generic of functional).
Definition at line 923 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._testCaseType, TestCenterAdvanced.TestCaseFunctional.FunctionalTestCase._testCaseType, and TestCenterAdvanced.TestCaseGeneric.GenericTestCase._testCaseType.
Referenced by TestCenterAdvanced.TestCase.TestCase.run().
def TestCenterAdvanced.TestCase.TestCase.hasNetwork | ( | self | ) |
Check whether the test case has a network attached.
Definition at line 891 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.networkFileName().
def TestCenterAdvanced.TestCase.TestCase.isValid | ( | self | ) |
Has test case loaded without syntax errors?
Definition at line 884 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__valid.
def TestCenterAdvanced.TestCase.TestCase.networkFileName | ( | self | ) |
Returns the absolute file name of the attached network or an empty string if no network is attached.
Definition at line 898 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx.
Referenced by TestCenterAdvanced.TestCase.TestCase.hasNetwork().
def TestCenterAdvanced.TestCase.TestCase.openFiles | ( | self | ) |
Open the files associated with the test case.
Definition at line 905 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx, TestCenterAdvanced.TestCase.TestCase.getName(), TestCenterAdvanced.TestCaseGeneric.GenericTestCase.getName(), and TestSupport.FieldValueTests.FieldValueTestCase.getName().
def TestCenterAdvanced.TestCase.TestCase.openNetwork | ( | self | ) |
Open the internal network of the test case.
Definition at line 914 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase._ctx.
def TestCenterAdvanced.TestCase.TestCase.run | ( | self, | |
resultNode | |||
) |
Run the test case and store results in the given xml data structure.
resultNode | The node taking the results (call by reference). |
Reimplemented in TestCenterAdvanced.TestCaseGeneric.GenericTestCase.
Definition at line 1001 of file TestCase.py.
References TestCenterAdvanced.TestCase.TestCase.__appendCollectedStartupLog(), TestCenterAdvanced.TestCase.TestCase.__callSetUpTestCase(), TestCenterAdvanced.TestCase.TestCase.__callTestFunction(), TestCenterAdvanced.TestCase.TestCase.__collectedStartupErrorsState, TestCenterAdvanced.TestCase.TestCase.__collectedStartupLog, TestCenterAdvanced.TestCase.TestCase.__collectedStartupWarningsState, TestCenterAdvanced.TestCase.TestCase.__currentResultNode, TestCenterAdvanced.TestCase.TestCase.__finishRunTestFunction(), TestCenterAdvanced.TestCase.TestCase.__perFunctionResultDirectory, TestCenterAdvanced.TestCase.TestCase.__prepareRunTestFunction(), TestCenterAdvanced.TestCase.TestCase.__runTestFunction(), TestCenterAdvanced.TestCase.TestCase.__setupTestCaseAndRunTestFunction(), TestCenterAdvanced.TestCase.TestCase.__setupTestCaseCalled, TestCenterAdvanced.TestCase.TestCase.__tearDown(), TestCenterAdvanced.Master.Master.__testCaseListener, TestCenterAdvanced.Slave.Slave.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__testCaseListener, TestCenterAdvanced.TestCase.TestCase._testHelper, TestCenterAdvanced.TestCase.TestCase.activate(), TestCenterAdvanced.TestCase.TestCase.addExtraTestCaseResult(), TestSupport.TestHelper.TestHelper.addExtraTestCaseResult(), TestCenterAdvanced.TestCase.TestCase.deactivate(), TestCenterAdvanced.TestCase.TestCase.getListOfTestFuncs(), TestCenterAdvanced.TestCase.TestCase.getName(), TestCenterAdvanced.TestCaseGeneric.GenericTestCase.getName(), TestSupport.FieldValueTests.FieldValueTestCase.getName(), and TestCenterAdvanced.TestCase.TestCase.getType().
def TestCenterAdvanced.TestCase.TestCase.setTestCaseListener | ( | self, | |
testCaseListener | |||
) |
Definition at line 254 of file TestCase.py.
References TestCenterAdvanced.Master.Master.__testCaseListener, TestCenterAdvanced.Slave.Slave.__testCaseListener, and TestCenterAdvanced.TestCase.TestCase.__testCaseListener.
Referenced by TestCenterAdvanced.Slave.Slave.runCommand().
TestCenterAdvanced.TestCase.TestCase.futureDone |
Definition at line 309 of file TestCase.py.