I am currently setting up some REST API tests. I have a test case that has the following Steps:
- Data Source - Get all Auth credentials in database
- REST Request - Auth POST getting auth token components
- Groovy Script - Create Auth token variable in test case properties
- Data Source - Get expected information from database
- REST Request - Account information GET
- Data Source - Get Json response from GET Request step (step 5) and put it into table form.
- Assertion - Compare data source table from step 4 + 6
- Data Loop - Loop back to step 2
I am currently having issues with step 7. I have the expected table from step 4 which is in the form of column; [id][name] with varying rows depending on the account logged in. Then I have the table in the same format from step 6.
What is the best way to compare that these two tables and assert whether they have the same data in them. So I need to loop through each row and match it to the other table. Both tables will be sorted by id so they will be in the same order.
I have tried the assertion test step, however that only seems to assert the first row in both tables.