postman-workshop

banner-image

Day - 01: Mastering API Testing Environment Management

Suppose there is a company called ToTo Company (API Providers) which provides the following services.

API Types:

Public:

Access by anyone with API key

Private / Internal:

Used within the same org. Access is restricted (OAuth, OpenID connect) communication between different services

Partner:

Access by different organizations. Access is restricted. Agreements between creator and consumer.

Focus on the Following Problems


After one week completing research their RND team introduce with a HERO called POSTMAN

What is Postman?

Postman is a popular collaboration platform for API development. It provides a user-friendly interface that allows developers to design, test, document, and share APIs effortlessly. Some key features of Postman include:

With Postman, developers can seamlessly interact with a wide range of API types, including REST, GraphQL, gRPC, WebSockets, and more.

In short:

Postman is a popular API Client that allows you to make requests to APIs. Test API endpoints and automate API testing. It provides a use-friendly interface for constructing and sending HTTP requests, as well as for inspecting the response. Postman also offers features for collaboration, documenting APIs and Monitoring API etc.

What is an API Client?

An API Client is a set of tools and protocols that operate form an application on a computer. They help you to bypass some operations when developing a web application rather than reinventing the wheel every time. Using a client API is a great way to speed up the development process.

Let’s Explore Postman

Postman Collections

Now let’s talk about the postman collections. Postman collections are an essential feature of the Postman platform, serving as a convenient way to organize, manage, and share APIs and requests.

Here are some key features of Postman collections:

SO, collection is a grouping or container for a set of related API requests. It allows you to organize, structure, and logically manage your API requests. Collections can include multiple requests, scripts, and even folders to help you streamline and categorize your API development and testing workflows

In Short:

In Postman a collection is a grouping or container for a set of related API requests. It allows you to organize, structure, and manage your API requests in a logical manner. Collections can include multiple requests, scripts and even folders to help you streamline categorize your API development and testing workflows.

Postman Variables

When discussing Postman collections, it’s essential to delve into Postman variables. Without a grasp of Postman variables, you can’t fully leverage the benefits offered by the Postman platform. These variables are crucial components that enhance flexibility, reusability, and efficiency in managing API requests, scripts, and environments. They empower developers to streamline workflows, simplify maintenance, and ensure dynamic data handling across different testing and development scenarios. In essence, understanding and effectively utilizing Postman variables are fundamental steps toward maximizing the potential of the Postman tool set.

In Postman there are 5 types of variables available:

  1. Global Variables
  2. Collection Variables
  3. Environment Variables
  4. Data Variables
  5. Local Variables

Here is the details overview:

Postman Variables Diagram

postman-variables-diagram

Postman Scripts Diagram

postman-script-diagram