Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Use XMLAssertor to validate items in a table data source are present in response

paolabs Posts: 16

I am very new to SOATest, so I may be going about this the wrong way. I have a test that is using SOAPClient to test a service (A). I have a table that contains values that I used to setup some rooms using a different service (B), and I want my test to use those same values to verify that my service (A) is returning all values.

I want to do a couple of things:
1. Make sure that the number of elements returned matches, i.e. I have 6 rows in the table, there should be 6 elements in my xml.
2. Assert that the list contains each of the values from my table.

For instance, this is what is included in my response:



I would like to have an assertion that verifies there are 2 elements in room list and another one that verifies that the room codes are Rm1 and Rm2.

What is the best way to do this? I attempted to use a value occurrence for the second assertion, but it creates a test for each row, and when I have 20 rooms that is a lot of tests, is there a better way? I still can't find a way how to do the first thing