Those of you reading this article have probably seen the term “interface testing” in various places, so what exactly does interface testing measure? Believe that everyone may have their own answer.

Interface testing is not easy to understand for many test novices. Interface testing is concerned with the reliability of the interface provided by a function, class (method). The interface test can also be delivered as a URL. For example, if we send a request to the server through GET, the content we send will be delivered to the server as part of the URL.

Let’s take a look at interface test efficiency from a real case study.

For one project, 10 days to launch, 5 days to develop and 5 days to test (estimated to be manual testing), then the development time is extended to 8 days for various environmental or development technical reasons, and the test time is only 2 days. As a test for this project, you only have 2 days to test. This project is an emergency project and must be put into operation on time. How to deal with it?

Manual testing process:

Preparation for manual testing before testing: Write use cases and prepare data according to requirements, and then wait for testing. Check the development progress every day, and notice the possible delay on the fourth or fifth day, and then the delay is real, and the test is proposed on the ninth day, please speed test.

Because it is executed by human, the execution efficiency is limited, the original estimate of manual execution speed of five days will not be reduced to two days, and the time of defect repair and retest (if it is really reached, please leave your contact information in the message area so that I can pay attention to the quick person), so it will lead to the following results:

  • Cut test cases, ensure the main process, test is not enough, due to put into production with bugs;

  • Unlimited overtime, battle until dawn, due to put into production;

  • Project delay.

I’m sure everyone who does testing has this problem. Can automated interface testing improve this situation?

Running scenarios of automated interface tests:

Testing lead, development: a new interface automation test case development, after the completion of interface directly to the corresponding development, arrange in the development of the local environment, once confirm complete interface development, begin to implement interface test cases, basically can get real-time test results, time saving and convenient development fast judgment at the same time.

Regression testing: Develop local after test pass, or the whole demand manually after the test pass, the automation interface test cases do sorting, pick out the need to include the cases in regression testing, in a continuous integration environment to prepare the test data, and put the case into the continuous integration of the job, the interface for regression test cases need to be configured to run automatically continuous integration platform. For example, the script is executed at 11:00 PM every day. After the script is executed, the system sends the script to related personnel.

The advantages of interface testing are shown in the following three areas:

  • Interface testing saves testing costs. According to the data model, one Bug at the bottom can cause eight bugs at the top, and the Bug at the bottom can easily cause the crash of the whole network. Interface testing, on the other hand, can provide a cost-effective solution to increasing system complexity.

  • Interface test is different from the traditional development of the unit test, interface test is from the user’s point of view to the system interface comprehensive and efficient continuous testing.

  • Interface testing is automated and continuously integrated, which is why interface testing can be cost-effective and profitable.

This example is to see the efficiency of automation more directly, but not all projects are suitable for interface automation, here is just to propose a more effective testing method, or testers need to determine which is more efficient according to their own actual situation.

The above is what I want to share with you about the idea of automated testing. Finally, I attach a summary of the contents that need to be covered in interface automated testing in practice for your reference.



—————————————————— split line ——————————————————

I’m a black teenager, straight male, micro-service hardcore gamer, love to share, love to make friends, believe in the concept of “practice makes knowledge”, and enjoy tinkering with code

My wechat account: weiweiweiblack (Note: Nuggets)

Wechat official number: Black little micro services, focus on micro service technology sharing, non-technology not gossip!