TestCenter Reference
|
A class implementing the field-value test cases. More...
Classes | |
class | FieldList |
List of field information. More... | |
class | FieldListBase |
Superclass for the field lists used in the field-value test case. More... | |
class | FieldValueList |
List of field information including field values. More... | |
Public Member Functions | |
def | __init__ (self, name, ctx, xmlNode=None) |
The default constructor. More... | |
def | getName (self) |
Return the name of the field-value test case. More... | |
def | setName (self, name) |
Set the name of the field-value test case. More... | |
def | save (self, xmlNode=None) |
Save the settings of this field-value test case to an XML node. More... | |
def | getParameterization (self) |
Return the parameterization set. More... | |
def | applyParameterization (self, changeSet, verbose=False) |
Apply the parameterization to the context given in the constructor. More... | |
def | getExpectedResults (self) |
Getter for the list of expected results. More... | |
def | verifyExpectedResults (self, failedFieldList=[], findAll=False, verbose=False) |
Use the given field-value list to verify the given context's field values. More... | |
def | getResultsToSave (self) |
Return the results to save. More... | |
def | saveResults (self, name, overwrite=False) |
Save the given field values to the xml data structure. More... | |
def | getSavedResultList (self) |
Get a sorted list of names of the saved results. More... | |
def | addSavedResultList (self, name, resultList) |
Add saved results. More... | |
def | getSavedResult (self, name) |
Get the field-value list saved under the given name. More... | |
A class implementing the field-value test cases.
A field-value test case is given via three lists of fields. In a first step some fields are set to the specified values (a parameterization). Than certain fields are verified whether they have the expected values set (the expected results). Finally the values of certain fields are saved (the results to save).
Definition at line 557 of file FieldValueTests.py.
def TestSupport.FieldValueTests.FieldValueTestCase.__init__ | ( | self, | |
name, | |||
ctx, | |||
xmlNode = None |
|||
) |
The default constructor.
Set the required member variables and load the settings from the XML node if one given.
name | The name of the field-value test case. |
ctx | The context the field-value test case operates on. |
xmlNode | The node the field-value test case is defined in. |
Definition at line 796 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict, TestCenterAdvanced.Config.Configuration.__load(), TestSupport.FieldValueTests.FieldValueTestCase.__load(), TestSupport.FieldValueTests.FieldValueTestCase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name.
def TestSupport.FieldValueTests.FieldValueTestCase.addSavedResultList | ( | self, | |
name, | |||
resultList | |||
) |
Add saved results.
Definition at line 969 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.applyParameterization | ( | self, | |
changeSet, | |||
verbose = False |
|||
) |
Apply the parameterization to the context given in the constructor.
The change set given is used to make the parameterization revertable (except for the touched triggers).
changeSet | The change set to use. |
verbose | Run the parameterization in verbose mode. |
Definition at line 871 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict, and TestSupport.Fields.touch().
def TestSupport.FieldValueTests.FieldValueTestCase.getExpectedResults | ( | self | ) |
Getter for the list of expected results.
Definition at line 884 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.getName | ( | self | ) |
Return the name of the field-value test case.
Definition at line 815 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name.
Referenced by TestCenterAdvanced.TestCase.TestCase.openFiles(), and TestCenterAdvanced.TestCase.TestCase.run().
def TestSupport.FieldValueTests.FieldValueTestCase.getParameterization | ( | self | ) |
Return the parameterization set.
Definition at line 860 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.getResultsToSave | ( | self | ) |
Return the results to save.
Definition at line 928 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.getSavedResult | ( | self, | |
name | |||
) |
Get the field-value list saved under the given name.
name | The name of the saved result to return. |
Definition at line 993 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.getSavedResultList | ( | self | ) |
Get a sorted list of names of the saved results.
Definition at line 961 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
def TestSupport.FieldValueTests.FieldValueTestCase.save | ( | self, | |
xmlNode = None |
|||
) |
Save the settings of this field-value test case to an XML node.
If no node is given an empty new one is created.
xmlNode | The node used for the field-value test case. |
Definition at line 833 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict, TestSupport.FieldValueTests.FieldValueTestCase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name.
Referenced by TestCenterAdvanced.Config.Configuration.__init__().
def TestSupport.FieldValueTests.FieldValueTestCase.saveResults | ( | self, | |
name, | |||
overwrite = False |
|||
) |
Save the given field values to the xml data structure.
Please note that this won't save to the file! Use the FieldValueTestCaseSet containing this FieldValueTestCase.
name | The results are saved under the given name and this name must be unique! |
Definition at line 939 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict, and TestSupport.Fields.touch().
def TestSupport.FieldValueTests.FieldValueTestCase.setName | ( | self, | |
name | |||
) |
Set the name of the field-value test case.
name | The new name of the field-value test case. |
Definition at line 823 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name.
def TestSupport.FieldValueTests.FieldValueTestCase.verifyExpectedResults | ( | self, | |
failedFieldList = [] , |
|||
findAll = False , |
|||
verbose = False |
|||
) |
Use the given field-value list to verify the given context's field values.
failedFieldList | List of fields that have wrong values. |
findAll | If false the method will return on the first error. |
verbose | Run the verification in verbose mode. |
Definition at line 897 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, and TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.