PostMan

Unified maintenance and management tool for APIS. Provides life-cycle interface management and maintenance support. Simplifies defining, maintaining, sharing, and running apis. There are three versions of PostMan: visitor mode, account login, and paid membership.

Note: The following operations are performed based on all account login modes

This section describes Postman components

WorkSpace

Workspace for managing Collections, APIS, Environments, Monitors, and History for a space.

Collections

Collection management, API requests for classification management and maintenance.

APIS

API interface planning: plan interfaces first, and then generate Collection requests.

  • Create API
  • Define API Interface Documentation (YML)
  • The Collection interface is reversely generated

Environments

Provide environment variable configuration, you can configure different environment information to test the interface. Such as: DEV, TEST, PROD, etc

Mock Server

PostMan provides a Mock Server to run through the interface

  • Select and create the interface that you want to simulate
  • Simulate server parameter configuration

Monitors

You are advised to use JMeter to monitor the performance of API interfaces

  • Select interfaces, configure scheduled tasks, and set notifications

History

This interface is used to query historical information

  • View and operate historical request information

Postman common scenarios

Specification for use:

  • Collection Creates Collection objects and manages APIS in a unified manner. If there are many apis, create folders under the Collection for grouping
  • Under the specified collection, the request object is created in the specified file
  • In the case of multiple environment tests, create environment variables and extract related variable parameters from the request request
  • Set environment variables in request and use parameters

Import API(Import external interface)

File/import or import directly from Collections:

  • Support for importing swagger interfaces online
  • Offline import of files (collections.json)

API + Environment use

Steps:

  1. First configure the Environment variable.

Reference: Environments environment variable use

  1. Select the environment and use the environment variables in the request request in the Collection

Note:

1. The parameter names in the request path are defined in the environment variable

2. Obtain and use environment variable parameters{{variableName}}VariableName is an environment variable

3. The value used by the environment variable is current value in the environment

Export API interface