The value of interface testing (why do interface testing)

table of Contents

First understand the technical architecture of the Internet:

The necessity of interface testing

Interface testing cannot replace UI testing


First understand the technical architecture of the Internet:

According to the end, it can be divided into two parts: mobile end and server end. The content of each is roughly as shown in the figure below.

The back end (server side) looks very simple, in fact, the back-end disassembly is very complicated, as shown below

 

There are probably more than 150 modules. If each module is fast, iterate once a week or two. If it is slow, iterate once a month or two. In general, it is updated every day, several times a day. In the face of such frequent and huge changes, the waterfall model of the traditional testing method is obviously unable to keep up, and new updates have been discovered before the test is completed.

Solution: Layered test thinking, divide the test into front-end and back-end, the front-end has test cases that focus on the front-end, and the back-end has test cases that focus on the back-end. Many back-end components are also disassembled for microservices. Each component has corresponding automated tests, including unit testing, module testing, cluster overall testing, and UI testing.

So the basic feature is layering and automation. With such a large cluster, it is impossible to complete the test without automation.

The necessity of interface testing

The author of pageobject drew a picture of the layered test as follows

It can be seen that the execution speed and quality return speed of the unit test further down will be faster and the cost will be lower.

The unit test belongs to the development category, the service test includes microservices and other tests, and the UI layer is the front-end test.

Interface testing cannot replace UI testing

Although interface testing has many advantages, it guarantees the quality of the back-end. It does not cover the quality assurance of the front-end. UI testing is still needed to ensure the quality of the front-end.

For example: if the price of a stock is only tested through the interface, it can be guaranteed that the returned price is correct, but if it rises, it should be displayed in red, and if it falls, it should be displayed in green. Whether the color is displayed correctly can only be tested by UI.

 

 

Guess you like

Origin blog.csdn.net/chuancheng_zeng/article/details/110296533