Forum Discussion

Uienifer's avatar
Uienifer
New Contributor
14 years ago

Comparing database values and values from response

Hi,
I have the database that contains list of products. I have web-service that returns list of products found in database using some criterias.
I need to check that in response I have all products that correspond to these criterias.
I created two datasourses - response(xml) datasourse and jdbc datasourse(this datasourse contains all products that should be returned). So now I should compare them and make sure that rows in these datasourses contain identical values.
This is the place I stuck. How to compare these datasourses row by row?
Any suggestions?
I use SOAP UI Pro 4.5 and groovy.
Thanks a lot!

2 Replies

  • Uienifer's avatar
    Uienifer
    New Contributor
    Resolved.
    I figured out that my all approach was wrong. I should use JDBC request instead JDBC Datasourse, and just use XML response not XML datasourse. That gave me 2 xmls that can be easily compared using simple groovy scripts.
    I used groovy script to put values from response in list and values from db in another list, then I just compared two lists in loop.
  • pradnya2221985's avatar
    pradnya2221985
    Occasional Contributor
    I also have same problem .Can you please help me out for how to compare it using groovy? I am new to groovy...
    Thanks in advance