What is an interface?

Interface test is mainly used for the interaction points between the external system and the system as well as between the internal subsystems, define specific interaction points, and then through these interaction points, through some special rules that is protocol, to carry out data interaction.

Two, common interface mode:

1. WebService interface: it is transmitted through HTTP through SOAP protocol. The request message and return message are in XML format. The tools available include APIPost, Jmeter, loadRunner, etc.

2. HTTP API interface: It uses THE HTTP protocol to distinguish the called methods through the path. The request packets are in the form of key-value, and the return packets are usually JSON strings, including GET and

Post and so on, which are the two most common requests. The tools available include APIPost, Jmeter, loadRunner, etc.

Front end and back end

Front end: Website is front end to a static page of a web page design, popular, is something that we are going to the naked eye can see, when we are browsing the site can see the content of the page are almost all belong to the front, the front work is the web page, the static page is no backend components, front-end mainly include HTML and CSS and js some style and layout, etc.

Back end: the back end of the website is the technology of dynamic website, such as some registration login and some pop-ups on the website, these are the logic of the back end, the common back-end language is PHP, JSP and so on, the back end database also contains MySPL and so on, are to store data on the back end.

4. Concept of interface test

Interface test is a test to test the indirect interface of a system component. Interface testing is mainly used to detect the interaction points between external systems and internal subsystems. The focus of the test is to check the data exchange, transfer and control management process, as well as the mutual logical dependence between systems, etc. (generally speaking, check whether the business logic meets the business needs, verify whether the fields are normal and whether your actual results meet the expectations)

V. Composition of the interface:

A. Interface description

B. Call the URL

C, request methods (get, post, put, etc.)

D. Request parameters, parameter types, and request parameter description

E. Return parameter description

6. Why and the target of interface testing

Interface is actually used for interaction between app and front end, so many people ask, why do the function test also need to test the interface, what is the target is not redundant? First of all, let me tell you this is wrong

So here’s an example:

For example, a login interface, such as the product specified a user name of 6-10 characters numeric underscore, but the backend does not make a judgment. But our business people test definitely verifies, but only the front end does the verification, the back end forgets this small requirement at all. The consequence is that if a person knows how to grab a packet and tamper with your interface, then bypass validation and log in via SQL injection. If this is an order business, do you cause a lot of loss to the company

So here comes the interface test target:

1. It is possible to find bugs that the client did not find (also called hidden bugs)

2. Early exposure of risks (ensure normal quality on-line)

3. If the interface is stable, change the front end

4. The most important check system security, stability

7. How to perform interface testing

1. Use interface test tools for testing, interface test and interface document generation tool APIPOST, interface test and performance test tool JMeter

2. Description of the interface status code

For example :200(success)/300 (redirect somewhere else)/ 400 (request syntax error)/ 500(server exception)

Test points:

A. Use case design (design use cases according to business logic, log in 5 times, log in 2 minutes later to delete the car concerned, one data is missing from the list)

B. Parameter combination (passing in different values)

C. Interface security (bypass authentication/bypass authentication/whether parameters are encrypted, etc.)

D. Exception verification (input exception parameter boundary value)

Apipost: www.apipost.cn jmeter: jmeter.apache.org/