# What is Postman?

Postman is a scalable API testing tool that simplify API workflow in testing and development. It supports variables, which can simplify API testing. There are few widely popular API test-tools: Postman, curl, and SoapUI. Postman is a powerful tool used to test web services. It was developed for sending HTTP requests simply and quickly.

# Why Postman tool?

Postman is a simple GUI for sending HTTP requests and viewing responses. It is built upon an extensive set of power tools, which are incredibly easy to use. Postman helps you perform a variety of functions ranging from

  • Use of Collections - Postman lets users create collections for their API calls. Each collection can create subfolders and multiple requests. This helps in organizing your test suites.
  • Creating Environments - Having multiple environments aids in less repetition of tests as one can use the same collection but for a different environment.
  • Collaboration - Collections and environments can be imported or exported making it easy to share files. A direct link can also be used to share collections.
  • Accessibility - To use Postman, one would just need to log-in to their own accounts making it easy to access files anytime, anywhere as long as a Postman application is installed on the computer.

# Postman for Mac/Windows/Linux:

Go to https://www.getpostman.com/apps and download the application based on the OS you are using and follow the steps prompted to successfully install the Postman application.

# Making http requests from Postman:

Since we have installed the Postman app successfully, it ready for HTTP request to ABB Ability™ Platform or any api server.

# Few common http methods:

  • GET : The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
  • POST : A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.
  • PUT : PUT is used to send data to a server to create/update a resource. Replaces all the current representations of the target resource with the uploaded content.
  • PATCH : PATCH is used to update partial resources. For instance, when you only need to update one field of the resource, PUTting a complete resource representation might be cumbersome and utilizes more bandwidth.
  • HEAD : HEAD is almost identical to GET, but without the response body. HEAD transfers the status line and the header section only.
  • DELETE : The DELETE method deletes the specified resource.
  • OPTIONS : The OPTIONS method describes the communication options for the target resource.

# How to use Postman ?

Below is the Postman Workspace. Let's explore the different features of the tool!

Postman-Setup

  1. New - This is where you will create a new request, collection or environment.
  2. Import - This is used to import a collection or environment. There are options such as import from file, folder, link or paste raw text.
  3. Runner - Automation tests can be executed through the Collection Runner.
  4. Open New - Open a new tab, Postman Window or Runner Window by clicking this button.
  5. My Workspace - You can create a new workspace individually or as a team.
  6. Invite - Collaborate on a workspace by inviting team members.
  7. History - Past requests that you have sent will be displayed in History. This makes it easy to track actions that you have done.
  8. Collections - Organize your test suite by creating collections. Each collection may have subfolders and multiple requests. A request or folder can also be duplicated as well.
  9. Request tab - This displays the title of the request you are working on. By default, "Untitled Request" would be displayed for requests without titles.
  10. HTTP Request - Clicking this would display a dropdown list of different requests such as GET, POST, COPY, DELETE, etc. In testing, the most commonly used requests are GET and POST.
  11. Request URL - Also known as an endpoint, this is where you will identify the link to where the API will communicate with.
  12. Save - If there are changes to a request, clicking save is a must so that new changes will not be lost or overwritten.
  13. Params - This is where you will write parameters needed for a request such as key values.
  14. Authorization - In order to access APIs, proper authorization is needed. It may be in the form of a username and password, bearer token, etc.
  15. Headers - You can set headers such as content type JSON depending on the needs of the organization.
  16. Body - This is where one can customize details in a request commonly used in POST request.
  17. Pre-request Script - These are scripts that will be executed before the request. Usually, pre-request scripts for the setting environment are used to ensure that tests will be run in the correct environment.
  18. Tests - These are scripts executed during the request. It is important to have tests as it sets up checkpoints to verify if response status is ok, retrieved data is as expected and other tests.

# How to connect ABB Ability™ Platform APIs using Postman ?

TIP

Download & Extract the POSTMAN collections from here.

  1. Click on Import button from POSTMAN

  2. Select both the files from your local drive

  3. Select the correct environment from the available list. PostmanImport

  4. Replace environment variables as per your Ability Instance details. PostmanVariable

  5. Generate a token, Example: Background App PostmanToken

  6. Get Call to Ability Platform API, Example : GetAllModel PostmanCallAPI

Last updated: 1/28/2022, 7:45:56 AM
Feedback