当前位置:网站首页>[dry goods | necessary skills for interface testing common interface protocol analysis]
[dry goods | necessary skills for interface testing common interface protocol analysis]
2022-06-22 19:32:00 【GLAB-Mary】
Transfer packets between services , Because of different application scenarios , Use different communication protocols for delivery . For example, website access , Often use HTTP Protocol delivery , File transfer usage FTP, Mail delivery use SMTP. The above three types of protocols are in the application layer of the network model . In addition to the common protocols of the application layer , For the transport layer TCP、UDP agreement , as well as Restful Architectural style 、RPC Basic network knowledge such as protocols should be understood and recognized .
Network protocol introduction
Before understanding the specific agreement , You need to know OSI Seven layer model 、TCP/IP Four layer model 、 Five layer architecture these three different network models .
Network protocol model comparison diagram :

OSI The reference model is a conceptual framework for developing standards for coordinating interprocess communication , It is not a standard .
TCP/IP The four layer model is the basic communication architecture of the Internet . It's often seen as a simplified seven level OSI Model .
The five layer agreement is OSI and TCP/IP The synthesis of , The practical application is still TCP/IP Four story structure of .
TCP/IP The protocol stack corresponds to TCP/IP The specific network protocol used in the four layer model
TCP agreement
TCP The protocol is in the transport layer , A connection oriented 、 reliable 、 Transport layer communication protocol based on byte stream .TCP The working mode of the protocol is that... Is required when establishing a connection “ Three handshakes ”, When terminating the connection, you need to “ Four waves ”.“ Three handshakes ” and “ Four waves ” yes TCP Important knowledge points of the agreement , In the following chapters, we will combine actual combat with theory , Introduce this important knowledge point in detail .
TCP Connection oriented protocol 、 Error retransmission 、 Congestion control and other characteristics , It is suitable for scenarios with high reliability , For example, data transmission involving user information .
UDP agreement
UDP Once the protocol sends the data sent by the application to the network layer , Do not keep data backups . It's only in IP Multiplexing and data verification fields are added to the header of the packet . therefore UDP Packets are often considered unreliable .
UDP There is no need to establish a connection in advance 、 Implement simple features , It is very suitable for scenes with high real-time performance , Like streaming media 、 Online games, etc .
HTTP agreement
HTTP Protocol is the most common protocol in interface testing , For distributed 、 Application layer protocols for collaborative and hypermedia information systems .HTTP Is the foundation of data communication in the world wide web . The client sends... To the server HTTP request , The server will return the requested data in the response . During the test , It is often necessary to verify the request and response results , So understand HTTP agreement , For interface testing , It's the top priority .
In the following chapters, we will introduce HTTP、HTTPS The difference between agreements , as well as HTTP Basic knowledge information of the agreement .
RESTful framework
origin
Roy Thomas Fielding Doctor Yu 2000 A style of World Wide Web software architecture proposed in his doctoral dissertation in . Its purpose is to facilitate different software to transmit information in the network .RESTful Is based on HTTP A resource request made on top of a protocol 、 The style of operation , To sum up in one sentence is to use URL To locate resources , Use HTTP Verb description operation .
HTTP The request method is RESTful api Typical applications in :
Be careful : Different companies are using RESTful There are some differences in architectural style .
RPC agreement
Currently commonly used in the industry RPC The main agreements are as follows :
Dubbo:
Java High performance based on RPC agreement
gRPC:
High performance general purpose RPC frame , be based on Protocol Buffers
PB It's a language neutral 、 Platform neutral data serialization framework .
Thrift:
And gRPC Similar multilingualism RPC frame .
These are the common interface protocol resolutions for the time being , If you have other knowledge points you want to know, you can also leave a message below ! Xiaobian tries to meet everyone's needs ~
边栏推荐
猜你喜欢

Shell编程规范与变量

20billion vs 5billion, how much is the "dehydration" little red book worth?

程序员工具大全【持续更新】

界面开发组件DevExpress ASP.NET Core v21.2 - UI组件增强

2022 t elevator repair recurrent training question bank and answers

Pull down refresh and pull up to load more listviews

数商云:数字化供应链系统搭建,赋能企业实现物流供应链的优化升级

Active Directory用户登录报告

C#,入门教程——关于函数参数ref的一点知识与源程序
![Programmer's tool encyclopedia [continuous update]](/img/7e/b7fbc030f4bbded3ee6188360d7d54.png)
Programmer's tool encyclopedia [continuous update]
随机推荐
贪心之区间问题(4)
小波变换db4进行四层分解及其信号重构—matlab分析及C语言实现
Shell script explanation (IV) -- while loop and until loop of loop statements (additional examples and analysis)
Play typical usage scenarios of kubernetes | dashboard for 5 minutes every day
shell脚本详解(十)——sed编辑器的使用方法
泡泡玛特:空洞的灵魂需要故事
In the first half of the year, there were 7 new unicorns in this field, and the capital scrambled to enter the market
贪心之区间问题(1)
shell脚本详解(四)——循环语句之while循环和until循环(附加例题及解析)
2022 operation of simulated examination platform for examination question bank of welder (elementary) special operation certificate
shell脚本详解(二)——条件测试、if语句和case分支语句
【建议收藏】消息队列常见的使用场景
shell脚本(五)——函数
Pull down refresh and pull up to load more listviews
Shell programming specification and variables
线程池:ThreadPoolExcutor源码阅读
同花顺容易开户么?手机开户安全么?
实验七 触发器
输入两个字符串,输出最长相同子串
2年狂赚178亿元,中国游戏正在“收割”老外