当前位置:网站首页>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
边栏推荐
猜你喜欢

the loss outweighs the gain! Doctors cheated 2.1 million yuan and masters cheated 30000 yuan of talent subsidies, all of which were sentenced!

【欧米读书会】谈谈元宇宙中的创作者经济:无限次元

Application of machine vision in service robot

【集训Day2】cinema ticket

【集训Day2】Sculpture

图解用户登录验证流程,写得太好了!

就这一次!详细聊聊分布式系统的那些技术方案

6-19 vulnerability exploitation -nsf to obtain the target password file

重磅!《2022中国开源发展蓝皮书》正式发布

我们被一个 kong 的性能 bug 折腾了一个通宵
随机推荐
国际象棋机器人夹断7岁男孩手指,原因是「棋手违反安全规则」?
注意 公安部发出旅游客运交通安全预警
2019 popularization group summary
Leetcode:1206. design jump table [jump table board]
Familiarize you with the "phone book" of cloud network: DNS
Overview of the agenda of the keynote speech of apachecon Asia, an international celebrity vs a local open source star
Is it really safe and reliable to exempt five in case of opening an account in a stock company
URL跳转漏洞
Heavy announcement! Icml2022 Awards: 15 outstanding papers, selected by Fudan University, Xiamen University and Shanghai Jiaotong University
浅谈数据技术人员的成长之路
【欧米读书会】谈谈元宇宙中的创作者经济:无限次元
[template] segment tree 1
大家下午好,请教一个问题:如何从保存点启动一个之前以SQL提交的作业?问题描述:用SQL在cl
Cloud rendering volume cloud [theoretical basis and implementation scheme]
【虚拟机数据恢复】意外断电导致XenServer虚拟机不可用,虚拟磁盘文件丢失的数据恢复案例
二层管理型交换机如何设置IP
JS closure simulates private variable interview questions and immediately executes function Iife
What are the popular technologies in 2022?
ACL实验演示(Huawei路由器设备配置)
6-19 vulnerability exploitation -nsf to obtain the target password file