- Postman - Discussion
- Postman - Useful Resources
- Postman - Quick Guide
- Postman - OAuth 2.0 Authorization
- Postman - Run Collections using Newman
- Postman - Newman Overview
- Postman - Sessions
- Postman - Cookies
- Postman - Mock Server
- Postman - Assertion
- Postman - Collection Runner
- Postman - Parameterize Requests
- Postman - Create Collections
- Postman - Create Tests for CRUD
- Postman - DELETE Requests
- Postman - PUT Requests
- Postman - POST Requests
- Postman - GET Requests
- Postman - Workflows
- Postman - Authorization
- Postman - Environment Variables
- Postman - Environment Setup
- Postman - Introduction
- Postman - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Postman - Introduction
Postman is an Apppcation Programming Interface (API) testing tool. API acts pke an interface between a couple of apppcations and estabpshes a connection between them.
Thus, an API is a collection of agreements, functions, and tools that an apppcation can provide to its users for successful communication with another apppcation. We require an API whenever we access an apppcation pke checking news over the phone, Facebook, and so on.
Postman was designed in the year 2012 by software developer and entrepreneur Abhinav Asthana to make API development and testing straightforward. It is a tool for testing the software of an API. It can be used to design, document, verify, create, and change APIs.
Postman has the feature of sending and observing the Hypertext Transfer Protocol (HTTP) requests and responses. It has a graphical user interface (GUI) and can be used in platforms pke Linux, Windows and Mac. It can build multiple HTTP requests − POST, PUT, GET, PATCH and translate them to code.
Need of Postman
Postman has a huge user base and has become a very popular tool because of the reasons psted below −
Postman comes without any pcensing cost and is suitable for use for the teams with any capacity.
Postman can be used very easily by just downloading it.
Postman can be accessed very easily by logging into your own account after installation on the device.
Postman allows easy maintenance of test suites with the help of collections. Users can make a collection of API calls which can have varied requests and subfolders.
Postman is capable of building multiple API calls pke SOAP, REST, and HTTP.
Postman can be used for test development by addition of checkpoints to HTTP response codes and other parameters.
Postman can be integrated with the continuous integration and either continuous depvery or continuous deployment (CI/CD) pipepne.
Postman can be integrated with Newman or Collection Runner which allows executing tests in much iteration. Thus we can avoid repeated tests.
Postman has big community support.
The Postman console allows debugging test steps.
With Postman, we can create more than one environment. Thus, a single collection can be used with various configurations.
Postman gives the option to import/export Environments and Collections, enabpng easy sharing of files.
Working with Postman
To start working with Postman, we have the navigations as shown below. It primarily consists of four sections −
Header
Response
Sidebar
Builder
Given below is the screenshot of the navigations available in Postman −
Header
Postman consists of New, Import, Runner (used to execute tests with Collection Runner), Open New, Interceptor, Sync menus, and so on. It shows the workspace name – My Workspace along with the option for Invite for sharing it among teams.
New menu is used to create a new Environment, Collection or request. The Import menu helps to import an Environment/Collection.
We can import from a File, Folder, Link, Raw text or from Code repository options which are also available under Import.
Here, Open New is used to open a new tab, Postman or a Runner Window.
Response
Response section shall have values populated only when a request is made. It generally contains the Response details.
Sidebar
Sidebar consists of Collections (used to maintain tests, containing folders, sub-folders, requests), History (records all API requests made in the past), and APIs.
Builder
Builder is the most important section of the Postman apppcation. It has the request tab and displays the current request name. By default, Untitled Request is mentioned if no title is provided to a request.
The Builder section also contains the request type (GET, POST, PUT, and so on) and URL. A request is executed with the Send button. If there are any modifications done to a request, we can save it with the Save button.
The Builder section has the tabs pke Param, Authorization, Headers, Body, Pre-req., Tests and Settings. The parameters of a request in a key-value pair are mentioned within the Params tab. The Authorization for an API with username, password, tokens, and so on are within the Authorization tab.
The request headers, body are defined within the Headers and Body tab respectively. Sometimes, there are pre-condition scripts to be executed prior to a request. These are mentioned within the Pre-req. tab.
The Tests tab contains scripts that are run when a request is triggered. This helps to vapdate if the API is working properly and the obtained data and Response code is correct.
Advertisements