Link

Creating Postman Collections


Collections in Postman are a compiled series of requests within a specific environment. This tool is most useful for API testing. It is also a group of requests saved in one folder and made to execute one after another. The requests can be GET, POST, PUT, or DELETE.

Note: The sample REST API will be taken from https://reqres.in. However, there are many other types of fake requests you may use to run this sample collection.

Step 1) Create a new collection folder called ‘Testing’ by clicking the top left orange ‘+’ button and save.

Step 2) Create a new request called ‘GET userList.

  1. Save it in your collections named ‘Testing’

Step 3) Add the request from reqres.in to the end of the url and click send. You should see a code 200 OK.

Runner

Step 4) Repeat step 2 and 3, but create a new GET request called “GET singleUser” and add https://reqres.in/api/unknown/1 to the URL.

Step 5) Click on the breadcrumbs on the left-side panel in the Testing tab to add a folder.

  1. Name the new sub-folder called ‘GET’.

  1. Place the two previously created GET requests into that new folder.

Step 6) Click on the arrow button above the bread crumbs and a new sub-window will appear to the right.

Step 7) Click the blue ‘Run’ button and a new window appears called “Collection Runner”. Here you can run the test as many times as you want. We will run this collection twice. To do this, you will have to change the iterations to 2.

Step 8) Click ‘Run Testing’.

Congratulations, you just ran your first collection! Your run results should be generated on a new window and look like the below.

Runner

Note: This what a Run Summary Report looks like if you like to review all the tests and the results of each iterations.

Runner

Now that you’ve built your first collection, you will now be able to run multiple requests to test.