当前位置:网站首页>F12 packet capture is used for the whole process analysis of postman interface test
F12 packet capture is used for the whole process analysis of postman interface test
2022-06-30 07:54:00 【Automated test】
One 、 Why grab a bag
From the perspective of functional testing
View hidden fields by capturing packets
Web There are many hidden fields in the form , These hidden fields generally have some special purposes , Like collecting user data , The prevention of CRSF attack , Anti crawler , And some other uses . These hidden fields are not visible on the interface , If you want to detect these fields , You have to use the bag grabbing tool .
Understand the content of the agreement through the packet capture tool
Facilitate interface and performance testing
Performance testing , Performance testing is actually a large number of simulated user requests , So we must know the content and characteristics of the agreement in the request , To better simulate user requests , Packet capture tools are needed to analyze the protocol ; Interface test , In interface testing , Although we try our best to have perfect interface documents . But in many cases, interface documents cannot cover all situations , Or because the document lags behind , During the interface test , We also need to use the packet capture tool to assist us in interface testing .
You need to use the bag grabbing tool , Check data encryption
Security testing , We need to check whether sensitive data is encrypted during transmission , It also needs the help of bag grabbing tools to check .
Front and rear end of treatment bug The dispute of belonging
Before we submit bug When , Front ends often appear ( Client presentation ) Back end ( The logic of the server ) Controversy , Then you can use the packet capture tool , Is it really the problem of data transmission or the problem of front-end display . If there's a problem with the captured data , So it's usually the back-end problem ; If the captured data is correct , So basically, it can be concluded that the problem is the front-end display .
Through packet capturing analysis
Can better understand the whole system
Often use packet capture tools to assist in testing , You can have a good understanding of the whole system , For example, the relationship between the front and back of the data transmission process , And the structure of the whole system . Especially for the products of current micro Service Architecture , Capturing packets can better sort out and grasp the relationship between various services of the whole system , Greatly increase the coverage of the test . In addition, it can improve the understanding of code 、HTTP Understanding of protocol knowledge .
Two 、 How to grab a bag
Common packet capture tools are Fiddler、wireshark、Charles And the browser comes with F12 And other tools . So here's how to use Browser comes with F12 To grab the bag .
* The first 1 Step : After opening the browser , Press F12, Select the network -- Click the setup button -- Check continuous recording
* The first 2 Step : Operate on the browser , You can see in the network HTTP Request information ( Login operation )
* The first 3 Step : Find the requested information for the operation ( Login operation )
* The first 4 Step : Get the four elements of the request , Used for interface testing
1- Request address :
2- Request method :post
3- Request parameters :
{"logo":"HC","username":"wuye_kemi","passwd":"xxxx","validateCode":"LEMON","errorInfo":""}
username: User name when logging in
passwd: Password at login
validateCode: Login verification code
4- In response to the results :
{"userName":"wuye_kemi","userId":"302021110504836175","token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqY"}
3、 ... and 、Postman Interface test practice
adopt F12 After capturing the packet, we get the relevant interface information , Next we can use postman Interface tool to test the interface .
Put the request address in turn 、 Request mode 、 Request parameter filling postman In the tools , Click on Send send out , Then check the response result and the packet capture response result . In this way, a simple interface debugging is completed .
Four 、 summary
If you want to test the interface by capturing packets , Need to have a certain network protocol Foundation , These foundations allow you to quickly find request and interface information .
The second is in the process of interface testing , We'd better communicate with developers , Because they know more about the meaning of each parameter and type constraints , Want a more comprehensive test interface , You can organize the packet capture information into documents , And communicate with developers to improve documents .
The standard test flow is to design use cases and execute interfaces with interface documents .
If you want to know more, you are welcome to interact with us in the message area ~
If you think it's helpful, give it a compliment
Finally, I made up some notes of learning materials : Want to make up the learning materials, notes, and the above-mentioned full set of Huawei interview questions 【 Private letter my key words “999” Free access 】 High salary resume template ( Interview collection is free )
High salary resume template ( Interview collection is free )
边栏推荐
- JS code case
- C. Fishingprince Plays With Array
- 期末复习-PHP学习笔记5-PHP数组
- Armv8 (coretex-a53) debugging based on openocd and ft2232h
- Deep learning -- using word embedding and word embedding features
- Final review -php learning notes 3-php process control statement
- At the end of June, you can start to make preparations, otherwise you won't have a share in such a profitable industry
- 2022.01.20 [bug note] | qiime2: an error was encoded while running dada2 in R (return code 1)
- Research Report on search business value in the era of big search in 2022
- Why don't you know what to do after graduation from university?
猜你喜欢
深度学习——GRU单元
深度学习——网络中的网络以及1x1卷积
December 19, 2021 [reading notes] - bioinformatics and functional genomics (Chapter 5 advanced database search)
November 19, 2021 [reading notes] a summary of common problems of sneakemake (Part 2)
Disk space, logical volume
期末复习-PHP学习笔记4-PHP自定义函数
HelloWorld
深度学习——卷积的滑动窗口实现
Wangbohua: development situation and challenges of photovoltaic industry
Permutation and combination of probability
随机推荐
Want to change careers, but don't know what to do? This article is written for you who are confused
Examen final - notes d'apprentissage PHP 3 - Déclaration de contrôle du processus PHP
HelloWorld
Cadence physical library lef file syntax learning [continuous update]
C language operators
深度学习——目标定位
Digital white paper on total cost management in chain operation industry
【花雕体验】12 搭建ESP32C3之Arduino开发环境
Deep learning - bounding box prediction
Spring Festival inventory of Internet giants in 2022
December 19, 2021 [reading notes] - bioinformatics and functional genomics (Chapter 5 advanced database search)
ACM. HJ48 从单向链表中删除指定值的节点 ●●
【Tensorflow-gpu】window11下深度学习环境搭建
安科瑞高等学校校园建筑节能监管系统建设
Construction of module 5 of actual combat Battalion
期末复习-PHP学习笔记8-mysql数据库
Go 数据类型篇之字符串及底层字符类型
Use of nested loops and output instances
String and underlying character types of go data type
Basic theory of four elements and its application