Use Postman to intercept browser requests

After the project goes online, it is inevitable that there will be bugs. When a problem occurs, we may need to obtain the data requested by the front-end page, and then send the same data in the test environment to reproduce the problem. Manually constructing data is quite troublesome, so we can use Postman's plug-in on the browser to help intercept the request and obtain the sent data.

Install

Since the operation is based on Postman, you first need to install Postman. The version I use locally is v10.9.4, so I won’t go into details about this.

Postman plug-in installation

I am using Chrome, so here is Chrome as an example. We need to search for postman  interceptor in the plug-in market and surf the Internet scientifically. Once you find it, install it.

Insert image description here

Postman configuration

The configuration of each version may be different. Here I take the version v10.9.4 I am using as an example.

As shown in the figure below, the intercepted request will ask you to put it under a certain group, and you can just choose one.

Insert image description here

The same is true for the interception configuration below.

Insert image description here

If you need to capture some cookie information, you need to configure the domain name as shown below. In this way, the cookie will be saved together when intercepted, and the cookie information will be included the next time it is sent. This feature is useful when login information is stored in cookies.

Insert image description here

Chrome plug-in configuration

After Postman is configured, you need to configure the browser plug- in . It is actually very simple, just turn on the switch. The color of the plug-in is orange before it is turned on, and blue after it is turned on. We only need to turn on the corresponding interception switch. as follows:

Insert image description here

Turn the OFF switch to ON and the plug-in will start working. If you need to intercept cookies, the Cookie option switch also needs to be turned on.

start using

After all the previous work is completed, you can request the page you want to intercept. The intercepted request will be saved under the group you configured.

Insert image description here

Finally, I would like to thank everyone who reads my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, if you can use it, you can take it directly:

Insert image description here

This information should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can also help you!  

Guess you like

Origin blog.csdn.net/nhb687095/article/details/132806157