Test novice encyclopedia: Postman introduction, installation, getting started and using detailed guides!

Keywords in this article: Postman basics

Table of contents

1. Background introduction of Postman

Two, Postman's operating environment

3. Download and install Postman

4. Basic functions of Postman

5. Interface request process

6. Management Use Case—Collections

7. Authentication 

1. Background introduction of Postman

When users develop or debug network programs or web page B/S mode programs, they need some methods to track web page requests. Users can use some network monitoring tools such as the famous web page debugging tools such as Firebug. The webpage debugging tool introduced to you today can not only debug simple basic webpage information such as simple css, html, scripts, etc., it can also send almost all types of HTTP requests! Postman can be said to be one of the representative products in Chrome plug-in products in sending network HTTP requests.

Note: Since chrome stopped supporting chrome applications in early 2018, the postman plugin may not work properly. Currently available in the chrome app store are chrome extensions and themes.

Two, Postman's operating environment

postman is suitable for different operating systems , Postman Mac, Windows X32, Windows X64, Linux systems, and also supports postman browser extensions, postman chrome applications, etc.

Postman uses the reference documentation:

1. Official English document:

https://learning.postman.com/docs/

2. Postman Chinese usage tutorial organized by chrome plug-in:

https://huajiakeji.com/web-development/2017-12/870.html

3. Download and install Postman

1>, postman download address:

https://www.postman.com/downloads/

2>. Postman official website download address:

https://www.getpostman.com/apps

3 > .Postman installation

There are several installation methods of postman. According to what we have introduced above, we will introduce three installation modes:

1. Chrome browser postman plug-in installation

The postman Google browser installation plug-in, so the premise of its use is that you have to install Google Chrome on your computer. After installing Google Chrome, you also need to download the required Postman plug-in in the Google Web Store. The way to download the plug-in is as follows:

Friends who cannot access the store on the google app can refer to here, or download the client version

 
  

2.Postman电脑客户端安装

1).macOS installation 

Once you've downloaded the app, you can drag the file into the "Applications" folder. Double-click Postman to open the application.

2).Windows installation
Download the installation file
and run the installation program

3). I haven't tried Linux installation
, but I found some reference materials (interested friends can experiment by themselves)

Install postman on ubuntu: 

https://blog.csdn.net/qianmosolo/article/details/79353632

Install the Postman application on Ubuntu 16.04:

https://www.bluematador.com/blog/postman-how-to-install-on-ubuntu-1604?utm_source=hootsuite&utm_medium=twitter&utm_campaign=

4. Basic functions of Postman

5. Interface request process

1. GET 请求
GET请求:点击Params,输入参数及value,可输入多个,即时显示在URL链接上,
所以,GET请求的请求头与请求参数如在接口文档中无特别声明时,可以不填。


Response example: Here will be the response status code, response time, and response size of the request.

Response body example: There can be many formats of the response. I am here because the request is Baidu, so, the response is html. Generally, we If you customize the interface, it is the response body in json format

2. POST请求

POST请求一:表单提交

In the example below, the request method, request URL, and request parameters are set, but the request header is not set.
During my use, the request header is automatically generated according to the format of the request parameters. The Content-Type in the request header and the format of the request parameters There is a relationship between them, for example:

POST request two: json submission

In the figure below, when we choose JSON (application/json), it will automatically set the headers for us to application/json.
Here is no screenshot example. Friends can check it by themselves


POST request three: xml submission

POST request four: binary file submission

Other request methods such as PUT and DELETE generally have the same process as GET and POST, so I won’t give examples here.

6. Management Use Case—Collections

There is a picture in the POST basic function that roughly talks about the role of Collections, and here we will explain it in detail.

Collections collection: that is, multiple interface requests can be put together and managed. What kind of interface requests can be placed in the same collection?

Here I tell you that you can do this: one collection for one project, so that it is convenient to find and process data in a unified manner.

The first step, create Collections

Click the icon with the + sign in the above picture, enter Name: "abc", Description: "example demo", click the Create button to create a Collections successfully. The second step is to add a request in Collections

Prepare all the data requested by the interface on the right, and after verification, click the save button.

After saving, you can see it here, and you can click here when you want to call it again later, which is convenient and fast.

Collections management refinement, here we group and
add subfolders for different request methods

This is the result of our refined division. Does it look more organized?

7. Authentication 

1、Basic Auth

It is a basic verification, so it will be relatively simple and will directly put the user name and password information in the header of the request.

2、Digest Auth

Much more complicated than Basic Auth. Generate the authorization header with the currently filled value. So make sure the settings are correct before generating the header. If the current header already exists, postman will remove the previous header.

3、OAuth 1.0

postman's OAuth helper lets you sign with support for OAuth

1.0 Authentication based requests. OAuth does not need to obtain an access token, you need to obtain it from the API provider. OAuth 1.0 can set value in header or query parameter.

4、OAuth 2.0

Postman supports obtaining OAuth 2.0 token and adding it to requests.


If the article is helpful to you, remember to like, bookmark, and add attention. I will share some dry goods from time to time...

END Supporting Learning Resources Sharing

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free 【保证100%免费】

加入我的软件测试交流qq群:110685036免费获取~(同行大佬一起学术交流,每晚都有大佬直播分享技术知识点)

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

insert image description here

How to obtain the full set of information:

Guess you like

Origin blog.csdn.net/IT_LanTian/article/details/131186923