This topic covers the Diff tool, which compares saved data with incoming data and reports differences in SOAtest and Virtualize.
Table of Contents | ||
---|---|---|
|
Understanding Diff
...
...
With support for Binary, Text, XML, and JSON, the Diff tool is the current backbone of a best-practices regression testing solution.
...
The Diff tool compares the data in its editor against the data that it receives from another tool's output or from another input that you specify and reports a failure when it finds a difference.
...
Info | |||||
---|---|---|---|---|---|
| |||||
To customize the logic and data source usage for all Diff regression controls in a test suite:
|
Binary Diff Mode Options
...
Data Source: Specifies the Data Source to be used for providing control values. This menu is only available if a Data Source was added to the project.
Conditional Content Product: (SOAVirt, SOAtest) Product: (SOAVirt, SOAtest) sv-attr:0A010204015A9054C88481D043445E2F 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 added to the project.For more information on Data Sources, see Parameterizing Tests with Data Sources, Variables, or Values from Other Tests.
Regression Control Source: Determines what data source values, file, or text is used as the "control" value (the value against which it will compare all subsequent results).
Editor: Choose this option from the drop-down menu and enter text you want to use as a regression control in the related field.
File: Choose this option from the drop-down menu and specify a file to use as a regression control. If you want to ensure that this file's path is always relative to your project file, enable the Persist as Relative Path option.
Data Source Column: Choose this option from the drop-down menu and specify a value from the designated data source column as regression controls. This option is only available if your project includes a data source.
...
Data Source: Specifies the Data Source to be used for providing control values. This menu is only available if a Data Source was added to the project.
Conditional Content Product: (SOAVirt, SOAtest) Product: (SOAVirt, SOAtest) Forsv-attr:0A010204015A9054C88481D043445E2F 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 For more information on Data Sources, see Parameterizing Tests with Data Sources, Variables, or Values from Other Tests.
Regression Control Source: Determines what data source values, file, or text is usedas the "control" value (the value against which it will compare all subsequent results).
Editor: Choose this option from the drop-down menu and enter text you want to use as a regression control in the related field.
File: Choose this option from the drop-down menu and specify a file to use as a regression control. If you want to ensure that this file's path is always relative to your project file, enable the Persist as Relative Path option.
Data Source Column: Choose this option from the drop-down menu and specify a value from the designated data source column as regression controls. This option is only available if your project includes a data source.
...
Data Source: Specifies the Data Source to be used for providing control values. This menu is only available if a Data Source was added to the project.
Conditional Content Product: (SOAVirt, SOAtest) Product: (SOAVirt, SOAtest) sv-attr:0A010204015A9054C88481D043445E2F 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 Source was added to the project.For more information on Data Sources, see Parameterizing Tests with Data Sources, Variables, or Values from Other Tests.
Regression Control Source: Determines what data source values, file, or text is used as the "control" value (the value against which it will compare all subsequent results).
Editor: Choose this option from the drop-down menu and enter text you want to use as a regression control in the related field.
File: Choose this option from the drop-down menu and specify a file to use as a regression control. If you want to ensure that this file's path is always relative to your project file, enable the Persist as Relative Path option.
Data Source Column: Choose this option from the drop-down menu and specify a value from the designated data source column as regression controls. This option is only available if your project includes a data source.
- Set From WSDL: Initializes the Form XML content with the expected response based on the WSDL. This button is only available if a WSDL document exists for the particular SOAP client.
...
The XML View Tree displays the literal XML as a tree, with each tree node representing an element. The options for the XML View Tree in the Diff panel can be configured in the same fashion as the Form XML SOAP Envelope options of the SOAP Client tool. For more information, see Manipulating the XML View Tree.
The XML Configuration Tabs allow you to add, remove, and rename XML components. The options for the XML Configuration Tabs can be configured in the same fashion as the Form XML SOAP Envelope options of the SOAP Client tool. For more information, see Manipulating the XML Configuration Tabs.
SOAP Response Regression Controls
...
- In order to use the ExamXML mode, the Diff tool’s Control content must be provided in a file.
...
...
It is possible to create external regression controls automatically (save the expected content into files instead of embedding it in the Diff tool) as described in Configuring Regression Testing.
Using VMTools
VMTools is built in to the product. No additional license is needed. If you select VMTools, you can specify the following options:
...
- Name: Specifies the name of the Diff tool.
Data Source: Specifies the Data Source to be used for providing control values. This menu is only available if a Data Source was added to the project.
Conditional Content Product: (SOAVirt, SOAtest) Product: (SOAVirt, SOAtest) Forsv-attr:0A010204015A9054C88481D043445E2F 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 Source was added to the project. For more information on Data Sources, see Parameterizing Tests with Data Sources, Variables, or Values from Other Tests.
Regression Control Source: Determines what data source values, file, or text is used as the "control" value (the value against which it will compare all subsequent results).
Editor: Choose this option from the drop-down menu and enter text you want to use as a regression control in the related field.
File: Choose this option from the drop-down menu and specify a file to use as a regression control. If you want to ensure that this file's path is always relative to your project file, enable the Persist as Relative Path option.
Data Source Column: Choose this option from the drop-down menu and specify a value from the designated data source column as regression controls. This option is only available if your project includes a data source.
...
- Ignore XPaths from the Quality Tasks view: This is the easiest way to configure the Diff tool to ignore XPaths. After a failed regression test, you can simply right-click the Quality Tasks view node to select an XPath to ignore.
- Manually entering an XPath in the Diff GUI: You can manually enter an XPath by clicking the Configure Ignored Differences button in the Diff GUI.
- Ignore XPaths from the Form XML tree: You can right-click an element node from the Form XML tree and configure an XPath to ignore based on the selected element.
...
Ignoring XPaths from the Quality Tasks View\
When entering XPaths to ignore in the Diff tool, it is easiest to right-click in the Quality Tasks view rather than manually entering the XPath position into the Diff tool GUI. XPath positions are displayed in tree form in the Quality Tasks view after a failed regression test:
To ignore an XPath from the Quality Tasks view after a failed regression test:
- Right-click the error, then choose Ignore XPath from the shortcut menu. An Ignored XPath Settings dialog displays with the selected XPath automatically entered.
- Select the appropriate check boxes of the XPath operations you would like to ignore. The following options are available:XPath:
- XPath: Specifies the XPath position that you selected.
- Recursive: Select to apply the Ignored XPath settings to child elements.
- Text Content (Modify/Insert/Delete): Select the content operation you want to ignore.
- Element/Subtree (Insert/Delete): Select the element or subtree operation you want to ignore.
- Attribute (Modify/Insert/Delete): Select the attribute operation you want to ignore. If this field is selected, SOAtest will only ignore the specified attribute name within the XPath. To ignore a specific attribute, enter the attribute name in the field next to the Attribute check box. If you want to ignore more than one attribute at an element’s XPath location, leave the attribute name empty or use the wild card * (e.g. myAttribute*).
- Element Name and Namespace (Modify/Insert/Delete): Select the element name operation you want to ignore.
- Click OK.
The XPath you specified will now be ignored for any future test runs. In addition, the XPath you specified now appears in the Ignored Differences tab of the XML Mode in the Diff tool. To modify the XPath, see Modifying XPath Settings.
Manually Entering XPaths to Ignore
...
In this video, you'll learn how to generate and update regression controls.
Widget Connectorvimeo | ||||||
---|---|---|---|---|---|---|
|