当前位置:网站首页>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


边栏推荐
- [.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
- 第六届智能家居亚洲峰会暨精品展(Smart Home Asia 2022)将于10月在沪召开
- Tree
- 我想网上注册股票开户,如何操作?在线开户安全么?
- 【转载】STM32 GPIO类型
- Batch modify tables and sorting rules for fields in tables
- nuxt3入门
- The Falling Leaves
- A - 深海探险
- yaml json
猜你喜欢

【无标题】

Kubernetes notes and the latest k3s installation introduction

TCP

STL -- binder

【大案例】学成在线网站

爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!

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

Error: `brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead.

Which is a better ERP management system for electronic component sales?

如何抑制SiC MOSFET Crosstalk(串擾)?
随机推荐
Chrome devtools
A - Bi-shoe and Phi-shoe
temple
STL - inverter
A - deep sea exploration
【无标题】
Kali installation configuration
爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
Application of energy management system in iron and steel enterprises
What are the advantages of a differential probe over a conventional probe
Is it safe for CICC fortune to open an account? How much do you charge?
Discussion on the practice of fire emergency lighting system in the field of building electrical design
Application of current limiting protector in preventing electrical fire in shopping malls
[.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
Trailing Zeroes (II)
Power data
第六届智能家居亚洲峰会暨精品展(Smart Home Asia 2022)将于10月在沪召开
Comment supprimer le crosstalk SiC MOSFET?
How to suppress SiC MOSFET crosstalk?
[untitled]