DIFF tool - parasoft SOA test how to use
Scenario: Compare two files -> File A [ json or XML] File B [ json or XML] and compare in DIFF , how to use it ?
And again compare File B and File C [ json or xml] , now after these comparisons , a global message called GM- final XML will be triggered if file comparisons are accurate and only creation will happen if it spots any differences in that DIFF tool , if 0 differences no GM will be created.
Answers
-
SOAtest's Diff tool has various comparison modes including ones for comparing JSON and XML documents. The Diff tool has "Regression Control" tab for configuring the document to compare against which can come from a file or data source. If the Diff tool is added as a test then the test's Input tab can let you select a file or data source. However, it more common to chain the Diff tool to another tool that provides the input document, like the Response Traffic output of a REST Client tool.
SOAtest has various ways of publishing test results so you know that what passed and what failed. However, if you wish to conditionally generate a custom file then you can configure a Write File tool with "Test-Specific Logic Options" to run conditionally based on the status of the test that is running the Diff tool.
For more detail:
Diff tool
Write File tool
Test-Specific Logic Options (Test Suite Properties)1 -
Hi Pattu, in Parasoft SOAtest, you can compare two files using the Diff tool by configuring it in the test flow.
A common approach is something like this:
Add a Diff tool step in your test case.
Set File A as the control input and File B as the test input.
Choose the appropriate comparison mode depending on whether you are working with JSON or XML.
Run the comparison and review the differences reported by the tool.For your scenario where you also want to compare File B with File C, you can add a second Diff step after the first one. Each Diff tool execution will produce a result showing whether differences were found.
If you want the GM-final XML message to be created only when differences exist, you can add a conditional step after the Diff tool that checks the result (difference count).
If the difference count is greater than 0, trigger the GM creation.
If the difference count is 0, simply skip the creation step.Also make sure the comparison settings ignore irrelevant differences (like whitespace or attribute order in XML) if those are not important for your validation.
0