Forum Discussion

JesB's avatar
New Contributor
9 years ago

Validate the response from the RESTAPI request against the response from the JDBC step

I am new to SOAPUI. I need help to validate in other words groovy script to assert the response from the REST API request against the response from the JDBC step. Could someone help me with this?



3 Replies

  • JesB's avatar
    New 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"/>



    And, the JDBC response is like:


      <Row rowNumber="7">
                <LOGIN>AKSi79i </LOGIN>
                <UPDATEDDATE>2016-05-25 04:19:42.603</UPDATEDDATE>
                <SHORTNAME>Westside - L - 03 </SHORTNAME>
                <STREET1>Magrath Road</STREET1>
                <COUNTRY>India </COUNTRY>
                <ZIP>560078  </ZIP>
                <LASTNAME>spkr123 </LASTNAME>



    • nmrao's avatar
      Champion Level 3
      Can 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.