当前位置:网站首页>什么是接口?什么是接口测试?
什么是接口?什么是接口测试?
2022-06-28 20:58:00 【炫酷的腿毛!】
接口
概念
- 接口就是:系统与系统之间,组件与组件之间,数据传递交互的通道。

接口的类型
按协议划分:http、tcp、IP
按语言划分:C++、java、php 。。。
按范围划分:
系统之间:
- 多个内部系统之间
- 内部系统与外部系统之间

程序之间:
方法与方法之间,函数与函数之间,模块与模块之间
# 接口 def eat(something): print(f'小鸟在吃{ something}') # 使用接口,传递数据 def bird(): eat('苹果') bird()
接口测试
概念
- 接口测试就是,对系统或组件之间的接口进行测试。校验传递的数据正确性和逻辑依赖关系的正确性!
原理
接口测试,主要针对的测试目标 —— 服务器
怎么测?
- 模拟客户端,向服务器发送请求。
用什么测?
- 工具:fiddler、postman、jmter
- 代码:python + UnitTest框架 + Requests框架
测什么?
- 测试 服务器针对客户端请求,回发的响应数据是否与预期结果一致!
- 人眼对比
- 断言
- 测试 服务器针对客户端请求,回发的响应数据是否与预期结果一致!
特点
- 符合质量控制前移的理念
- 可以发现一些页面操作发现不了的问题
- 接口测试低成本高效益
- 接口测试是从用户的角度对系统进行检测
实现方式
- 工具:JMeter、Postman、fiddler
- 代码:Python + Requests + UnitTest
什么是自动化接口测试?
- 借助工具、代码,模拟客户端发送请求给服务器,借助断言自动判断 预期结果和实际结果 是否一致!
边栏推荐
- SaaS sales upgrade under the new situation | tob Master Course
- Which is the most reliable and safe for a securities company to open an account
- [learning notes] factor analysis
- Visualization of neural network structure in different frames
- Résumé de la stabilité
- Ehcache配置资料,方便自己查
- The blocks problem (uva101) Purple Book p110vector application
- Ehcache configuration data, convenient for self checking
- ANR无响应介绍
- Understanding of incomplete types
猜你喜欢

基于 Apache APISIX 的自动化运维平台

Analysis of variance

应用实践 | 10 亿数据秒级关联,货拉拉基于 Apache Doris 的 OLAP 体系演进(附 PPT 下载)

CNN-LSTM的flatten

Ehcache配置资料,方便自己查

Apisik helps Middle East social software realize localized deployment

Pyechart drawing multiple Y-axis line graphs

RT-Thread线程同步与线程通信

Win 10 create a gin framework project

Data standardization processing
随机推荐
with torch.no_grad():的使用原因
新形势下的SaaS销售升级|ToB大师课
数据资产为王,如何解析企业数字化转型与数据资产管理的关系?
Is it safe to open a dig money account? Is it reliable?
Learn Tai Chi maker mqtt Chapter 2 (VIII) esp8266 mqtt user password authentication
Leetcode daily question - 515 Find the maximum value in each tree row
题解 Pie(POJ3122)超详细易懂的二分入门
请允许当下国内ToB的「不完美」
Anr no response introduction
rapid ssl通配符证书八百一年是正版吗
软件watchdog和ANR触发memory dump讲解
3. 整合 Listener
实型数运算
Stability summary
RT-Thread线程同步与线程通信
Pyechart drawing multiple Y-axis line graphs
Input and output real data
ThreadLocal原理
如何使用 DataAnt 监控 Apache APISIX
Leetcode daily question - 710 Random numbers in the blacklist