TestCenter Reference
|
A class collecting a set of field-value test cases. More...
Public Member Functions | |
__init__ (self, context) | |
The default constructor. | |
load (self, filename) | |
Try to load the field-value test case set from the given XML file. | |
save (self, filename) | |
Save the XML data structure. | |
getList (self) | |
Return the list of names of the existing field-value test cases. | |
add (self, fieldValueTestCase) | |
Add the given field-value test case to the FieldValueTestCaseSet. | |
copy (self, source, destination) | |
Create a copy of the given field-value test case with the given new name. | |
remove (self, name) | |
Remove the field-value test case with the given name. | |
rename (self, name, newName) | |
Rename a given field-value test case. | |
get (self, name) | |
Return the field-value test case with the given name. | |
A class collecting a set of field-value test cases.
The contained field-value test cases are stored in an XML data structure. There is a mapping between the XML data structure and actual objects of type FieldValueTestCase. This mapping must be updated. The objects are created on demand to minimize initial loading. Each test case contains field-value lists that describe the following:
Definition at line 245 of file FieldValueTests.py.
TestSupport.FieldValueTests.FieldValueTestCaseSet.__init__ | ( | self, | |
context ) |
The default constructor.
context | The context used for the field-value test case set. |
Definition at line 262 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlTree.
TestSupport.FieldValueTests.FieldValueTestCaseSet.add | ( | self, | |
fieldValueTestCase ) |
Add the given field-value test case to the FieldValueTestCaseSet.
If a field-value test case with the same name is already known False is returned.
fieldValueTestCase | The new field-value test case. |
Definition at line 326 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot.
Referenced by TestSupport.FieldValueTests.FieldValueTestCaseSet.copy().
TestSupport.FieldValueTests.FieldValueTestCaseSet.copy | ( | self, | |
source, | |||
destination ) |
Create a copy of the given field-value test case with the given new name.
If either the source does not exist or a field-value test case with the destination name already exists False is returned.
source | The name of the existing field-value test case. |
destination | The name of the created new field-value test case. |
Definition at line 345 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode(), TestSupport.FieldValueTests.FieldValueTestCase.FieldListBase.add(), TestSupport.FieldValueTests.FieldValueTestCaseSet.add(), and TestSupport.FieldValueTests.FieldValueTestCaseSet.save().
TestSupport.FieldValueTests.FieldValueTestCaseSet.get | ( | self, | |
name ) |
Return the field-value test case with the given name.
If no field-value test case with this name is known None is returned.
name | The name of the field-value test case. |
Definition at line 424 of file FieldValueTests.py.
References TestCenterAdvanced.Slave.Slave.__ctx, TestSupport.ChangeSet.ChangeSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__ctx, TestSupport.FieldValueTests.FieldValueTestCase.__ctx, TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode(), TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot.
TestSupport.FieldValueTests.FieldValueTestCaseSet.getList | ( | self | ) |
Return the list of names of the existing field-value test cases.
Definition at line 316 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict.
TestSupport.FieldValueTests.FieldValueTestCaseSet.load | ( | self, | |
filename ) |
Try to load the field-value test case set from the given XML file.
The field-value test case set must not contain any field-value test cases; Otherwise an exception will be thrown.
filename | The file to load. |
Definition at line 277 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestSupport.FieldValueTests.FieldValueTestCaseSet.__verify(), TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlTree.
TestSupport.FieldValueTests.FieldValueTestCaseSet.remove | ( | self, | |
name ) |
Remove the field-value test case with the given name.
If no such field-value test case exists False is returned.
name | The name of the field-value test case to be deleted. |
Definition at line 370 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode(), TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.remove().
Referenced by TestSupport.FieldValueTests.FieldValueTestCaseSet.remove().
TestSupport.FieldValueTests.FieldValueTestCaseSet.rename | ( | self, | |
name, | |||
newName ) |
Rename a given field-value test case.
The given field-value test case is saved under a new name. If either no field-value test case with the given name or one with the new name exist False is returned.
name | The name of the existing field-value test case. |
newName | The new name of the given field-value test case. |
Definition at line 393 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode().
TestSupport.FieldValueTests.FieldValueTestCaseSet.save | ( | self, | |
filename ) |
Save the XML data structure.
Definition at line 304 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlTree, and TestSupport.FieldValueTests.FieldValueTestCaseSet.save().
Referenced by TestCenterAdvanced.Config.Configuration.__init__(), TestSupport.FieldValueTests.FieldValueTestCaseSet.copy(), and TestSupport.FieldValueTests.FieldValueTestCaseSet.save().