Postman makes API Testing faster, easier, and better. Postman is the most complete tool chain for API development. It is the most-used REST client worldwide that has Intuitive user interface to send requests, save responses, add tests, and create workflows. It is Designed with the developer in mind & packed with features and options like Request History, Variables, Environments, Tests & pre-request scripts, Collection & request descriptions.
Within the Postman, Collections are the most-used API format that Consolidate requests,
parameters, descriptions, tests & scripts all in one folder. It can collaborate on APIs through shared collections, Build test suites, documentation, mock servers, and monitors on collections.
As in our last article we learned about SOAP/REST Services, now this article help us how to test Rest services through Postman.
Automate Testing with the Collection Runner
- Run all requests within a Postman Collection
- Customize runs across production, development, or other environments
- Use data files as parameters for each iteration
- Log each request and response for detailed debugging
- Flexible monitoring of APIs, based on Postman Collections
- Monitor API uptime, responsiveness, and correctness
- Detailed reporting of monitoring results
Installation & Setup
Go to Chrome App Store and Search Postman. Click “ADD TO CHROME”
Launch the app, and see a prompt to log in or sign up. If you already have Google account, use your credentials to log in to Postman.
Postman provides a multi-window and multi-tab interface to work on APIs. Postman strives to be clean and flexible to user needs. It gives user as much space as possible for their APIs. Navigating through the interface is easy. See the graphic below to see how everything is organized:
Sidebar: The Postman sidebar lets you find and manage requests and collections. The sidebar is divided into two main tabs, for History and Collections. The right edge can be dragged to resize the width of the sidebar. The sidebar can also be minimized for smaller screens.
History Tab: Every request that you send inside the Postman app is saved in the History tab within the sidebar.
Collections Tab: Create and manage collections from the Collections tab in the sidebar.
The topmost toolbar in Postman covers the following options:
- Sidebar toggle icon – Show or hide the sidebar.
- Runner button – Open the collection runner.
- Import button – Import Postman collections, environments, WADL, Swagger, RAML, or cURL into Postman using files, links or raw text.
- New window icon – Open a new Postman window.
- Builder and Team Library tabs – Switch context between the request builder and team library view.
- Interceptor/Proxy icon – Manage proxy or Interceptor settings.
- Sync status icon – See and update the status of your Postman account.
- User dropdown – Manage collection links and your profile or log in to, or out of, your Postman account.
- Notifications icon – Receive notifications or broadcasts.
- Settings icon – Manage Postman app settings and find other support resources.
- Heart – Love Postman? Click on this button to share the love!
Postman gives you a tabbed layout for sending and managing API requests in the builder. The top half is the request builder and the bottom half is the response viewer.
- Cookies – The MANAGE COOKIES modal is accessed by the Cookies link on the far right beneath the Save button. This feature lets you manage cookies associated with the request.
- Code – The GENERATE CODE SNIPPETS modal is accessed by the Code link on the far right beneath the Save button. This feature lets you generate code snippets associated with the request in more than 20 languages.
To see what’s going behind the scenes, there are two consoles available in Postman
- Postman console – Contains a running log of HTTP requests and responses. Log messages that come out of scripts (like in console.log). This feature is only available in Postman’s native apps.
- Dev Tools console – Where you can log diagnostic information during development
Tabs and Windows
Postman lets you use multi-tab and multi-window configurations. This allows you to work on multiple requests or even multiple collections together and simultaneously.
To open a new tab in Postman press the + icon in the builder or use the CMD/CTRL + T shortcut. From the menu bar, you can also select “New Tab” from the File menu to create a new tab. By right clicking on a tab name, the menu allows you to duplicate or close tabs. If any tab has unsaved changes and you are attempting to close the tab, Postman will prompt you to save your changes.
Tab and Sidebar Behaviour
By default, Postman assumes that you want to work on one collection request in one tab. When you open a request from the sidebar, Postman will open a new tab if an existing tab has unsaved changes; otherwise the request takes over the current tab. You can always open a request in a new tab. From the sidebar under the Collections tab, right click a request and select “Open in New Tab”.
Within the request builder, drag and drop tabs to reorder them as you see fit. Open a new request in a new tab, or in a new Postman window. Open multiple windows using the New Window icon in the header toolbar or the keyboard shortcut.
We have seen how to setup Postman and what features are in it. The list might not seem complete to you and readers are always welcomed to suggest their views and add opinions. In next tutorial we will learn about “Working within Postman“.