当前位置:网站首页>The most complete postman interface test tutorial in the whole network, API interface test
The most complete postman interface test tutorial in the whole network, API interface test
2022-07-03 16:52:00 【Baili said test】
One 、 Why do interface tests ?
Because the work progress of different ends is different , Therefore, it is necessary to test the interface that comes out .
The benefits of doing interface testing :
1、 Saving time , Reduce project costs
2、 Improve work efficiency
3、 Improve the robustness of the system
Two 、 Necessity and significance of interface test
Interface testing is born to bring efficient defect detection and quality supervision capabilities to highly complex platforms , The more complex the platform , The bigger the system , The more effective the interface test is .
in general , Interface testing is the best solution to ensure the quality of high complexity systems and low-cost economic benefits , It is mainly reflected in the following three aspects :
1、 Save testing costs
2、 Interface test is a comprehensive, efficient and continuous test of system interface from the perspective of users .
3、 When the complexity and volume of the system are larger , The lower the cost of interface testing , Corresponding , The higher the benefit output .
3、 ... and 、 Why choose Postman Do interface tests ?
Now ,Postman More developers than 1000 ten thousand ( From official website ), Choose to use Postman For the following reasons :
1、 Simple and easy to use - To use Postman, You just need to log in to your account , As long as you install Postman Applications , You can easily access files anytime, anywhere .
2、 Use set - Postman Allow users to create for their API Call to create a collection . Each collection can create subfolders and multiple requests . This helps to organize the test structure .
3、 Multiplayer collaboration - You can import or export collections and environments , So as to facilitate the sharing of files . Using links directly can also be used to share collections .
4、 Create an environment - Creating multiple environments helps reduce test duplication (DEV/QA/STG/UAT/PROD), Because you can use the same set for different environments . This is where parameterization occurs , It will be introduced later .
5、 Create the test - Test checkpoints ( Such as verification HTTP Whether the response status is successful ) Can be added to each API in call , This helps ensure test coverage .
6、 automated testing - By using sets Runner or Newman, You can run tests in multiple iterations , Saves time for repeated testing .
7、 debugging - Postman The console helps to check the retrieved data , So it is easy to debug and test .
8、 Continuous integration - Through its ability to support continuous integration , Can maintain development practices .
Four 、 How to use Postman?
The picture below is Postman Working range of , The functions of some modules are introduced as follows :
New | Create a new request here 、 Set or environment ; You can also create more advanced documents 、Mock Server and Monitor as well as API. |
Import | This is used to import collections or environments . There are some options , For example, from a file , Folder import , Link or paste the original text . |
Runner | Can pass Collection Runner Perform automated tests . Follow up . |
Open New | Open a new label ,Postman Window or Runner window . |
My Workspace | You can create new workspaces individually or as a team . |
Invite | By inviting team members to work together in the workspace . |
History | History of all requests , This makes it easy to track what you do . |
Collections | Organize your test suite by creating collections . Each collection may have subfolders and multiple requests . Requests or folders can also be copied . |
Request tab | This will display the title of the request you are processing . By default, for requests without a title “Untitled Request”. |
HTTP Request | Clicking it will display a drop-down list of different requests , for example GET, POST, COPY, DELETE, |
Request URL | Also known as endpoint , Show API Of URL. |
Save | If changes are made to the request , You must click save, So that new changes are not lost or overwritten . |
Params | Here you will write the parameters required for the request , such as Key - Value. |
Authorization | In order to visit api, Appropriate authorization is required . It can be Username、Password、Token The form such as . |
Headers | Request header information |
Body | Request body information , Generally in POST Will be used in |
Pre-request Script | Request before Execute the script first , Use the pre request script for setting up the environment to ensure that the test runs in the correct environment . |
Tests | These scripts are executed during the request . Testing is very important , Because it sets checkpoints to verify that the response state is normal 、 Whether the retrieved data meets the expectations and other tests . |
Settings | The latest version has settings , Not usually used . |
postman Follow up use and technical points can see another article of mine :
边栏推荐
- BYD and great wall hybrid market "get together" again
- 2022爱分析· 国央企数字化厂商全景报告
- Central South University | through exploration and understanding: find interpretable features with deep reinforcement learning
- CC2530 common registers for ADC single channel conversion
- To resist 7-Zip, list "three sins"? Netizen: "is the third key?"
- Shentong express expects an annual loss of nearly 1billion
- Mysql database -dql
- How to judge the region of an IP through C?
- One article takes you to understand machine learning
- Learn from me about the enterprise flutter project: simplified framework demo reference
猜你喜欢
Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
消息队列消息丢失和消息重复发送的处理策略
What material is sa537cl2? Analysis of mechanical properties of American standard container plate
Fast Ethernet and Gigabit Ethernet: what's the difference?
Explore Netease's large-scale automated testing solutions see here see here
Recommendation of good books on learning QT programming
MySQL Basics
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
随机推荐
arduino-esp32:LVGL项目(一)整体框架
How programming apes grow rapidly
Golang decorator mode and its use in NSQ
建立自己的网站(23)
[JDBC] API parsing
CC2530 common registers for ADC single channel conversion
智慧之道(知行合一)
Kindeditor editor upload image ultra wide automatic compression -php code
比亚迪、长城混动市场再“聚首”
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
[combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
[combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
word 退格键删除不了选中文本,只能按delete
NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
Zebras are recognized as dogs, and Stanford found the reason why AI made mistakes
Is it safe to open a stock account by mobile registration? Does it need money to open an account
PHP secondary domain name session sharing scheme
How to delete a specific line from a text file using the SED command?
美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
Atom QT 16_ audiorecorder