Talk about automated testing strategies such as UI automated testing and interface testing

Content summary

1. Introduce the main content of UI testing, interface testing, and unit testing

2. Take time to discuss each test

UI test【Selenium】

UI testing is the type of testing closest to the behavior of real users of the software. It usually simulates the behavior of real users using the software, that is, simulates various operations of the user on the software interface, and verifies whether the corresponding results of these operations are correct.

Interface test [API test]

API testing mainly aims at the exposed interfaces of each module, and usually adopts the gray box testing method. First, design the test cases of how to call the API in a black-box manner, and at the same time, calculate the code coverage during the test execution process, and then add more and more targeted test cases based on the code coverage.

unit test

Unit testing belongs to the category of white box testing and is usually completed by development engineers themselves. The earlier defects are found, the lower the repair cost.

Pros and cons of each test

One, UI automation testing

Everyone’s company is an Internet company, and the biggest feature is fast—products require constant iteration, 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 automated testing is an important reason that hinders the development of GUI testing for a long time.

In the case of rapid iteration, page changes may be frequent, and the UI automation test itself is based on page elements, and small front-end changes may need to be tested greatly.

Two, interface test

Compared with UI automation testing, interface testing is more stable and valuable.

effectiveness. Interface testing is to verify whether the request [request] and the response [response] meet expectations through test data. Therefore, the efficiency of interface test development and debugging will be much higher than that of UI automated testing.

stability. If the interface changes, it is basically a business redesign. Therefore, the stability of the interface test case execution is very high.

Practicality. UI automation test verification is mainly page display, while interface test verification is mainly data. At the current level of development, functional testing can basically fully verify the problems displayed on the page, so UI testing is a bit similar to "These are no problems, to ensure that there are no problems, so you have to write UI automation and execute it every day." Interface testing is to verify the data returned by the interface. The development of a new interface involves the invocation of interfaces. It is inevitable that there will be situations such as data type and key-value mismatch. Therefore, in consideration of practicality, interface testing is practical higher.

Three, unit test

The unit test of the Internet company where the captain works is completed by development. In the case of tight time, we usually produce a development self-test document, and only a small amount of unit test design needs to be developed. The fact is also true. Because of the task of development, most of them are unwilling to write a lot of unit tests after writing the interface. So unit testing needs to be determined by company.

Insert picture description here

Time to discuss

In view of the above reasons, when we are doing non-functional testing, we can use UI automated testing to cover the main or key processes of the product [including compatibility testing], that is to say, as long as the main process is guaranteed to be error-free, the rest even if there are problems Will not affect the normal use of the product. Spend more time on the design and implementation of interface test cases to ensure data accuracy. Unit testing can choose time allocation according to the company's situation.
Insert picture description here
The above are some video resources I collected, which helped me a lot in this process. If you don't want to experience the feeling that you can't find the information during self-study, no one answers your questions, and insists on giving up after a few days, you can join our deduction group [313782132], which has various software testing resources and technical discussions.

Insert picture description here

More good articles to share:

What kind of person is suitable for software testing?

For the rest of my life, do not look back, do not waste, do not

Slow talk about the status quo of the software testing industry

Is it true that software testing can't be done after 35?

Is it so simple to convert functional testing to automated testing?

Knowledge to understand python automated testing(3)

Those who can stand the beating of fate are the real winners in life

About software testing! Everything you want to know is here, Xiaobai must see!

Python automated testing examples-applications in insurance testing scenarios

Skills and Methods of Making Software Test Resume

Software testing is the easiest subject in IT-related industries to get started~ It doesn’t require the logical thinking of developers, and the operation and maintenance personnel are on standby 24 hours a day. What is needed is a careful and serious attitude and a broad understanding of IT-related knowledge. The growth path of each tester from entering the industry to becoming a professional expert can be divided into three stages: software testing, automated testing, and test development engineers.

Here I recommend an architecture learning exchange group to everyone. Communication learning group number: 313782132 Some video recordings recorded by senior architects will be shared: Spring, MyBatis, Netty source code analysis, principles of high concurrency, high performance, distributed, microservice architecture, JVM performance optimization, distributed architecture, etc. These become the necessary knowledge systems for architects.

Guess you like

Origin blog.csdn.net/weixin_50271247/article/details/108624088