Comparison of the use of interface tools (apipost, jmeter, postman, swagger, etc.)

1. What are the types of interfaces?

Interfaces are generally divided into two types: 1. The internal interface of the program 2. The external interface of the system

System external interface: For example, if you want to obtain resources or information from other websites or servers, others will definitely not share the database with you. He can only provide you with a method written by them to obtain data, and you can quote him. The interface can use the method he wrote to achieve the purpose of data sharing.

Interfaces within the program: between methods and methods, between modules and modules, interfaces thrown within the program, such as bbs system, there are login modules, posting modules, etc., then you must log in first if you want to post, then this Two modules must interact, and it will throw an interface for the internal system to call.

Classification of interfaces: 1.webservice interface 2.http api interface

The webService interface is transmitted through http through the soap protocol. The request message and the return message are both in xml format. When we are testing, we can use tools to call and test.

The http api interface uses the http protocol to distinguish the calling methods by path. The request messages are all in the form of key-value, and the return messages are generally json strings. There are methods such as get and post, which are also the two most commonly used. Request method.

json is a universal data type, and all languages ​​recognize it. (The essence of json is a string, it has nothing to do with other languages, but it can be converted into data types in other languages ​​after a little processing, for example, it can be converted into a dictionary in Python, key-value form, and it can be converted into native JavaScript. Objects can be converted into class objects in java, etc.)

2. Interface-front end, back end and test

The front-end uses the interface: the Ajax design is carried out through the interface document given by the back-end personnel, the request is sent to the service through the interface, the response data is obtained, and the next page jump and display are performed through the returned data.

Back-end generation interface: By writing the interface, it provides a channel for the front-end to interact with the server and data requests. Write the corresponding interface, the parameters that need to be passed, parameter types, and so on. Then generate the interface document, share it with the front end, and let it write the corresponding Ajax according to the interface document.

Test and verify the interface: You can verify the interface through the interface document to check whether the interface developed on the back-end corresponds to the Ajax written in the front-end, and whether there is an error interface. You can also pass the interface process test to know whether the interface between the entire system is Correspondingly, is there any interface that is wrong, or is not operating normally.

3. Interface tools for front-end, back-end and testing

Front end: generally use postman, apipost or jmeter for interface verification and view response values

Backend: Multi-use interface document generation tools and test tools such as swagger, apipost, postman, etc.

Test: Jmeter, apipost and postman can perform verification tests on the interface.

4. Introduction to jmeter, postman, apipost, swagger tools

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

Comparison of the use of interface tools (apipost, jmeter, postman, swagger, etc.)
Postman is a plug-in for interface testing developed by Google, and it also has a client. After Google is disabled in China, the postman plug-in is not easy to download and use. The postman interface testing tool is a very light interface verification tool. It can directly request access to the interface by entering the request method, url, and parameters to verify whether the interface is open, and you can also view the returned response value to see whether the interface development is normal. But because it was developed by Google, it only supports the English version. It is especially uncomfortable for people with poor English.
Comparison of the use of interface tools (apipost, jmeter, postman, swagger, etc.)
Apipost is an interface testing tool, mainly for interface verification and interface document generation. The interface testing tool apipost is a very light interface verification tool. It 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 view the returned response value to see whether the interface development is normal. According to these interface verification information, online documents and offline word documents can be directly generated. It is a great tool for interface testing and interface document generation. Unlike swagger, the interface documents generated by swagger are all in English and it is not easy to read. Apipost also has collaborative work, which can effectively implement front-end interface joint debugging.
Comparison of the use of interface tools (apipost, jmeter, postman, swagger, etc.)
swagger is a tool for generating documents through an interface for back-end developers. A tool to generate interface documentation mainly through comments in the code, but the generated interface documentation is in English.

Comparison of the use of interface tools (apipost, jmeter, postman, swagger, etc.)
jmeter:https://jmeter.apache.org/

apiposthttps://www.apipost.cn/?dt=20201030

swagger:https://swagger.io/

Guess you like

Origin blog.51cto.com/12246704/2545289