TestCenter Reference
|
A class collecting a set of field-value test cases. More...
Public Member Functions | |
def | __init__ (self, context) |
The default constructor. More... | |
def | load (self, filename) |
Try to load the field-value test case set from the given XML file. More... | |
def | save (self, filename) |
Save the XML data structure. More... | |
def | getList (self) |
Return the list of names of the existing field-value test cases. More... | |
def | add (self, fieldValueTestCase) |
Add the given field-value test case to the FieldValueTestCaseSet. More... | |
def | copy (self, source, destination) |
Create a copy of the given field-value test case with the given new name. More... | |
def | remove (self, name) |
Remove the field-value test case with the given name. More... | |
def | rename (self, name, newName) |
Rename a given field-value test case. More... | |
def | get (self, name) |
Return the field-value test case with the given name. More... | |
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 248 of file FieldValueTests.py.
def TestSupport.FieldValueTests.FieldValueTestCaseSet.__init__ | ( | self, | |
context | |||
) |
The default constructor.
context | The context used for the field-value test case set. |
Definition at line 265 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.
def 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 329 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().
def 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 348 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().
def 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 427 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.
def TestSupport.FieldValueTests.FieldValueTestCaseSet.getList | ( | self | ) |
Return the list of names of the existing field-value test cases.
Definition at line 319 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict.
def 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 280 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.
def 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 373 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode(), TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot.
def 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 396 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__getFieldValueTestCaseNode().
def TestSupport.FieldValueTests.FieldValueTestCaseSet.save | ( | self, | |
filename | |||
) |
Save the XML data structure.
Definition at line 307 of file FieldValueTests.py.
References TestSupport.FieldValueTests.FieldValueTestCaseSet.__fieldValueTestCaseDict, TestCenterAdvanced.Master.Master.__xmlRoot, TestCenterAdvanced.TestCase.TestCase.__xmlRoot, TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlRoot, and TestSupport.FieldValueTests.FieldValueTestCaseSet.__xmlTree.
Referenced by TestCenterAdvanced.Config.Configuration.__init__(), and TestSupport.FieldValueTests.FieldValueTestCaseSet.copy().