What is an interface?

  


Above is the answer baidu gave me, so what does it mean specifically?

Two examples:

1. We ride elevators using the up and down and floor buttons, which are the interfaces to elevators, and that’s how we ride elevators, no matter how the specific algorithms in elevators change.

2. Now all washing machines are automated, soaking, washing, bleaching and then dumping, so how does the dumping dry know that it needs to work? It must send messages to it by rinsing, I am finished to you, that is to say, there is interaction between the two, that is, there is interface between the two. I am modifying the rinsing procedure to change it from 3 times to 4 times, which will not have any impact on the drying process.

It can be seen that the interface is generally divided into two kinds, one is the external interface of the program, and one is the internal interface of the system

So what do interfaces do for us?

The interface of the elevator helps us to pass the information down to the first floor, the internal interface of the washing machine, passes the information to the next process.

Note:

For programmers: front-end development, back-end development, mobile development, how do these all connect? What is this article about? Yes, the answer is interface

So generally speaking, interfaces are the gateway for information exchange between different systems or modules

What is an interface test?

As the name implies, interface testing is to test the interface, test the system to the external interface, test the interface between modules, by directly controlling the interface of the application under test to verify whether the software in function, reliability, performance and security to meet expectations.

  


Why interface tests?

Interface testing has the following advantages:

1. Save time and shorten project time

2. Improve work efficiency

3. Improve system robustness

Simply put, the benefits are greater than the inputs, without explanation

How do I do interface tests?

Interface test process:

  


Here are the principles for writing use cases:

1. Remember where you started: Test interfaces, not features

2. Create data and construct appropriate data in the background to meet the interface

3. Assert whether the interface returns the expected result based on the returned value, and check the database validation

4. Data restoration, delete the results generated in the test process, ensure that each use case is a clean environment before execution