1

1. What is an interface An interface is a standard of invoking or connecting capability provided by an internal module to a module and an external system to other services, just like a usb interface, which is a kind of physical data transmission provided by the system to the outside world. An interface, of course, only an interface cannot be transmitted. We also need to set and define how this interface is transmitted. The so-called interface is developed as a connection between modules, and the interface in the eyes of the test is a protocol (a definition of the function of the interface)

2. How to perform interface testing
1. Use tools for interface testing

Such as: apipost , jmeter and other tools for interface testing.

apipost is an interface testing tool, mainly for interface verification and interface document generation. apipost, an interface testing tool, is a very lightweight interface verification tool. You can directly request access to the interface by entering the request method, url, and parameters to verify whether the interface is open. You can also check the returned response value to check whether the interface development is normal. According to the verification information of these interfaces, online documents and offline versions of word documents can be generated directly. It is a great tool for interface testing and interface documentation generation. Unlike the interface documentation generated by swagger, it is not very convenient to read in English. apipost also has collaborative work, which can effectively implement front-end interface debugging.

image.png

Jmeter can perform interface testing and performance testing, but for simple interface testing, jmeter is not easy to use without apipost. jmeter focuses on stress testing, stability testing and load testing. An interface test tool designed for the stability of interfaces and programs, with software performance as the main interface test and supplemented by interface testing.

image.png

2. Script for interface testing

Generally used python+requests for interface testing. The principle of implementing an interface is the same as that of an interface testing tool. Or interface testing via url, parameters and request method.

Call requests and json, because parameters are generally passed in json format.

image.png

These are the two main ways of implementing interface testing. Tools are much simpler to use than interface testing through scripts. All those who are beginners in interface testing are advised to use testing tools such as apipost for interface testing.

Tool download address: Apipost-based on collaboration, not limited to API documentation, debugging, and Mock tools

Original link: http://t.csdn.cn/ZLBnf


玩足球的煎饼
42 声望159 粉丝