Forum Discussion
3 Replies
- nmraoChampion Level 3May be you have a look at this to get an idea, then you can implement how you want.
http://stackoverflow.com/questions/31472381/dynamically-compare-rest-xml-json-response-and-jdbc-using-groovy-array-in-soapui/35706976#35706976 - JesBNew Contributor
Thank you! but, does it mean that I should have separate groovy step or the groovy assertion in the JDBC and REST API step. And, in the link you shared, I did not understand how the response from each step is retrieved.
My REST API response is in XML:
<himUser updatedDate="2016-05-25T08:19:42Z" specialty="Nephrology" siteName="Westside - L - 03" siteId="8" login="AKSi79i" speakerCode="BJAi79i">
<address state="Karnataka" zipCode="560078" country="India" city="Bangalore" street1="Magrath Road"/>
<contact phoneNumber="9709606"/>
<person prefix="Dr." middleName="J1" lastName="spkr123" firstName="Syn123"/>
</himUser>
</himUsers>And, the JDBC response is like:
<Row rowNumber="7">
<SPEAKERCODE>BJAi79i</SPEAKERCODE>
<LOGIN>AKSi79i </LOGIN>
<UPDATEDDATE>2016-05-25 04:19:42.603</UPDATEDDATE>
<BUSINESSENTITYID>8</BUSINESSENTITYID>
<SHORTNAME>Westside - L - 03 </SHORTNAME>
<DESCRIPTION>Nephrology</DESCRIPTION>
<STREET1>Magrath Road</STREET1>
<STREET2/>
<CITY>Bangalore</CITY>
<COUNTRY>India </COUNTRY>
<ZIP>560078 </ZIP>
<STATE>Karnataka</STATE>
<FIRSTNAME>Syn123</FIRSTNAME>
<LASTNAME>spkr123 </LASTNAME>
<MIDDLEINITIAL>J1</MIDDLEINITIAL>
<SUFFIX/>
<PREFIX>Dr.</PREFIX>
<EMAILADDRESS/>
<PHONE>9709606</PHONE>
</Row>- nmraoChampion Level 3Can you provide input what is not cleared in the link provided. It clearly says the steps used including its type. Yes, it is a groovy step, what is confusion?
As told earlier, you need to create the model according to your suite. What I gave you will address to that specific issue. But you can make changes as you required. Then compare.
Related Content
- 2 years ago
Recent Discussions
- 11 days ago