How to compare 2 response XMLs from 2 Different Test Steps and print in Excel ?
Hi,
I have a response XML from a SOAP Test Request. I have another response XML from from the JDBC Test Step. Both of the response XMLs print out the category ID & Category Name.
I want to compare both of them and then print out the result in Excel.
Response XMLfrom SOAP Request
==========================
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost/retail/namespaces">
<SOAP-ENV:Body>
<ns1:GetAllCategoriesResponse xmlns:ns1="urn:RetailApp">
<return xsi:type="tns:allcats">
<allcategories xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:categorydetail[4]">
<item xsi:type="tns:categorydetail">
<category_id xsi:type="xsd:string">7</category_id>
<category_name xsi:type="xsd:string">Human Resource</category_name>
</item>
<item xsi:type="tns:categorydetail">
<category_id xsi:type="xsd:string">5</category_id>
<category_name xsi:type="xsd:string">IT</category_name>
</item>
<item xsi:type="tns:categorydetail">
<category_id xsi:type="xsd:string">6</category_id>
<category_name xsi:type="xsd:string">Manufacturing</category_name>
</item>
<item xsi:type="tns:categorydetail">
<category_id xsi:type="xsd:string">8</category_id>
<category_name xsi:type="xsd:string">Marketing</category_name>
</item>
</allcategories>
<sessiondata xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:sessiondetail[1]">
<item xsi:type="tns:sessiondetail">
<sessionid xsi:type="xsd:string">O1GHg65lCq1492324865</sessionid>
<username xsi:type="xsd:string">dey.avik5@gmail.com</username>
</item>
</sessiondata>
</return>
</ns1:GetAllCategoriesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response XML from JDBC
====================
<Results>
<ResultSet fetchSize="0">
<Row rowNumber="1">
<CATEGORY.CAT_ID>7</CATEGORY.CAT_ID>
<CATEGORY.CAT_NAME>Human Resource</CATEGORY.CAT_NAME>
</Row>
<Row rowNumber="2">
<CATEGORY.CAT_ID>5</CATEGORY.CAT_ID>
<CATEGORY.CAT_NAME>IT</CATEGORY.CAT_NAME>
</Row>
<Row rowNumber="3">
<CATEGORY.CAT_ID>6</CATEGORY.CAT_ID>
<CATEGORY.CAT_NAME>Manufacturing</CATEGORY.CAT_NAME>
</Row>
<Row rowNumber="4">
<CATEGORY.CAT_ID>8</CATEGORY.CAT_ID>
<CATEGORY.CAT_NAME>Marketing</CATEGORY.CAT_NAME>
</Row>
</ResultSet>
</Results>