当前位置:网站首页>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群大家一起讨论交流,里面也有各种软件测试资料和技术交流。
边栏推荐
- Interface joint debugging test script optimization v4.0
- Oracle中使用包FY_Recover_Data.pck来恢复truncate误操作的表
- 零代码高回报,如何用40套模板,能满足工作中95%的报表需求
- 【OFDM通信】基于深度学习的OFDM系统信号检测附matlab代码
- 氢创未来 产业加速 | 2022氢能专精特新创业大赛报名通道开启!
- The same job has two sources, and the same link has different database accounts. Why is the database list found in the second link the first account
- 快手的新生意,还得靠辛巴吆喝?
- Hydrogen future industry accelerates | the registration channel of 2022 hydrogen energy specialty special new entrepreneurship competition is opened!
- Should the jar package of MySQL CDC be placed in different places in the Flink running mode?
- Zero code and high return. How to use 40 sets of templates to meet 95% of the reporting needs in the work
猜你喜欢

The problem of ASP reading Oracle Database

Résumé des connaissances de gradle

STM32通过串口进入和唤醒停止模式

The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance

app通用功能測試用例

Please help xampp to do sqlilab is a black

内网穿透zerotier 外网(手机、电脑等)访问内网设备(树莓派、NAS、电脑等)
![[communication] optimal power allocation in the uplink of two-layer wireless femtocell network with matlab code](/img/47/741b89d94a2b0003937f32bdedfa19.png)
[communication] optimal power allocation in the uplink of two-layer wireless femtocell network with matlab code

The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly

Wu Enda 2022 machine learning course evaluation is coming!
随机推荐
Daily question brushing record (XV)
There are only two TXT cells in the ArrayExpress database. Can you only download the sequencing run matrix from line to ENA?
STM32 enters and wakes up the stop mode through the serial port
[unmanned aerial vehicle] multi unmanned cooperative task allocation program platform, including Matlab code
Who said that new consumer brands collapsed? Someone behind me won
Résumé des connaissances de gradle
【OFDM通信】基于深度学习的OFDM系统信号检测附matlab代码
达晨史上最大单笔投资,今天IPO了
快讯 l Huobi Ventures与Genesis公链深入接洽中
ArrayExpress数据库里的细胞只有两个txt是不是只能根据Line到ENA下载测序跑矩阵?
Wasserstein Slim GAIN with Gradient Penalty(WSGAIN-GP)介绍及代码实现——基于生成对抗网络的缺失数据填补
How does crmeb mall system help marketing?
Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN
零代码高回报,如何用40套模板,能满足工作中95%的报表需求
【精品】pinia 基于插件pinia-plugin-persist的 持久化
flinksql select id ,count(*) from a group by id .
基础图表解读“东方甄选”爆火出圈数据
【无人机】多无人协同任务分配程序平台含Matlab代码
吴恩达2022机器学习课程评测来了!
The programmer refused the offer because of low salary, HR became angry and netizens exploded