TestCenter Reference
TestCenterAdvanced.TestCase.TestCase Class Reference

The superclass for the different test case categories. More...

Inheritance diagram for TestCenterAdvanced.TestCase.TestCase:
TestCenterAdvanced.TestCaseFunctional.FunctionalTestCase TestCenterAdvanced.TestCaseGeneric.GenericTestCase

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
 

Detailed Description

The superclass for the different test case categories.

Definition at line 63 of file TestCase.py.

Constructor & Destructor Documentation

◆ __init__()

def TestCenterAdvanced.TestCase.TestCase.__init__ (   self,
  testCaseName,
  isNewlyCreated = False 
)

Default constructor for the test case.

Parameters
testCaseNameThe name of the test case.
isNewlyCreatedIndicates if the test case is newly created to suppress the warning that no test functions exist.

Definition at line 94 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.__collectedStartupErrorsState, TestCenterAdvanced.TestCase.TestCase.__collectedStartupLog, TestCenterAdvanced.TestCase.TestCase.__collectedStartupWarningsState, TestCenterAdvanced.TestCase.TestCase.__createVirtualTestFunction(), TestCenterAdvanced.TestCase.TestCase.__functionDict, TestCenterAdvanced.TestCase.TestCase.__perFunctionResultDirectory, TestCenterAdvanced.TestCase.TestCase.__setupTestCaseCalled, TestCenterAdvanced.TestCase.TestCase.__stopCollectingAndStoreAsStartupLog(), TestCenterAdvanced.Slave.Slave.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__testCaseListener, TestCenterAdvanced.Master.Master.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__valid, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestCenterAdvanced.Master.Master.__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.TestCase.TestCase._testHelper, TestCenterAdvanced.TestCase.TestCase.activate(), and TestCenterAdvanced.TestCase.TestCase.deactivate().

◆ __del__()

def TestCenterAdvanced.TestCase.TestCase.__del__ (   self)

The default destructor.

Definition at line 175 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.destroyContext().

Member Function Documentation

◆ activate()

◆ addExtraTestCaseResult()

◆ callFieldValueTestCase()

def TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase (   self,
  filename,
  testcase 
)

◆ deactivate()

def TestCenterAdvanced.TestCase.TestCase.deactivate (   self)

◆ destroyContext()

def TestCenterAdvanced.TestCase.TestCase.destroyContext (   self)

◆ getDocumentation()

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.

Parameters
functionNameThe function to gather documentation for.
Returns
The function's documentation.

Definition at line 970 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._ctx.

Referenced by TestCenterAdvanced.TestCase.TestCase.callFieldValueTestCase().

◆ getListOfTestFuncs()

def TestCenterAdvanced.TestCase.TestCase.getListOfTestFuncs (   self)

Get a list of test functions this test has.

Definition at line 769 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.__functionDict.

Referenced by TestCenterAdvanced.TestCase.TestCase.run().

◆ getModule()

def TestCenterAdvanced.TestCase.TestCase.getModule (   self)

Return the module, might be None.

Definition at line 757 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._ctx.

◆ getName()

def TestCenterAdvanced.TestCase.TestCase.getName (   self)

◆ getPackage()

def TestCenterAdvanced.TestCase.TestCase.getPackage (   self)

Return the identifier of the package the test case is in.

Definition at line 775 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.__xmlRoot, and TestCenterAdvanced.Master.Master.__xmlRoot.

◆ getTestCaseNode()

◆ getType()

def TestCenterAdvanced.TestCase.TestCase.getType (   self)

Return the type of this test case (generic of functional).

Definition at line 751 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._testCaseType.

Referenced by TestCenterAdvanced.TestCase.TestCase.run().

◆ hasNetwork()

def TestCenterAdvanced.TestCase.TestCase.hasNetwork (   self)

Check whether the test case has a network attached.

Definition at line 723 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.networkFileName().

◆ isValid()

def TestCenterAdvanced.TestCase.TestCase.isValid (   self)

Has test case loaded without syntax errors?

Returns
Whether the loaded test case is valid and should be executable.

Definition at line 717 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase.__valid.

◆ networkFileName()

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 729 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._ctx.

Referenced by TestCenterAdvanced.TestCase.TestCase.hasNetwork().

◆ openFiles()

def TestCenterAdvanced.TestCase.TestCase.openFiles (   self)

Open the files associated with the test case.

Definition at line 735 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._ctx, and TestCenterAdvanced.TestCase.TestCase.getName().

◆ openNetwork()

def TestCenterAdvanced.TestCase.TestCase.openNetwork (   self)

Open the internal network of the test case.

Definition at line 743 of file TestCase.py.

References TestCenterAdvanced.TestCase.TestCase._ctx.

◆ run()

def TestCenterAdvanced.TestCase.TestCase.run (   self,
  resultNode 
)

Run the test case and store results in the given xml data structure.

Parameters
resultNodeThe node taking the results (call by reference).

Definition at line 812 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.Slave.Slave.__testCaseListener, TestCenterAdvanced.TestCase.TestCase.__testCaseListener, TestCenterAdvanced.Master.Master.__testCaseListener, TestCenterAdvanced.TestCase.TestCase._testHelper, TestCenterAdvanced.TestCase.TestCase.activate(), TestCenterAdvanced.TestCase.TestCase.addExtraTestCaseResult(), TestCenterAdvanced.TestCase.TestCase.deactivate(), TestCenterAdvanced.TestCase.TestCase.getListOfTestFuncs(), TestCenterAdvanced.TestCase.TestCase.getName(), and TestCenterAdvanced.TestCase.TestCase.getType().

◆ setTestCaseListener()

def TestCenterAdvanced.TestCase.TestCase.setTestCaseListener (   self,
  testCaseListener 
)

Member Data Documentation

◆ futureDone

TestCenterAdvanced.TestCase.TestCase.futureDone

Definition at line 263 of file TestCase.py.


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