当前位置:网站首页>Postman interface test practice, these five questions you must know
Postman interface test practice, these five questions you must know
2022-07-02 19:57:00 【Xiaowu knock code】
In our daily testing work , Interface testing is very common , Whatever test you do , function 、 Automation or performance testing , Will be more or less exposed to the interface .
Recently, many people have come to ask me : How to test the interface test ? What are the interface test tools ?
Let me help you analyze them one by one :
1、 What is an interface ?
It can be simply understood as an open entrance for connection , For example, the continuity between the front end and the back end requires interfaces , The interface is also required for the link between the mobile terminal and the background . Connect the front end, back end and mobile end .
2、 What are the types of interfaces ?
There are generally two types of interfaces :
1. Program internal interface
2. External interface of the system
External interface of the system : For example, you need to get resources or information from other websites or servers , No one else will share the database with you , He can only give you a way they've written to get the data , You can use the method he wrote by referring to the interface provided by him , In order to achieve the purpose of data sharing .
Program internal interface : Between methods , Interaction between modules , The interface thrown inside the program , such as bbs System , There are login modules 、 Post module and so on , If you want to post, you have to log in first , Then the two modules have to interact , It will throw out an interface , For internal system call .
3、 Classification of interfaces
1.webservice Interface
2.http api Interface
webService The interface is to go soap Agreement passed http transmission , Both request message and return message are xml Format , We use the tools to call when testing , test .
http api The interface is to go http agreement , Differentiate called methods by path , The request message is key-value Formal , The return message is usually json strand , Yes get and post Other methods , This is also the two most commonly used request methods .
json Is a generic data type , All languages know it
4、 What is interface testing ?
Interface test is a test to test the interface between system components . The interface test is mainly used to detect the interaction points between the external system and the system as well as between the internal subsystems . The focus of the test is the exchange of data , Transfer and control the management process , And the mutual logical dependency between systems , This requires a certain understanding of business logic , Better positioning of data flow .
5、 How to do interface testing ?
During the test , Many scenarios require testers to test an interface , Different test schemes are designed for different types of interfaces , At this time, if there is a powerful interface testing tool , Just finish the tedious work quickly , Greatly improve work efficiency . There are many tools like :postman、jmeter、soupUI、java+httpclient、robotframework+httplibrary etc. .
It can also be realized by interface automation , It's code implementation , The framework and UI Automation is almost , Send request to judge by assertion .
Now let me introduce you to an interface test artifact ——Postman, I hope it can help friends who want to learn interface testing !
What is? postman?
Postman Is an interface testing tool developed by Google , Can send any type of http request , Support GET/PUT/POST/DELETE Other methods .
Postman It's very easy to use , You can fill in URL,header,body Wait, you can send a request , For testing api The interface is very convenient . I used to only support chrome The plug-in now has a separate application .
choice Postman Why ?
Final decision to use postman Conduct interface test , This tool is relatively simple to use at present , But there are still many , as follows :
1、 It is convenient to switch different environments for interface testing , Without modifying variables or code
2、 You can use only plug-ins directly in the browser ( At present, the Google system plug-in has not been updated )
3、 You can talk to newman and jenkins Integration for automated build , It's more convenient
Postman How to do interface testing ?
postman Very powerful , It's easy to use , Say below postman How to test the interface :
1. download postman plug-in unit :
①Chrome Plug in installation address ( To climb over a wall ):https://chrome.google.com/webstore/detail/postman-rest-client-packa/fhbjgbiflinjbdggehcddcbncdddomop?hl=en
② Install and download locally https://www.getpostman.com/apps, After downloading, click next to install
2.chrome Browser settings - More tools - Found... In the extender postman plug-in unit , find postman, Click the start button , open postman
3.postman Page details
4.postman Simple implementation post request
a. Fill in url
b.body Zhongtianxia parameter name and parameter value
d. Check whether the returned result data is consistent with expectations
Do interface automation testing , Can only use Postman、Jmeter These interface testing tools , Is not enough . The core is to learn the whole process of interface testing , framework design , And the most important interface design thinking mode , It's not a problem to encounter any interface problems in the future .
Finally, thank everyone who reads my article carefully , The following online link is also a very comprehensive one that I spent a few days sorting out , I hope it can also help you in need !
These materials , For those who want to change careers 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful ……
If you don't want to grow up alone , Unable to find the information of the system , The problem is not helped , If you insist on giving up after a few days , You can click the small card at the bottom of the text to join our group , We can discuss and exchange , There will be various software testing materials and technical exchanges .
Click the small card at the end of the document to receive it |
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
Self study recommendation B Stop video :
Zero basis transition software testing :38 God ! Self taught software testing , Got the byte test post offer, Is the B The best video station !
Advanced automation testing :2022 Most suitable for self-study python Automated test tutorial , Spend it yourself 16800 Bought , Now share for free !
边栏推荐
- 自動生成VGG圖像注釋文件
- Overview of browser caching mechanism
- From 20s to 500ms, I used these three methods
- at编译环境搭建-win
- Codeworks round 802 (Div. 2) pure supplementary questions
- R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线(indifference curve)
- Motivation! Big Liangshan boy a remporté le prix Zhibo! Un article de remerciement pour les internautes qui pleurent
- 在消费互联网时代,诞生了为数不多的头部平台的话
- Py's interpret: a detailed introduction to interpret, installation, and case application
- CRM Customer Relationship Management System
猜你喜欢
Istio deployment: quickly start microservices,
Kt148a voice chip instructions, hardware, protocols, common problems, and reference codes
Exemple complet d'enregistrement du modèle pytoch + enregistrement du modèle pytoch seuls les paramètres d'entraînement sont - ils enregistrés? Oui (+ Solution)
Why do I have a passion for process?
字典
高并发下如何避免产生重复数据?
Py之interpret:interpret的简介、安装、案例应用之详细攻略
c语言链表--待补充
编写完10万行代码,我发了篇长文吐槽Rust
SQLite 3.39.0 发布,支持右外连接和全外连接
随机推荐
Attack and defense world PWN question: Echo
Kt148a voice chip instructions, hardware, protocols, common problems, and reference codes
MySQL function
八年测开经验,面试28K公司后,吐血整理出高频面试题和答案
CS5268完美代替AG9321MCQ Typec多合一扩展坞方案
What is the Bluetooth chip ble, how to select it, and what is the path of subsequent technology development
良心总结!Jupyter Notebook 从小白到高手,保姆教程来了!
GCC: Graph Contrastive Coding for Graph Neural NetworkPre-Training
Introduction to program ape (XII) -- data storage
pytorch 模型保存的完整例子+pytorch 模型保存只保存可訓練參數嗎?是(+解决方案)
AcWing 1129. Heat wave solution (shortest path SPFA)
How to avoid duplicate data in gaobingfa?
Py之interpret:interpret的简介、安装、案例应用之详细攻略
PXE installation "recommended collection"
KT148A语音芯片ic的软件参考代码C语言,一线串口
[daily question] 241 Design priorities for operational expressions
数据库模式笔记 --- 如何在开发中选择合适的数据库+关系型数据库是谁发明的?
AcWing 1128. Messenger solution (shortest path Floyd)
CRM客户关系管理系统
pytorch 模型保存的完整例子+pytorch 模型保存只保存可训练参数吗?是(+解决方案)