FieldValueTestCaseEditor

MacroModule

genre

Test

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

definition

FieldValueTestCaseEditor.def

see also

FieldValueTestCaseConverter, FieldValueTestCaseIterator, FieldValueTestCaseGenerator

keywords

testcasemanager

Purpose

The FieldValueTestCaseEditor allows creating or editing (and verifying) a set of field parameter settings per test case. The parameters settings can be saved in an XML file which can be easily used in the TestCaseManager.

Usage

Usually, you will already possess a parameter settings file generated with the FieldValueTestCaseGenerator. The network file containing the test modules must remain open, and a FieldValueTestCaseEditor must be added to it. To add fields to the different lists, refer to the help of FieldValueTestCaseGenerator. Using the FieldValueTestCaseEditor the expected values of each test case can be edited by clicking in the value column in the Expected Results tab and initiating editing with the F2 key.

When all parameter settings are correct, the XML file can be overwritten with Save or created with SaveAs.

Tips

To use the created XML file in the TestCaseManager create a test case and add the following lines to its .py file:

def FIELDVALUETEST_testGeneration():

return “created.xml”, []

Windows

Default Panel

../../../Modules/Macros/Tests/FieldValueTests/mhelp/Images/Screenshots/FieldValueTestCaseEditor._default.png

Parameter Fields

Field Index

Add: Trigger

Save: Trigger

Apply Parameterization: Trigger

SaveAs: Trigger

Clear: Trigger

setCurrentTestCaseTo: String

Current Test Case: String

testCaseList: String

Duplicate: Trigger

testCaseLoaded: Bool

Filename: String

testCaseSetLoaded: Bool

Load: Trigger

Verify Expected Results: Trigger

Remove: Trigger

Visible Fields

Filename

name: filename, type: String, default: $(NETWORK)

Sets the filename for a parameter setting XML file to be used for saving the current settings.

Current Test Case

name: currentTestCase, type: String

Sets the new name of the currently selected a test case, if edited.

Clear

name: clearTestCaseSet, type: Trigger

When pressed, a dialog is opened to confirm that all test cases are removed from the test case list.

Load

name: loadTestCaseSet, type: Trigger

When pressed, a file select dialog is opened to choose a parameter setting XML file.

Save

name: saveTestCaseSet, type: Trigger

When pressed, the current settings are saved to a parameter setting XML file. If the Filename contains an existing file, it is overwritten; otherwise, a file select dialog is opened.

SaveAs

name: saveTestCaseSetAs, type: Trigger

When pressed, the current settings are saved to a parameter setting XML file. A file select dialog is opened.

Add

name: addTestCase, type: Trigger

When pressed, a new test case is added to the list.

Remove

name: removeTestCase, type: Trigger

When pressed, the selected test case is removed from the list.

Duplicate

name: duplicateTestCase, type: Trigger

When pressed, the selected test case is duplicated in the list.

Apply Parameterization

name: applyParameterization, type: Trigger

When pressed, the parameterization values of the selected test case are applied to the respective modules in the current network.

Verify Expected Results

name: verifyExpectedResults, type: Trigger

When pressed, the expected values of the selected test case are compared to the respective modules’ field values in the current network.

Hidden Fields

setCurrentTestCaseTo

name: setCurrentTestCaseTo, type: String

testCaseList

name: testCaseList, type: String

testCaseLoaded

name: testCaseLoaded, type: Bool, persistent: no

testCaseSetLoaded

name: testCaseSetLoaded, type: Bool, persistent: no