Interface testing - the meaning of interface testing

1. The significance of interface testing (advantages)

(1) Find problems earlier:

Many test materials emphasize that testing should be involved in project development earlier, because the earlier bugs are found, the lower the cost of repairing.

However, functional testing must wait until the system provides a testable interface to test the system.

Interface testing can test the system before the functional interface is developed.

System interface is the basis of upper-layer functions, and interface testing can discover and solve problems earlier and at a lower cost.

However, in the actual development process, developers do not have enough time to write unit tests, and they often have enough confidence in the code they write, and they are unwilling to "waste" time on writing unit tests.

At this time, the role of interface testing will become more important.

(2) Shorten the product development cycle:

For the product development cycle, if all the testing work is concentrated in the functional testing phase, then the testing problem and repair cycle will become longer.

Because testing can be involved in product development earlier, the number of bugs in the functional testing phase can be effectively controlled, thereby effectively shortening the product development cycle.

(3) Discover lower-level problems:

Some underlying logic of the system is not easily triggered in UI functional testing, so there may be problems with these logics. Interface testing can test these underlying logic more easily and more comprehensively.

(4) Check the exception handling capability of the server:

We usually refer to the front-end verification as weak verification, because it is easy to be bypassed. At this time, it is difficult to find some security problems if we only test at the functional level.

Interface tests that do not use functions as the entry point can easily verify these abnormal conditions.

  1. For example, the order interface does not allow repeated submissions.

  2. Some interfaces also need to consider performance issues.

  3. For example, if there are multiple products in the shopping cart, check all of them and pay, and the product inventory will be judged. Can the submission be successful at this time, and what is the processing logic?

  4. Security testing:

    The server provides an API, the caller of the interface is on the client, and the communication between them is exposed on the public network. If an unscrupulous user captures a packet to obtain the payment interface, and buys a product worth 100 yuan at a price of 1 yuan, it is very dangerous. This is one aspect of security testing.

    SQL injection etc. also fall into this category.

2. Comparison between UI test and interface test

(1) UI test features:

Generally, the biggest feature of Internet companies is that they are fast, and products need to be iterated continuously, and the iteration time is basically about 15 days.

The advantage of UI automation testing is that it can actually simulate the behavior of real users and directly verify the commercial value of the software. The disadvantage is that the maintenance and execution of use cases are expensive.

In addition, the stability of UI automation testing is an important reason that has hindered the development of UI testing for a long time.

In the case of rapid iteration (such as constantly updating the active interface), the page changes may be very frequent, and the UI automation test itself is based on page elements, and a small change in the front end may require a very large change in the test.

So the summary is as follows:

  1. Web applications and APP iteration speed is very fast.

  2. Pages are updated frequently.

  3. The costs of testing outweigh the benefits.

  4. It can be delivered to a third party for testing (cloud testing, public testing).

(2) Interface test features:

For the background test of the server, once the interface rules are determined, the later changes are very small.

Compared with UIs that change frequently, interface testing is more cost-effective.

This has become the key test object in the enterprise. We all know that user data, business data, transaction data, etc. are stored in the server. If there is a problem with any interface implementation, it will affect all users.

It is precisely because server-side data and business logic are related to the lifeblood of the enterprise, so few enterprises submit the interface to third-party testing.

As testers, what we need to verify is the correctness and integrity of data transfer between interfaces.


END meager strength

Finally, I would like to thank everyone who has read my article carefully. Looking at the fans’ growth and attention all the way, there is always a need for reciprocity. Although it is not a very valuable thing, you can take it away if you need it:

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey, and I hope it can help you too!

加入我的软件测试交流群:110685036免费获取~(同行大佬一起学术交流,每晚都有大佬直播分享技术知识点)

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

method of obtaining:

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/130620701