当前位置:网站首页>接口测试流程
接口测试流程
2022-06-28 20:58:00 【炫酷的腿毛!】
接口测试流程
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-V2LeBNEo-1656216105368)(接口测试-第01天-课堂笔记.assets/image-20210707160900090.png)]](/img/12/ca49e96f33e150f6cb38794d14ca4b.png)
- 分析需求,产生需求文档(产品)。
- (开发产生接口文档)解析接口文档。
- 产生 接口测试用例(送审)。
- 执行 测试用例
- 工具:postman、jmeter、fidller
- 代码:python + Requests +UnitTest
- 提交、跟踪缺陷。
- 生成 测试报告。
- (可选)接口自动化持续集成!
接口文档
什么是接口文档
- **由开发人员编写,描述接口信息的文档。**开发团队按接口文档进行开发工作,并要一直维护遵守。
作用
- 能够让前端开发与后台开发人员更好的配合,提高工作效率。(有一个统一参考的文件)
- 项目迭代或者项目人员更迭时,方便后期人员查看和维护
- 方便测试人员进行接口测试
展现形式
- word 文档形式
- Excel 表格式形式
- pdf 文档形式。
结构
- 基本信息:
- 资源路径 (协议和域名在 “系统信息”中)
- 请求方法
- 接口描述
- 请求参数:
- 请求头:
- Content-Type。描述请求体的数据类型!
- 请求体:
- 实现该接口使用的 数据及对应类型。
- 请求头:
- 返回数据:
- 状态码 200
- 错误码(自定义状态码)
- 码值
- 描述信息。
接口文档解析
- 接口文档的解析本质:从接口文档中,找出 http 请求所需要的 数据信息。
- 主要包含:请求方法、URL 、请求头、请求体、响应状态码、描述。
- 以 “登录” 为例:
- 请求方法:POST
- URL:http://ihrm-test.itheima.net/api/sys/login
- 请求头:Content-Type :application/json
- 请求体:{“mobile”:”13800000002”, “password”:”123456”}
- 响应状态码:200
- 错误码:
- 10000:操作成功!
- 20001:用户名或密码错误
- 99999:抱歉,系统繁忙,请稍后重试!
- 错误码:


边栏推荐
猜你喜欢

RT-Thread线程同步与线程通信
![[learning notes] Introduction to principal component analysis](/img/24/a760d1cd095a967ef258b623eb465c.png)
[learning notes] Introduction to principal component analysis

Visualization of neural network structure in different frames

Figure neural network can also be used as CV backbone model. Huawei Noah Vig architecture is comparable to CNN and transformer
How to recover after Oracle delete accidentally deletes table data

【毕业季·进击的技术er】努力只能及格,拼命才能优秀!

API 网关 Apache APISIX 助力雪球双活架构演进

On the complexity of software development and the way to improve its efficiency

Automatic operation and maintenance platform based on Apache APIs

题解 Pie(POJ3122)超详细易懂的二分入门
随机推荐
RT thread thread synchronization and thread communication
Resilience4j retry source code analysis and retry index collection
Is the inter-bank certificate of deposit reliable and safe
基于 Apache APISIX 的自动化运维平台
With a market value of $120billion, how did intuit, an old tax giant, do it?
Ehcache配置资料,方便自己查
题解 Andy s First Dictionary(UVa10815)紫书P112set的应用
LeetCode每日一题——剑指 Offer II 091. 粉刷房子
Leetcode daily question - 710 Random numbers in the blacklist
How to do a good job in customer's successful bottom design | tob Master Course
Is it safe for CICC fortune to open an account? Let's talk about CICC fortune
【学习笔记】聚类分析
视频号如何下载视频?来看超简单方法!
Comparisonchain file name sort
【Try to Hack】Cobalt Strike(一)
iterator中的next()为什么要强转?
ThreadLocal principle
Apisik helps Middle East social software realize localized deployment
算力时代怎么「算」?「算网融合」先发优势很重要!
如何添加 logs来debug ANR 问题