Forum Discussion

TesterVin's avatar
TesterVin
Occasional Contributor
10 years ago

How to verify all the details in children nodes in response

[REST SERVICE] After running a get method, we're getting the response as list of users (in our case it's 30) with their complete information details like name,group,fname, lname and email. I need to verify all details of the all users with the help of datasource. How to accomplish this. Please help

Here, is the sample json response
"info" [
{
"username": "tester",
"defaultGroup": "Group1",
"firstName": "Admin",
"lastName": "Admin",
"emailAddress": "xxx@yahoo.com"
},
{
"username": "tester",
"defaultGroup": "Group2",
"firstName": "Admin",
"lastName": "test",
"emailAddress": "yyy@yahoo.com"
}
]
.... similarly it is displaying other child nodes

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    You may write script assertion for the same.
  • TesterVin's avatar
    TesterVin
    Occasional Contributor
    I'm able to do this with the help of 'Message content assertion'.

    I'm a newbie to SoapUi and groovy script. Can you please share the code and the process to follow for the same ?

    Thanks in advance