当前位置:网站首页>技术分享 | 接口测试价值与体系
技术分享 | 接口测试价值与体系
2022-07-28 05:28:00 【叶赫那拉 赫敏】
如果把测试简单分为两类,那么就是客户端测试和服务端测试。移动端的测试包括 UI 测试,兼容性测试等,服务端测试包括接口测试。接口测试检查数据的交换、传递和控制管理过程。它绕过了客户端,直接对服务端进行测试。

接口测试的价值
服务端非常复杂,就像下图的阿里核心链路图,包含大约 150 个组件,组件与组件之间进行交互,形成了密集的后端网络。UI 测试无法覆盖这么复杂的组件交互网络,所以要绕过客户端,直接使用接口测试对服务端进行测试。

接口测试的体系
对行业的各种测试进行分层,越往上,发现 bug 的时间越晚,成本越高。接口测试(Service)相比 UI 测试,可以更早发现问题,更快的质量反馈;同理,单元测试(Unit)相比接口测试,可以更早发现问题,更快的质量反馈,花费的成本更低。
分层测试:

客户端测试与服务端测试的关系
虽然接口测试覆盖面广,但是也不能使用接口测试替代客户端测试。UI 测试涉及到了用户体验的问题,这部分是无法用接口测试进行替代的。
边栏推荐
- Using C language to realize three piece chess games
- 代码整洁之道(一)
- OJ 1089 Spring Festival travel
- OJ 1045 reverse and add
- About the collation of shader keyword
- [queue, simple application of stack ---- packaging machine]
- [the beginning of self redemption]
- Dynamic planning -- multi-step stair climbing (advanced version of stair climbing)
- @Postconstruct annotations and useful examples
- Dynamic memory management function of C language
猜你喜欢
随机推荐
Analysis of the semaphore source code of AQS
New Selenium
浅谈Cookie和Session
Question brushing record -- binary tree
OSI七层模型
Ready to start blogging
[basic knowledge of binary tree]
[dynamic planning -- the best period for buying and selling stocks Series 2]
Code neatness (2)
About the collation of shader keyword
archery数据库审核平台部署
OJ 1284 记数问题
@Postconstruct annotations and useful examples
Graphic pipeline foundation (I)
Code tidiness (I)
mongoDB快速入门
PKU-2524-Ubiquitous Religions(并查集模板)
Explain in detail
SSAO By Computer Shader(一)
mysql-8.0.17-winx64(附加navicat)手动配置版安装
![[pta-- use queues to solve the problem of monkeys choosing kings]](/img/54/94359fb3557ac07f7786ecf61a5409.png)





![[untitled]](/img/54/660667e528729cc87796d972dc0b17.png)

