Forum Discussion

Arunachalam_RM's avatar
Arunachalam_RM
Occasional Contributor
4 years ago

how to compare multiple database values with api response in single shot without groovy scripting?

i have created one table in my sql. i have created one 1 api json response which is coming from my local machine. now i need to compare response values with databases values as loop.how to do that ?...
  • ChrisAdams's avatar
    ChrisAdams
    4 years ago

    You can supply a fixed value, but if you're testing the API response matches the datasource value, you should be able to right-click in expected value cell and from the context menu, select Get Data.  Get Data allows you to select a value from anywhere within SoapUI (it's a brilliant little feature).  You could also specify the expected response from your datasource. E.g. {DatasourceStep#value}.  

     

    Might be a bit of a pain, but it's Groovy free.  Personally, when managing multiple entries in a single response and rows form a db and looping is required, I'd be more inclined to use Groovy.