当前位置:网站首页>What does interface testing test?

What does interface testing test?

2022-07-08 00:52:00 InfoQ

One .  What is interface testing ? Why do interface tests ?

Interface test is a test to test the interface between system components . The interface test is mainly used to detect the interaction points between the external system and the system as well as between the internal subsystems . The focus of the test is to check the exchange of data , Transfer and control the management process , And the mutual logical dependence between systems .
Because of the increasing complexity of today's systems , The cost of traditional test method increases sharply and the efficiency of test decreases greatly , So we have to do interface testing . meanwhile , Interface testing is relatively easy to automate continuous integration , And relative UI Automation is also relatively stable , It can reduce the labor cost and time of manual regression test , Shorten the test cycle , Support the demand of fast back-end publishing . Interface continuous integration is the source of low cost and high benefit . Nowadays, many front and back architectures of systems are separated , In terms of security , Only relying on the front end to restrict can not meet the security requirements of the system ( It's too easy to get around the front ),  The back end is also needed to control , In this case, it needs to be verified from the interface level . Front and rear transmission 、 Whether the information such as log printing is encrypted transmission also needs to be verified , Especially when it comes to users' privacy information , Such as ID card , Bank cards, etc .

Two 、 Interface test case design

The use case design of interface test is the key , You can't just pass the normal request, even if the interface has been tested , From business 、 function 、 Design use cases based on performance . I refer to the information on the Internet and some of my own experience , The figure below is a general design idea
null

3、 ... and 、 How to do interface test ?

In general , Because before and after our project calls are mainly based on http Interface to protocol , So when testing the interface, it is mainly through tools or code simulation http Sending and receiving requests . Here we introduce the domestic interface
Testing tools apipost
How to use
send out HTTP request
API Interface function layout
null
API Request parameters
Header  Parameters
You can set or import  Header  Parameters ,cookie Also in the Header Set it up
null
Query  Parameters
Query  Support construction URL Parameters , Support at the same time  RESTful  Of  PATH  Parameters ( Such as :id)
null
Body  Parameters
Body  There are three types  form-data / x-www-form-urlencoded / raw , Each type offers three different UI Interface

1) When you need to submit a form , Switch to  x-www-form-urlencoded

null

2) When you need to submit a form with documents , Switch to  form-data

null

3) When you need to send JSON Object or other objects , Switch to the corresponding raw The type is enough

null
API  Request and response
Click the send button , If there is data returned , The returned data... Will be displayed , response time , Response code ,Cookie etc. .
null
Be careful : The default returned data is Pretty Pattern , Easy to view  JSON XML  Format . You can switch   Native   or   preview   Pattern   See other types .
return Headers
null
Official download and installation
ApiPost
Download address :
https://console.apipost.cn/register?utm_source=10007




原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/189/202207072225464351.html