Verify Dataset (Verify Mode)
The Verify Dataset element can be used in two modes, a Compare Mode and a Verify mode. In the Verify mode, each record will be verified by verify expressions. It first declares which records should be verified, and it then declares the verification rules on field level.
The maximum record size allowed is 32760.
When defining a structure, the maximum field size allowed when used as a Selection or Verification field is 9999. When a field is not referenced, there is no size restriction.
When specifying the Selection and Verification values in Eclipse, you are limited to 64 characters. This can be compared to a field that is up to the 9999 size in case the field has been expanded.
The test scenario will fail if the data being verified is not as expected. The Compare will stop after encountering 10 records with differences.
Verify Mode can have multiple verifications and hence select different kinds of records and make different verification rules for each selection.
Rule elements are used to either select a record or to verify a record. Multiple rules can be defined together, and all rules must then be fulfilled to either select or successfully validate the records.
Add Verify Dataset to the Test Scenario by dragging it from the tool palette. This opens the Insert a new Verify Dataset element popup. Here are the fields available when setting up this element:
- Label - this is the label name you want assigned.
- Description - an optional description of the Test Element.
- Stop execution when verification errors checkbox - When checked, the test scenario execution will stop if there are verification errors reflecting that the two datasets are not equal.
- Verify Datasets tab:
- Actual Dataset - this is the location of the actual dataset. The data can be located in a dataset member like MY.DATASET.NAME(XAACTUAL) or located in a sequential dataset like MY.DATASET.NAME.SEQ.ACTUAL.
- Structure Name - Structure Name attribute points to a Structure in the Structures tab of the Total Test scenario. This must match the record layout of the dataset.
- Verifications - contains one or several verifications. For each verification, enter the following items:
- Enter verification label - this is the label you want assigned.
- Add verification box - check to add this verification label in the list box below.
If you need to delete an item from the Verification list box, the Selected records with below conditions met, or the Verify selected records areas, highlight it and press Delete on your keyboard. - Select records with below conditions met - attribute for the rule that specifies which records to be selected for verification selected:
- Add field rule - Select this box and the data paths available to the supplied Structure Name will appear.
- Select the field you want to verify.
- OK / Cancel - click on OK to add this verification rule.
- Highlight the Path, so you can modify the following:
- Operator - operator attribute contains the operator to use for verifying the field value against the rule value. See List of Operators.
- Value - attribute contains the value to be used in the rule.
- Verify selected records - attribute for the rule that specifies rules that must be satisfied by the selected records.
- Add field rule - Select this box and the data paths available to the Structure Name supplied will appear.
- Select the field you want to verify.
- OK / Cancel - click on OK to add this verification rule.
- Highlight the Path, so you can modify the following:
- Operator - operator attribute contains the operator to use for verifying the field value against the rule value. See List of Operators.
- Value - attribute contains the value to be used in the rule.
- OK / Cancel - click on OK to save your element.
List of Operators
The following operators can be used:
- GT—(Greater Than)
- LT—(Less Than)
- EQ—(Equal=)
- GTE—(Greater Than or Equal)
- LTE—(Less Than or Equal)
- NE—(Not Equal)
- BETWEEN—(Between to numbers separated by ,)
- IN—(Value in a sequence of values separated by ,)
- LIKE—(Like a value)