How to compare values present in XML databank and textdatabank
Hi all,
Can anyone help me how to compare the values present in XML databank & Text databank I tried with Diff but it's allowing only 1 value per once
I need all the values present in 2 databanks to be compared at a time
Answers
-
Create a Diff tool as a new test. You can select one of the data bank columns from the test's Input tab and the other on the tool's Regression Control tab. Both the Input tab and Regression Control tab have a "data source" option.
0 -
The "data source" option on test Input tabs should be visible if you are using SOAtest 2020.2 or later.
0 -
Hi @benken_parasoft I tried with diff but its taking only one datasource column not accepting other columns, could you please suggest how to compare all columns present in a datasource with single Diff tool.
0 -
Instead of diffing two values, consider constructing two messages containing all the values you want to compare. They could be two simple JSON messages that reference your data bank (or data source) columns. For example:
[ "${actual_val1}", "${actual_val2}", "${actual_val3}" ]
and
[ "${expected_val1}", "${expected_val2}", "${expected_val3}" ]
You can configure the first message using a Messaging Client tool with Transport set to None and Request set to Literal with MIME type of application/json. Then you can chain a Diff tool to "Request > Traffic" with Diff mode set to JSON with the second message defined as the Regression Control.
0