当前位置:网站首页>Analysis of interface testing
Analysis of interface testing
2022-07-26 19:47:00 【Multi surveyor 111】
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
边栏推荐
- [PHP] use file_ get_ Contents() sends get and post requests
- 工作13年后,个人的一点软件测试经历及感想……
- 测试面试题集-UI自动化测试
- Do you know the difference between safety test, functional test and penetration test?
- 亲力亲为的思考
- 线性代数第4章线性方程组
- 手机app测试用例怎么写?手机app测试点有哪些?
- Turn off win10 automatic update completely
- CONDA transfer project virtual environment essential skills +pip speed download too slow solution
- Pyqt5 rapid development and practice 3.6 packaging resource files
猜你喜欢
随机推荐
浅析接口测试
UIAutomator2常用类之UiObject2
NLP learning path
企业数字化转型成大趋势,选对在线协作工具很重要
Deeply analyze the execution process of worker threads in the thread pool through the source code
cuda11.2对应pytorch安装
Spatiotemporal prediction 4-graph WaveNet
调整数组顺序使奇数位于偶数前面且相对位置不变
Configure the server environment
ipad下载的文件在哪里可以找到
博客维护记录之图片预览嵌入位置问题
Implementing DDD based on ABP -- domain logic and application logic
J3: redis master-slave replication
上半年住户存款增加10.33万亿元,平均每天约571亿存款涌向银行
canvas 图形
[skim] two point answer solution
论文精读:YOLOV2——YOLO9000:Better, Faster, Stronger
Conda+pytorch environment tutorial
数据库设计三大范式
Is qiniu a channel for securities companies? Is it safe to open an account?









