当前位置:网站首页>Analysis of interface testing
Analysis of interface testing
2022-07-26 17:47:00 【51CTO】
Interface testing is a type of testing , Another test method , It is part of testing in many fields , At the same time, it can be executed in different ways ;
A functional test
Functional testing is what we often call black box testing , The traditional black box test is to verify whether the developed product meets the product requirements specification , And the interface is actually part of the product requirements ;
for example :
Product needs : The client enters a word , Click button , That is, show the news related to this word in time ;
Function realization : The client spelled the words entered by the user into http request , Send to the server interface , The interface finds the news about this word , And it is spliced into json, Reply to the client , Clients are displayed in order .
In this case , Central demand ≈ Interface functions
Security testing
I often hear that security testing is also part of interface testing to a large extent , Because the interface is equivalent to the bridge between the internal server and the outside , If there are no guards on the bridge , Then anyone can access the internal server , The guard mentioned here is actually the security verification of the interface ;
Take a rotten example :
Interface functions : Receive the words entered by the user , Go to the database to query the explanation of this word ;
This involves spelling the words entered by the user into sql The process of , Interfaces need more than just splicing sql And implement , More importantly, filter the abnormal string entered by the user ;

automated testing
The traditional sense of automation is that the client automatically executes the black box through the framework case The process of , But interface testing can also be automated , Take a look at the following example :
Test requirements : The server receives various words input from the client 、 The sentence 、 Symbol 、 Words and other information , Query and judge the type of input 、 Interpretative sentence 、 Or judge that this is an illegal query , The client returns according to the json Display the results .
This requirement requires a lot of input case, For example, various phrases 、 character 、 Full angle 、 Half angle 、 Space 、 traditional Chinese character 、 Simplified Chinese character 、 Korean 、 Japanese and so on , But these case There are some common checkpoints , such as : The return value is json Format , There must be a type field 、 Is it legal bool value 、 If it is legal, explain the contents of the sentence ; So this demand , We can validate requirements through automation ; We just need to write the input case Just fine ;
Performance testing
Generally speaking , Performance test refers to the performance test of the server interface , This is also an important concern about whether the demand can be launched normally .
The most important interface performance test here is the following two parts :
1、 The maximum pressure that the server can bear ;
2、 Stability under normal load ;
unit testing
The reason is simple , The server interface is also code , There are also different modules 、 class 、 function , Single test can be used to ensure the functional correctness of the underlying functions of the server interface code , for example : analysis json Function of 、 Functions that handle request parameters 、 Connect db Functions and so on ;
For more information on testing techniques, please pay attention to : Shenzhen duosurveyor software and Technical Service Co., Ltd
边栏推荐
- 我们被一个 kong 的性能 bug 折腾了一个通宵
- The diagram of user login verification process is well written!
- 浅析接口测试
- Pytorch中的tensor操作
- JS recursive Fibonacci sequence deep cloning
- Asemi rectifier bridge kbpc3510, kbpc3510 package, kbpc3510 application
- Week 16 OJ practice 1 calculates the day of the year
- ASEMI整流桥KBPC2510,KBPC2510参数,KBPC2510规格书
- the loss outweighs the gain! Doctors cheated 2.1 million yuan and masters cheated 30000 yuan of talent subsidies, all of which were sentenced!
- Open source kaggle cat and dog data set -- used in classic CNN classification practice
猜你喜欢
![Leetcode:1206. design jump table [jump table board]](/img/4f/2b6df8e2151b8bce70c8227c69d8bc.png)
Leetcode:1206. design jump table [jump table board]

A detailed explanation of throughput, QPS, TPS, concurrency and other high concurrency indicators
2.1.2 synchronization always fails

JS 函数作用域 变量声明提升 作用域链 不加var的变量,是全局变量

6-19漏洞利用-nsf获取目标密码文件

kudu设计-tablet
![[template] segment tree 1](/img/60/9f73d00223c8878ffd8513b3b9adf7.jpg)
[template] segment tree 1

AI遮天传 DL-回归与分类

ACL experiment demonstration (Huawei router device configuration)

JS recursive Fibonacci sequence deep cloning
随机推荐
图扑 3D 可视化国风设计 | 科技与文化碰撞炫酷”火花“
ACL实验演示(Huawei路由器设备配置)
树形dp问题
AI遮天传 DL-多层感知机
点击劫持攻击
How to use align regexp to align userscript meta information
国际大咖 VS 本土开源新星 | ApacheCon Asia 主题演讲议程全览
2.1.2 synchronization always fails
The latest interface of Taobao / tmall keyword search
JS 闭包 模拟私有变量 面试题 立即执行函数IIFE
GAN (Generative Adversarial Network,GAN)生成式对抗网络
What is a test case? How to design?
After vs code is formatted, the function name will be automatically followed by a space
SQL注入(思维导图)
Establishment of Eureka registration center Eureka server
kaggle猫狗数据集开源——用于经典CNN分类实战
URL跳转漏洞
机器视觉在服务机器人中的应用
硬件开发与市场产业
就这一次!详细聊聊分布式系统的那些技术方案