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 | |
__init__ (self, name, ctx, xmlNode=None) | |
The default constructor. | |
getName (self) | |
Return the name of the field-value test case. | |
setName (self, name) | |
Set the name of the field-value test case. | |
save (self, xmlNode=None) | |
Save the settings of this field-value test case to an XML node. | |
getParameterization (self) | |
Return the parameterization set. | |
applyParameterization (self, changeSet, verbose=False) | |
Apply the parameterization to the context given in the constructor. | |
getExpectedResults (self) | |
Getter for the list of expected results. | |
verifyExpectedResults (self, failedFieldList=[], findAll=False, verbose=False) | |
Return the expected result set. | |
getResultsToSave (self) | |
Return the results to save. | |
saveResults (self, name, overwrite=False) | |
Save the given field values to the xml data structure. | |
getSavedResultList (self) | |
Get a sorted list of names of the saved results. | |
addSavedResultList (self, name, resultList) | |
Add saved results. | |
getSavedResult (self, name) | |
Get the field-value list saved under the given name. | |
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 516 of file FieldValueTests.py.
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 733 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.
TestSupport.FieldValueTests.FieldValueTestCase.addSavedResultList | ( | self, | |
name, | |||
resultList ) |
Add saved results.
Definition at line 891 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
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 801 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.
TestSupport.FieldValueTests.FieldValueTestCase.getExpectedResults | ( | self | ) |
Getter for the list of expected results.
Definition at line 813 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
TestSupport.FieldValueTests.FieldValueTestCase.getName | ( | self | ) |
Return the name of the field-value test case.
Definition at line 749 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().
TestSupport.FieldValueTests.FieldValueTestCase.getParameterization | ( | self | ) |
Return the parameterization set.
Definition at line 791 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
TestSupport.FieldValueTests.FieldValueTestCase.getResultsToSave | ( | self | ) |
Return the results to save.
Definition at line 853 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
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 914 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
TestSupport.FieldValueTests.FieldValueTestCase.getSavedResultList | ( | self | ) |
Get a sorted list of names of the saved results.
Definition at line 884 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict.
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 765 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__fieldValueListDict, TestSupport.FieldValueTests.FieldValueTestCase.__name, TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.save().
Referenced by TestCenterAdvanced.Config.Configuration.__init__(), and TestSupport.FieldValueTests.FieldValueTestCase.save().
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 863 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.
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 756 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCase.__name, and TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.__name.
TestSupport.FieldValueTests.FieldValueTestCase.verifyExpectedResults | ( | self, | |
failedFieldList = [], | |||
findAll = False, | |||
verbose = False ) |
Return the expected result set.
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 825 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.