How to check if the API response is the same as that of the database

**
We will use postman to automate our apis. I need help to validate that the API response is correct with what is in the database.**

@mirellae2e Welcome to the community :bouquet:

Kindly go through this link and provide some more details here.

From your question, I understand that you are looking to validate the response from Postman against the DB values of yours. But what is already existing here? :slight_smile:

Do you have any API’s calls/requests available to hit and get response from your DB? Or you need manually verify your DB for values? What DB you are using? Roughly how many fields we need to validate? If there are very few fields we can hardcode it to any variable and store in Postman, but in that case the data will not be refreshed for every run.

You can consider the Data driven approach, to extract the DB results every time and then we can validate against the response from Postman.

Kindly provide some more details with screenshots/existing setup of yours to guide you better :blush:

1 Like