Now many companies have to do interface testing requirements, then many of the partners who have been doing functional testing are more unprepared, so they need to learn interface testing, today I will explain the knowledge of interface testing.

First, the meaning of interface test

1. What is interface testing?

Interface test is a test of indirect interface of system components. Interface test is mainly used to detect the interaction points between external systems and systems as well as between internal subsystems. The focus of the test is to check the exchange of data, transfer and control management process, as well as mutual logical dependence between systems.

2. So why do interface tests?

(1) Take Taobao.com as an example. In the continuous development of Taobao.com, functional testing and performance testing first appeared, followed by automated testing. However, with the development of testing technology, taobao.com’s architecture is no longer the traditional MVC structure. The whole system architecture is developing towards the direction of distribution, business centralization and high availability. The current system architecture of Taobao.com is complicated and complicated, with a variety of interfaces between the systems. Traditional functional testing, performance testing and automated testing have been unable to meet the needs of system development. At this time, there is an urgent need for a more effective and practical and continuous testing method to ensure the quality of the entire system architecture.

(2) the interface test is under this need arises at the historic moment, first of all, as the system complexity rising, the traditional test methods to test cost has increased dramatically, the test efficiency and sharply (data model, at the bottom of a bug can cause upper around eight bugs, and at the bottom of the bug is easy to cause the entire network is down; Conversely, interface testing can provide a cost-effective solution to increasing system complexity.

(3) Secondly, interface test is different from the traditional development of unit test. Interface test is a comprehensive and efficient continuous testing of system interfaces from the perspective of users.

(4) Finally, interface testing is automated and continuously integrated, which is why interface testing can be cost-effective.

(5) In a word, interface testing is the best solution driven by the inherent requirements of ensuring the quality of highly complex systems and the economic benefits of low cost. Interface testing is a complete system, including functional testing and performance testing

3) Scope of application of interface test

(1) Interface test is generally applied to the interactive development between multiple systems, or the test of application system development with multiple subsystems. Interface test applies to the underlying framework system and the central service system that provide services for other systems, mainly testing the interfaces provided by these systems to the outside to verify their correctness and stability. Interface testing also applies to service layer interfaces in an upper-level system, and the higher the level, the more difficult the testing becomes. The application of interface testing in Taobao is a bottom-up development process.

(2) The implementation of interface test in the framework of multi-system and multi-platform has an extremely efficient cost-benefit ratio. Interface testing inherently brings efficient defect detection and quality monitoring capabilities to highly complex platforms. The more complex the platform and the larger the system, the more effective it is to do interface testing.

Second, the purpose of interface test

1. Strategic guidelines for interface testing

(1) The core strategy of interface test is to ensure the correctness and stability of the system as the core, to improve the test efficiency, improve user experience, and reduce the cost of product research and development by means of continuous integration.

(2) Core: Guarantee the stability of the system of quality management goal is to ensure that the correct system and stable, interface testing as part of the software quality management is to ensure that the correct system and stable, more accurate assurance system correct and stable from the server, a server system, the closer it gets to the bottom, the greater the effect of the system, it may even be inescapably, A defect on the server side may cause several or even a dozen defects on the client side, and what is more terrible is that the defect on the server side may cause the crash of the whole system, which will cause inestimable losses on the whole system. Therefore, the quality of the server side interface will directly affect the correctness and stability of the system.

(3) Means: What continuous integration is a continuous integration as the means, the key is to continue to build in “”,” business “, “integration” and “document system”, we need to keep the code under test to build integration, we need to use the business of thinking to consider the rationality of the interface definition, we need to think from the Angle of performance, security, and the correctness of the code, We also need to screen the correctness of data transmission between interfaces from the perspective of integration, and we need to determine our testing scope, that is, what we should measure and what we should not measure.

(3) Purpose: Improve test efficiency, improve the user experience, decrease the cost of product research and development, the interface test to escort for the writing of the code, strengthen the confidence of developers and testers, let hidden BUG exposed in advance, to let the developers to fix the BUG in the first time, to make function test and performance test personnel at the time of test is more convenient, To minimize the number of low-level bugs, to make the product development process more agile, to shorten the product development cycle, finally after the launch of the product, to let users use more smoothly, but also to let users feel that the product service zero defect.

(4) In addition, in this strategic process, we need several types of resources as support, the following is a brief description. First of all, the most important point in this strategy is to emphasize the importance of the team, especially on the team needs to have reasonable human resource configuration, in the team, need to perfect, also need specialist, need technical experts, also needs to business experts, need both efficient executive, also need effective managers, anyone can play an important role in the team.

(5) Secondly, full attention should be paid to the importance of documents, including requirements documents, development technical scheme, testing technical scheme, test case documents and so on. Improving these documents can greatly reduce the obstacles of cooperation between each team in the software engineering cycle, and also reduce the cost of software maintenance in the later stage.

(6) Therefore, implementing the strategy of interface testing can improve the stability of software quality to the greatest extent.

2. Development and objectives of each stage of interface testing

Briefly describe the stages an interface test team has gone through from inception to growth, and what we hope to become in the future.

(1) Exploration stage: a new team will generally go through a long-term exploration process at the beginning of establishment, during which we will try different technologies, frameworks and process specifications. The goal of this stage is achieved until a solution is found that is suitable for the characteristics of the team in these aspects.

(2) Stable improvement stage: after the exploration stage, a stable improvement stage should be entered. After the exploration stage, the team’s technology, framework and process specifications should have a basic finalize. At this time, the team’s goal is to constantly optimize these finalized things through different project practices, and finally summarize a set of optimal solutions. This solution should serve as a reference, or even a standard, for other project testing activities. At this time, we will find that all the projects are orderly, unified, efficient and reliable.

(3) Expand influence and organize win-win stage: is reaching the above goal the end of the interface test team? Obviously not, and don’t forget that no matter how well you’ve done interface testing so far, it’s only interface testing itself, and we shouldn’t be satisfied with that. Generally speaking, the interface test team is the core technical staff of the entire quality assurance team. They are good at solving problems with various technologies, even better than the development team. With so many technological resources, if we do not know how to use them properly, it is really a great waste. On the basis of interface testing itself, we should also actively understand what problems other test teams face, whether these problems can be solved by technical means, and if so, whether we can implement some practical tools for them to help them solve problems or improve work efficiency; Do we need to share our own technology with other test teams, or even the entire software team, to help them do their jobs better? In short, we should consider how to make more effective and reasonable use of the resources of the interface test team to improve the performance of the whole test team, which will not only expand the influence of the interface test team itself, but also make the interface test team become the core competitiveness of the whole department, and it can create a win-win situation.

(4) on the other hand, in the work on the process of role can be complementary, each test interface test design, test cases can be Shared with the function and performance test, interface test report can be used as important reference function test, and let them understand the underlying experienced which tests, where is the bug concentration areas, where some relative safety. After the functional test engineer finds a bug, the interface test engineer can directly override the code that generated the bug so that the bug never occurs again. Interface testers can also directly bypass the page to test the performance and pressure of the underlying system. The close cooperation between various roles in the testing process also reduces the cost of testing and provides all-round quality assurance of the system.

Tools for interface testing

Interface testing tools: APIPost, Jmeter

Apipost is a domestic tool for interface testing and interface document generation

Jmeter is a great tool for performance testing, especially for stress testing