当前位置:网站首页>「接口測試入門課」打卡學習 day03:理解接口測試的關鍵邏輯
「接口測試入門課」打卡學習 day03:理解接口測試的關鍵邏輯
2022-07-20 05:48:00 【大田測試錄】
1、明確被測系統
2、開始接口測試
在開始業務邏輯接口測試之前,你要先通過接口測試的方法,測試每一個接口都是正確的,既要保證單接口的正確性,也要保證接口的業務邏輯正確性,這裏所說的“正確”指的是“正確接受合法 Request 入參,正確拒絕非法 Request 入參”。
3、單接口測試(更接近單元測試)
單接口測試的重點,其實就是保證該接口的正確性和健壯性,也就是說,你既要保證這個接口可以按照需求,正確處理傳入的參數,給出正確的返回;也可以按照需求,正確的拒絕傳入非正確的參數,給出正確的拒絕性返回。
接口測試在單接口測試的設計思維上也更加貼近於代碼的單元測試,但它還是站在 Client 端的角度來完成測試;
4、業務流程接口測試(更接近於界面交互)
在接口測試中,我們通過單個接口測試完成了全部异常狀態的覆蓋;而在業務流程中,我們更需要關心業務流和數據流的關系,並不需要再過度關心如何用業務流的方法覆蓋更多的代碼邏輯异常,這也是分層測試中為什麼在單元測試和界面測試之間要加入一層接口測試的主要原因之一。
接口測試的業務邏輯測試更加靠近手工業務測試,但卻更加聚焦於業務邏輯本身,不再將一些非法業務异常放到該部分進行測試。
總結接口測試思維:
先從單個接口的測試開始,保障單個接口的正確性和健壯性,然後通過單個接口的測試完成多個接口的業務邏輯串聯,站在業務邏輯的角度完成業務邏輯的正確性檢測。
備注:接口測試脚本,賦能給持續集成平臺,思路
這裏我們要借助 Newman 這款工具,它就是 shell 下的 Postman,我們將 Postman 的業務邏輯接口測試脚本導出後,push 到本地的 Git 倉庫中,持續集成平臺就可以通過 pull 對應的接口測試脚本,然後通過 Newman 執行,這樣就可以完成持續集
學習筆記,侵删
边栏推荐
- Intelligent cockpit fighting method of Internet manufacturers
- 自动化测试:Robot FrameWork框架99%的人都想知道的实用干货技巧!
- 毕业季&收获季,留下你的美好时刻
- 广发证券 手机开户安全吗,有什么门槛
- Single machine high concurrency model design
- js数据类型获取
- Is it safe for GF Securities to open a mobile account? What is the threshold
- The line chart can show the data trend and filter the data at the same time
- Arkui framework progress indicator
- day03_3_流程控制练习题
猜你喜欢
Intelligent cockpit fighting method of Internet manufacturers
基于ABP实现DDD--仓储实践
TCP实验验证
An improved one millisecond mobile backbone paper notes
MBR3045CT肖特基二极管,MBR10100,MBR2060CT二极管参数
Use pixcap and readyplayrme to quickly animate 3D models
在线XML转JSON工具
A translation JS reverse, call stack simple usage
数据分析基础
硬核Fiddler抓包工具大型攻略(一)Fiddler基礎篇
随机推荐
Party documentation. Most API. Based on this Aage, shengteng
[OC study notes]gcd review
安全研究人员发现针对工业运营商的恶意软件
JS regular expression, matching the contents in parentheses (excluding parentheses)
互联网大厂智能座舱斗法
Note -「数论 定理及结论整合」
关于extern声明&定义
[software testing] how to learn mobile terminal testing? Super detailed app testing strategy
printf的计算和输出顺序
[programming questions] [scratch Level 2] 2020.12 forest party
Online random coin tossing positive and negative statistical tool
Data link layer packaging technology, GRE and experiment (ENSP)
Summary and Prospect of aut, the transport layer protocol of sound network -- dev for dev column
selenium基础+环境配置
互联网大厂智能座舱斗法
Normalestimation normal vector estimation theory and code -- PCL source code Notes
廣發證券 手機開戶安全嗎,有什麼門檻
Landing DDD (7) - some misunderstandings in tactical design
Interface testing -- custom assertion settings
FinalShell的介绍和使用