API testing using Postman Part-2
Please go through API testing using Postman Part-1 as this blog is going to be a continuation of part-1
In this blog, we will see
1.How to install postman
2. Postman UI dashboard
Being open source toll postman is easily available. To download Postman click here. Postman is working with Mac OS, window, Linux for free.
After download open Postman.
Postman dashboard has the following feature
On left top corner we have a New button. You can create a new request, collection or environment using this. Either you can click on a new button and it will show a pop-up or you can click on a drop-down button and select what you want to create.


Import: Import is used to import a collection or environment. There are options such as import from file, folder, link or paste raw text.

Runner: Automation tests can be executed through the Collection Runner. Once you click on Runner one pop up will come where you can select which collection you want to run or you can import test run if you have a collection in a local machine.

Open New: After clicking on this button a drop down will open. We can
open a new tab, Postman Window or Runner Window by clicking on any of those options.
My Workspace: Here is also drop down will come after clicking on My workspace option. You can create a new workspace individually or as a team.
Also, you can do several operations on existing workspace like view details, invite to the workspace

On the left hand, we have 2 tabs, History and Collection.

History will record the things which we perform.
The collection will organize our HTTP requests into a folder.
On the right-hand side, we have multiple tabs like a browser where we can work on different request
In a tab, we can provide HTTP request with the type of request we want to make. We can provide a header body, and we can see the response.

On the right-hand side, we have Request tab with an untitled request
HTTP Request: It contains a different type of HTTP request in the drop down such as GET, POST, PUT, DELETE, etc.
Request URL: This is Endpoint which we discussed in the previous post.
Params: Below Request URL, there is a tab named as Params where you have provided parameter required for the HTTP request in the form of key value.
Authorization: For security, some APIs are having authorization. In order to access such APIs, proper authorization is needed. It can be in the form of a username and password or bearer token etc.
Headers: While sending a request to the server it is important to inform the server about data format you are sending or date format which we accept.
You can inform it in the form of key-values in headers. You will get headers keys and values in the drop-down list.
For example Content-Type: application/json
Body: While creating/manipulating/updating data on the server we use POST/ PUT request. While sending these type of request it is mandatory to send data which we want to create/update on the server. We will pass that data in Body with the request.
Pre-request Script: These scripts will be executed before the request.
Tests: These are checkpoints to verify if response status is ok, retrieved data is as expected and other tests. These test will execute while executing requests
It is always recommended to create an account on postman so that if we use different machines whatever work we have done so far will be with us. But make sure that you save your changes before signing out or closing everything.
Once you sign in to your account you will get on default collection called “Postman Echo”. You can play with requests present in that collection to get familiar with the postman dashboard.
Few actions you can try on postman:
1)change request type as per your request type.
2)Click on Params and you can add the number of parameters you can add.
3)Save the request. If a request is already saved then it will override with that. If it is a new request then pop up will appear which ask either to select an existing collection or to create a new collection and save into it.

4)Check the response body in a different format.
One interesting feature postman have is “Code” link
it is on right top below ‘Send’ button. If we click on this it will bring to a window which contains different code snippet ( in different languages). We can have ready to use the code for that request in multiple languages.
For e.g., if you take code snippet for a particular request in curl. Go to your terminal hit it directly. You will get the same response which we will get if we hit that HTTP request in Postman.
In the next post, we will see how to test API manually and automatically.