当前位置:网站首页>1000字精选 —— 接口测试基础
1000字精选 —— 接口测试基础
2022-07-06 16:26:00 【测试小娜】
一、接口测试本质
什么是接口?
硬件:USB、投影仪【用于数据传输的东西】
软件:接口统称API(application program interface)【鉴权码:token、key、appkey】
接口有内部接口和外部接口
内部接口:开发人员自己写的,对系统自身提供的
外部接口:系统调用外部的接口(像各大APP用微信支付,支付宝支付等)
总结:为什么需要接口
因为接口能让内部的数据被外部修改
比如:银行卡存款可以被支付接口进行调用,网上支付后,余额有变化
为什么要做接口测试
- 系统大都是前后端分离,若是开发进度不同,可以对先开发好的接口进行测试。一般会用到mock服务,模仿前端或后端的响应
- 安全方面,前端的验证可能被绕过。需要注重安全的,比如金融交易,身份证信息等
- 测试左移,测试尽早介入
接口交互的过程
以微信对银行卡的操作为例

二、接口返回数据
1.一般都是三组数据
error_code:错误码,0代表成功,开发自定义
msg:对错误的中文说明
data:真正返回的数据
Json详解
由2中数据类型组成:键值对,数组
Json在线编辑器 https://www.bejson.com
2.html格式
<html>
<title></title>
<body>
<error_code>0</error_code>
...
</body>3.xml格式
<?xml?version="1.0"encoding="utf-8">
<error_code>0</error_code>
...
</xml>三、接口测试协议
1.webservice协议(不常用):
基于http的soap协议传输数据
webservice=soap=http+xml,webservice协议就是http+xml组成的,其中xml中会用到wsdl,wsdl是描述语言xml中的一种格式。
接口地址:http//...?wsdl
Restful是一种接口规范,而不是接口协议,restful接口规范中也会用到http协议。
- get- 获取数据
- post- 提交数据
- put- 修改数据
- delete- 删除数据
2.dubbo协议
接口地址:dubbo://......
适用于少量数据的传输,能承受大的并发
3.接口地址:http://
http超文本传输协议,主要用于浏览器和服务器之间数据传输
HTTPS=http+ssl(安全传输协议)


最后感谢每一个认真阅读我文章的人,看着粉丝一路的上涨和关注,礼尚往来总是要有的,虽然不是什么很值钱的东西,如果你用得到的话可以直接拿走

这些资料,对于做【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴我走过了最艰难的路程,希望也能帮助到你!凡事要趁早,特别是技术行业,一定要提升技术功底。希望对大家有所帮助…….
如果你不想再体验一次自学时找不到资料,没人解答问题,坚持几天便放弃的感受的话,可以加入下方我的qq群大家一起讨论交流,里面也有各种软件测试资料和技术交流。
边栏推荐
- js导入excel&导出excel
- 资产安全问题或制约加密行业发展 风控+合规成为平台破局关键
- ArrayExpress数据库里的细胞只有两个txt是不是只能根据Line到ENA下载测序跑矩阵?
- Should the jar package of MySQL CDC be placed in different places in the Flink running mode?
- Koa2 addition, deletion, modification and query of JSON array
- Unity color palette | color palette | stepless color change function
- matplotlib画柱状图并添加数值到图中
- DevOps可以帮助减少技术债务的十种方式
- koa2对Json数组增删改查
- Let me ask you if there are any documents or cases of flynk SQL generation jobs. I know that flynk cli can create tables and specify items
猜你喜欢

Talking about the current malpractice and future development

The best sister won the big factory offer of 8 test posts at one go, which made me very proud

Gold three silver four, don't change jobs

【精品】pinia 基于插件pinia-plugin-persist的 持久化

DAY FOUR

AI金榜题名时,MLPerf榜单的份量究竟有多重?

亚朵三顾 IPO

After 3 years of testing bytecan software, I was ruthlessly dismissed in February, trying to wake up my brother who was paddling

Asset security issues or constraints on the development of the encryption industry, risk control + compliance has become the key to breaking the platform
![[unmanned aerial vehicle] multi unmanned cooperative task allocation program platform, including Matlab code](/img/4c/5d867437aac5faa299817e187602e1.png)
[unmanned aerial vehicle] multi unmanned cooperative task allocation program platform, including Matlab code
随机推荐
pinia 模块划分
PostgreSQL使用Pgpool-II实现读写分离+负载均衡
Scholar doctor hahaha
[system analyst's road] Chapter 7 double disk system design (service-oriented development method)
Gold three silver four, don't change jobs
内网穿透zerotier 外网(手机、电脑等)访问内网设备(树莓派、NAS、电脑等)
Unity 颜色板|调色板|无级变色功能
Automatic test tool katalon (WEB) test operation instructions
三句话简要介绍子网掩码
【212】php发送post请求有哪三种方法
Cas d'essai fonctionnel universel de l'application
Local deployment Zeppelin 0.10.1
英国都在试行4天工作制了,为什么BAT还对996上瘾?
The intranet penetrates the zerotier extranet (mobile phone, computer, etc.) to access intranet devices (raspberry pie, NAS, computer, etc.)
11 preparations for Web3 and Decentralization for traditional enterprises
Per capita Swiss number series, Swiss number 4 generation JS reverse analysis
MySQL implementation of field segmentation from one line to multiple lines of example code
JS addition, deletion, modification and query of JSON array
电脑重装系统u盘文件被隐藏要怎么找出来
Let me ask you if there are any documents or cases of flynk SQL generation jobs. I know that flynk cli can create tables and specify items