当前位置:网站首页>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群大家一起讨论交流,里面也有各种软件测试资料和技术交流。
边栏推荐
- [communication] optimal power allocation in the uplink of two-layer wireless femtocell network with matlab code
- JDBC programming of MySQL database
- js對JSON數組的增删改查
- Per capita Swiss number series, Swiss number 4 generation JS reverse analysis
- If the request URL contains jsessionid, the solution
- Every year, 200 billion yuan is invested in the chip field, and "China chip" venture capital is booming
- Matplotlib draws a histogram and adds values to the graph
- 基于SSM框架实现的房屋租赁管理系统
- Basic chart interpretation of "Oriental selection" hot out of circle data
- 11 preparations for Web3 and Decentralization for traditional enterprises
猜你喜欢

Interface joint debugging test script optimization v4.0

STM32通过串口进入和唤醒停止模式
MySQL implementation of field segmentation from one line to multiple lines of example code

MVC and MVVM

Daily question brushing record (XV)

Wu Enda 2022 machine learning course evaluation is coming!

MATLIB从excel表中读取数据并画出函数图像

Newsletter L Huobi ventures is in-depth contact with genesis public chain

The method of reinstalling win10 system is as simple as that

Zero code and high return. How to use 40 sets of templates to meet 95% of the reporting needs in the work
随机推荐
MATLIB从excel表中读取数据并画出函数图像
There are only two TXT cells in the ArrayExpress database. Can you only download the sequencing run matrix from line to ENA?
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
Example code of MySQL split string as query condition
The tutorial of computer reinstallation win10 system is simple and easy to understand. It can be reinstalled directly without U disk
Design of short chain
Please help xampp to do sqlilab is a black
DevOps可以帮助减少技术债务的十种方式
[system analyst's road] Chapter 7 double disk system design (service-oriented development method)
MATLIB reads data from excel table and draws function image
基于jsp+servlet+mysql框架的旅游管理系统【源码+数据库+报告】
Laravel8 uses passport authentication to log in and generate a token
Do you still have to rely on Simba to shout for a new business that is Kwai?
How does crmeb mall system help marketing?
Hydrogen future industry accelerates | the registration channel of 2022 hydrogen energy specialty special new entrepreneurship competition is opened!
Without CD, I'll teach you a trick to restore the factory settings of win10 system
openresty ngx_lua子请求
The intranet penetrates the zerotier extranet (mobile phone, computer, etc.) to access intranet devices (raspberry pie, NAS, computer, etc.)
快讯 l Huobi Ventures与Genesis公链深入接洽中
app通用功能測試用例