当前位置:网站首页>Common tools for interface testing --postman
Common tools for interface testing --postman
2022-06-28 08:52:00 【Xiao Han's daily life】
link :https://pan.baidu.com/s/1h4t7tbFHJTYGO9L-2qgDYg
Extraction code :tbws
Respond to body Area
prtty : format json or xml Response content of form
raw : Just a large text of the response body , It can tell you whether the response is compressed
preview : In a sandbox iframe Render the contents of the response in
Request area

1, Authorization: Authentication , It is mainly used to fill in the user name and password , And some signature verification fields ,postman There is one helpers It can help us simplify some repetitive and complex tasks .
The current set helpers It can help you to solve some problems authentication protocols The problem of .;
2 Headers: Requested header information
3 Body:post Parameters that must be taken when requesting , Put some key-value Key value pair
4 Pre-requerst Script: I can let you in Customize request data before request , This runs before the request , Grammar use JavaScript sentence .
5 tests:tests Tag function is more powerful , Usually used to write tests , It runs after the request .
Support JavaScript grammar .postman Every time you execute request When , Will execute tests.
The test results will be in tests Of tab The above shows the number of passes and the right and wrong conditions .
This will be explained in detail later , It can also be used to design use cases , For example, to test whether the returned result contains a string
post Request mode body Format area

1 form-data:, It processes the form data into a message , Label as unit , Separate with separator .
You can upload key value pairs separately , You can also upload files directly
( When the upload field is a file , There will be Content-Type To describe the type of document , But the file will not be preserved as history , Only every time you need to send a request , Add files again .);
post A more common kind of request
2 x-www-form-urlencoded: Corresponding information header -application/x-www-from-urlencoded, The data in the form will be converted to key value pairs ;
3 raw: You can upload any type of text , such as text、json、xml etc. , All filled in text Will be sent along with the request ;
4 binary: Corresponding information header -Content-Type:application/octet-stream,
Only binary files can be uploaded , And no key value pair , Only one file can be uploaded at a time , Nor can history be preserved , Every time you select a file , Submit ;
About setting environment variables :

1. Global--- overall situation
2. Enviroment --- environment variable
3. Local --- Local
4. Data ---- data
Priority from top to bottom Data ---- > Local ---- > Enviroment ---- > Global
A parameterized
{ { Parameters }}
take token A parameterized , For later use
var jsonDate = pm.response.json();
var token = jsonDate.json.token;
pm.environment.set("token".token);

Data driven
adopt json、csv file , Pass parameter values


Export case to code


边栏推荐
- Fire safety hazards
- Power data
- Quelle est la largeur de bande du serveur de bavardage sonore pour des centaines de millions de personnes en même temps?
- Operating principle of Rogowski coil
- AWS saves data on the cloud (3)
- Anniversary party
- DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...
- [.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service
- A - Bi-shoe and Phi-shoe
- Kali installation configuration
猜你喜欢

Basic operation of PMP from applying for the exam to obtaining the certificate, a must see for understanding PMP

Using transform:scale causes the page mouse hover event to disappear

STL -- binder

High rise building fire prevention

Almost union find (weighted union search)

Infinite penetration test

利尔达低代码数据大屏,铲平数据应用开发门槛

Construire le premier réseau neuronal avec pytorch et optimiser

Love analysis released the 2022 love analysis · it operation and maintenance manufacturer panorama report, and an Chao cloud was strongly selected!

【大案例】学成在线网站
随机推荐
Cloudcompare & PCL point cloud clipping (based on closed surfaces or polygons)
中金财富开户安全吗?怎么收费?
Batch modify tables and sorting rules for fields in tables
Using transform:scale causes the page mouse hover event to disappear
STL -- binder
duilib 入门基础十二 样式类
[untitled]
CloudCompare&PCL 点云裁剪(基于封闭曲面或多边形)
电子元器件销售ERP管理系统哪个比较好?
DEJA_VU3D - Cesium功能集 之 052-模拟卫星轨道(高空)效果
Super Jumping! Jumping! Jumping!
AVFrame内存管理api
Potential safety hazards in elderly care facilities
个人究竟如何开户炒股?在线开户安全么?
三体攻击(三维拆分加二分)
[reprint] STM32 GPIO type
Webrtc advantages and module splitting
FatMouse and Cheese
Discussion on the practice of fire emergency lighting system in the field of building electrical design
Fire fighting work and measures in Higher Vocational Colleges