Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.4_CTP_3.1.1

This topic covers the Diff tool, which compares saved data with incoming data and reports differences in SOAtest and Virtualize.

Sections include:
Table of Contents
maxLevel1

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.

...

, which are described in Regression Options

.

Info
iconfalse
titleConfiguring Regression Options for Diff Tools in a Test Suite

To customize the logic and data source usage for all Diff regression controls in a test suite:

  • Double-click the test suite’s Test Case Explorer node and modify the available options

Conditional Content
Product: (SOAVirt, SOAtest)Product: (SOAVirt, SOAtest)
sv-attr:0A010204015A9054C88481D043445E2F0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01

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 ContentProduct: (SOAVirt, SOAtest)Product: (SOAVirt, SOAtest)sv-attr:0A010204015A9054C88481D043445E2F0A010204015CF6008A11EEF43AC91334 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 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 ContentProduct: (SOAVirt, SOAtest)Product: (SOAVirt, SOAtest)sv-attr:0A010204015A9054C88481D043445E2F0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01For

    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 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 ContentProduct: (SOAVirt, SOAtest)Product: (SOAVirt, SOAtest)sv-attr:0A010204015A9054C88481D043445E2F0A010204015CF6008A11EEF43AC91334 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 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.

...

  • In order to use the ExamXML mode, the Diff tool’s Control content must be provided in a file. 

...

  • 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 ContentProduct: (SOAVirt, SOAtest)Product: (SOAVirt, SOAtest)sv-attr:0A010204015A9054C88481D043445E2F0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01For

     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.

...

  • 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:

  1. Right-click the error, then choose Ignore XPath from the shortcut menu. An Ignored XPath Settings dialog displays with the selected XPath automatically entered.

    Image Modified

  2. 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.
  3. 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

...

Diff tools can either have their own local, exclusive Ignored XPath settings, or they can reference a list of XPaths that can be used by other Diff tools. 

...

 To create a shared list of ignored XPaths, see Global Ignored XPath Properties.

Modifying XPath Settings
Anchor
Modifying XPath Settings
Modifying XPath Settings

...

All XPath operations specified will be ignored in future runs of the modified regression test.


Scroll pdf ignore

Video Tutorial

In this video, you'll learn how to generate and update regression controls.

Widget Connector

...

width600

...

urlhttps://

...

www.

...

youtube.com/

...

watch?v=J_nas4tHvPU
height400