I. what is an interface?
Interface testing is mainly used to define specific interaction points between external systems and systems as well as between internal subsystems, and then through these interaction points, through a number of special rules, that is, protocols, to interact between data.
Two. What types of interfaces are there?
Interfaces are generally divided into two categories:
1.Internal interface of program
2.System external interface
System external interface: for example, if you want to get resources or information from other websites or servers, others will not share the database with you, he can only give you a way they write to get data, you can quote the interface he provides to use his method, so as to achieve the purpose of data sharing.
The interface inside the program: between methods and methods, between modules and modules, the interface thrown out inside the program, such as BBS system, login module, post module and so on, so you have to login to post, then the two modules have to interact, it will throw an interface for the internal system to carry outCall.
Interface classification:
1.webserviceInterface
2.http apiInterface
webServiceInterface is transmitted by soap protocol through http, request message and return message are in XML format, we can call through the tool when testing, testing.
http apiInterface is to take the HTTP protocol, through the path to distinguish the call method, request packets are in the form of key-value, return packets are generally JSON string, get and post and other methods, which are the two most commonly used request methods.
jsonIt is a universal data type, and all languages recognize it. (json is essentially a string, it has nothing to do with other languages, but can be converted to other language data types with a little bit of processing, such as a dictionary in Python, in the form of key-value, butTo convert native objects in JavaScript to class objects in Java, etc.
Three. What is the nature of the interface and its working principles?
Interface you can simply understand that it is the URL, the working principle will say that the URL through the get or post request like the server to send something, and then get some corresponding return value, the essence of data transmission and reception.
Four. What is interface testing?
Interface testing is a test for testing the interfaces between components of a system. Interface testing is mainly used to detect the interaction points between external systems and systems as well as between internal subsystems. The key point of the test is to check the data exchange, transfer and control the management process, as well as the logical dependencies between the systems.
–Baidu Encyclopedia
The short answer is to transfer the data we want to transmit through URLs like servers or other modules and see if they return what we expect.
Five. What do you want to do interface test?
①.The lower the bottom layer, the lower the cost of repairing bug.
②.The front end is changed randomly, the interface is measured well, the rear end does not need to change, the front and rear ends are developed by the two operators.
③.Check the security and stability of the system, the front-end parameters can not be trusted, such as Jingdong shopping, the front-end price can not pass – 1 yuan, but through the interface can pass – 1 yuan. (measured boundary value)
④.Nowadays, the complexity of the system is increasing, the cost of traditional testing methods is increasing dramatically and the efficiency of testing is decreasing dramatically. Interface testing can provide a solution in this situation.
⑤. Interface testing is relatively easy to achieve automated continuous integration, and relatively stable UI automation, can reduce manual regression testing labor costs and time, shorten the testing cycle, support the backend of the rapid release requirements. Continuous integration of interfaces is the root cause of low cost and high returns.
⑥. Now many systems are separated from the front end architecture, from the security level:
(1)、Restrictions on the front end alone are no longer sufficient to meet the security requirements of the system (it’s too easy to bypass the front end) and require the same control on the back end, which in this case requires verification at the interface level.
(2)、Whether the front-end and back-end transmission, log printing and other information is encrypted transmission also needs to be verified, especially involving the user’s privacy information, such as identity cards, bank cards and so on.
Six, what does the backend interface test measure?