Interface testing is what? has no meaning?

Copyright: the original is not easy, is not permitted without the author's freely reprint! Due to limited personal ability and effort, it is inevitable omissions and inadequacies, please correct me, thank you ~ https://blog.csdn.net/lijing742180/article/details/90789932


For testers, master interface testing capability has basically become a standard, but for beginners, looking at the terms on the Internet a lot to explain tall, always considered interface testing is a very deep thing (including I started think so), so today I will try to tell you in simple popular expression, interface testing is actually very simple!

First, what is the interface?

I grilled over a variety of related Glossary and Wikipedia entries, find an explanation of the interface is really varied, and here I list only a relatively more objective and more common definition, although it sounds very awkward.

Interfaces, refers to entities provide their own way to the outside of one kind of abstraction thereof (may be another entity), the operation for separating the internal and external communication method, it can be modified without affecting the internal interact with other entities outside .

Popular point that can be a hardware or software module to encapsulate for external use, the interface can be called, may be present among all the software and hardware.

We every moment in life is not in use various interfaces, such as we take the elevator button inside is an interface, we drove a step on the gas it is also an interface, our computer operating systems, there are many interfaces.

In the IT industry, we usually refer to the interface are references to the API software interfaces, namely Application Programming Interface, application programming interface, referred to as API. Interface section later herein mentioned refer to API interface.

For the API interface, a user need only be concerned about the input and output, without knowing the specific implementation of the internal logic of the interface.

We work in a common interface can be divided into two categories:

  • Internal system interface:
    • Calls between different modules within the same system, different service
    • Such as internal system registration, log call interface, check orders, JDBC interface calls and so on.
  • External system interface:
    • Even different systems interface calls between different company
    • As a company calls between systems A and System B, the company's external call log Twitter, WeChat login login interface, third party.

Second, the software testing model

We look at position of software testing model for the test interface.

On the test model, the most famous is the test pyramid model.

Test pyramid

Concept testing pyramid by agile development guru Mike Cohn first proposed, mainly includes the following:

  • The test is divided into software UI interface testing, interface testing, unit testing three-layer structure
  • There should be more testing means, and not just via the user interface running test
  • It means higher stability testing, more efficient

However, in practice, the test unit higher professional technical requirements, are in many cases implemented by the developer. Although the unit test can find problems early, reducing repair costs, but high demand testers also means higher labor costs, so the investment in testing the interface layer is even more efficient and less costly.

Combined with the actual situation, the UI layer of interface testing and testing and unit testing are compared, and ultimately finds interface (API) test can get a higher return on investment, so with an improved version of the pyramid model - Olive model (model tumbler):

Olive model

Meaning Third, the interface testing

1. identify problems earlier

With the popularity of Agile Testing, we all know that testing be involved in the project development cycle as soon as possible, because the sooner the discovery bug, the lower the cost of repair.

However, functional tests are generally required to wait until after the system provides testable UI interface, unit testing and requires highly specialized and labor costs, so the choice of interface testing to intervene earlier test.

Interface test interface system can be tested before the function interface is not developed, so always found earlier and at a lower cost to fix the problem.

2. shorten product cycles

Interface testing earlier intervention, can find and solve the bug earlier, so that the number of bug to stay late functional testing phase of the reduction and ultimately shortening the time line of the project will help achieve agility test.

3. found more underlying problems

System Some bug if you want through the UI function testing would be more difficult, or configuration of the test data and the test conditions are very complicated, but may be more simply through an interface test, a more comprehensive coverage of the code of the underlying logic to find some hidden bug.

In particular, some unusual, extreme cases, can be used to test the interface is easy to verify.

Fourth, the interface testing strategy

An interface test between the point of interaction is mainly used between the detection system and the external system, and inside of each subsystem.

Testing is focused on the exchange, management and control transfer process, and the mutual dependencies between the logical data and other system checks.

Specifically, the test document is prepared in accordance with test cases, test execution, whether to return a request parameter interface no longer view the data in line with expectations, with not much difference between the ordinary test.

Interface interface testing strategies include functional testing, performance testing and Interface Interface safety testing in three areas, specific test points include but not limited to the following:

Interface Test Points

Finally, with regard to the interface testing tools, there are many commonly used are postman, soapUI, jmeter, the specific use is not complex, behind have time to elaborate.

This article weighing on an understanding of the theoretical knowledge interface, only directional guidance given no detailed practice, so there must have students do not know how to do, but that's okay Yeah, this is normal, about interface test content is very large, nor is it one or two articles can all be finished, the most important thing is to know about the direction, and then went bold in practice, the fastest growing in the process of doing.

Guess you like

Origin blog.csdn.net/lijing742180/article/details/90789932