当前位置:网站首页>接口测试关键技术
接口测试关键技术
2022-07-31 02:56:00 【CrissChan】
接口测试也就是API测试,从名字上可以知道是面向接口的测试活动。所以在讲API测试之前,我们应该说清楚接口是什么,那么接口就是有特定输入和特定输出的一套逻辑处理单元,而对于接口调用方来说,不用知道自身的内部实现逻辑,这也是接口的黑盒处理逻辑。从而也就揭示了接口的本质:接口即契约,这个契约是指接口提供方和接口调用方约定好的一种约定。它遵循这样一种形式:在开发前期会约定接口接收什么数据以及返回什么数据,在开发完成后接口提供方实现了原本约定。这也就出现了一个丞待解决,如何验证接口提供方是否遵了契约的约定,为了解决该问题,接口测试就出现了。接口测试是通过模拟接口调用方的行为,依据上述契约要求,并兼顾其它质量特性,对接口提供方提供的接口进行质量验证的活动。

在分层测试模型中,包含了单元测试、接口测试以及界面测试(也叫UI测试),在行业里最先提出的如图1所示的金字塔模型是最早的分层测试模型,也是第一次按照测试投入和收益综合设计的模型。
在金字塔模型中,界面测试、自动化接口测试和单元测试,每一个阶段所占面积的大小,代表了它们在测试过程中的投入和工作量占比。因此我们可以看出,金字塔模型中单元测试占据了绝大部分的比重,也就说明了我们应该在单元测试投入更多的精力和时间,已达到更大的收益。但是在实践过程中,有些团队单元测试覆盖度还不高,为了弥补单元测试的不足,测试工程师不断地加大在接口测试的投入,将接口测试逐渐划分成单接口测试和业务接口测试,其中:
● 单接口测试不断地扩大检测范
边栏推荐
- LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING
- 经典链表OJ强训题——快慢双指针高效解法
- Classic linked list OJ strong training problem - fast and slow double pointer efficient solution
- Draw Your Cards
- Draw Your Cards
- 10、Redis实现点赞(Set)和获取总点赞数
- SQL 面试用题(重点)
- Intranet Infiltration - Privilege Escalation
- golang GUI for nuxui — HelloWorld
- 2022牛客多校联赛第四场 题解
猜你喜欢
随机推荐
Mycat's master-slave relationship, vertical sub-database, horizontal sub-table, and detailed configuration of mycat fragmented table query (mysql5.7 series)
The whole process scheduling, MySQL and Sqoop
Layer 2 broadcast storm (cause + judgment + solution)
如何搭建私有yum源
Intranet Infiltration - Privilege Escalation
华为分布式存储FusionStorage知识点总结【面试篇】
Chapter 9 SVM实践
Installation of mysql5.7.37 under CentOS7 [perfect solution]
mycat的主从关系 垂直分库 水平分表 以及mycat分片联表查询的配置详解(mysql5.7系列)
STM32CUBEMX开发GD32F303(11)----ADC在DMA模式下扫描多个通道
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
全流程调度——MySQL与Sqoop
Brute Force/Adjacency List Breadth First Directed Weighted Graph Undirected Weighted Graph
完整复制虚拟机原理(云计算)
f.grid_sample
Classic linked list OJ strong training problem - fast and slow double pointer efficient solution
多线程下类对象的服务承诺探讨
To write good test cases, you must first learn test design
SQL注入 Less46(order by后的注入+rand()布尔盲注)
8、统一处理异常(控制器通知@ControllerAdvice全局配置类、@ExceptionHandler统一处理异常)



![LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING](/img/56/fcc8ee6f592abf0a374fc950a3362f.png)





