Test Script to add POST request results to database

Hi All,

Iโ€™m trying to write a test script that will allow me to save certain parts of the response of a POST request to a database (restdb). Can anyone point me to some resources to getting started?

Thank you,

Austin

1 Like

@spacecraft-candidat2 Welcome to the Community :partying_face:

So I understand that you need some fields from your response to be sent to your database.

  1. What database do you use?
  2. Do you have access to use the API of that database? Because you cannot do anything directly to interact with databases through Postman unless you have a API to communicate with your database.

First step is easy, where you can parse the API response and store them as variables of your scope. But to handle the second step we need to think about an approach. We can have access the database APIโ€™s else you need to copy the response to the file and to automate the process of inserting those records to your database.

I have picked similar discussions from the forum for you, please go through them to get more details about your ask :blush:

I hope you this helps :slightly_smiling_face:

3 Likes

Got it working! Thanks!

1 Like