Forum Discussion

JBARRETT5S's avatar
JBARRETT5S
New Contributor
8 years ago
Solved

Datasource Loop through JSON data

Hello, I'm a new user to Soap UI NG pro, and I'm trying to create a test case that will call a resource catalog (rest/json) web service to return information about all the web services it knows abou...
  • richie's avatar
    richie
    6 years ago

    I dont know if this will help or not.

     

    I was playing around with this a couple of week's ago - not specifically for work - I just hadn't used the groovy/xml/json datasources before so started to play around with the functionality.

     

    I had a LOT of trouble with json datasource, perhaps I was doing something wrong (I also find xpath easier to read than jsonpath)  - but I found setting it up was a lot easier if I used an XML datasource instead.

     

    Despite the fact that the response of the request that I was using to populate my datasource was actually .json  - I added the XML datasource in and specified the 'source property' dropdown on the XML datasource as 'ResponseAsXML'.

     

    I was then able to build up a datasource of attributes successfully sourced from the response without too much trouble.

     

    Just a suggestion,

     

    Cheers,

     

    richie