3 ui automation testing pain points

When we were looking for a job, we checked the recruitment information and found that we all need to have experience in automated testing. From this, it seems that testers do not know a little automated testing technology and are embarrassed to say that they are doing software testing. Most testers also start automated testing by using automated testing tools, recording playback, test scripts, and developing gadgets, and then slowly come into contact with UI automation, interface automation, continuous integration, and finally build an automated testing framework system.

Most test beginners may have the most contact with  UI automation when they get started with automation testing . They have also used  Uiautomator on the mobile terminal , Appium UI automation framework, Selenium and Robot Framework  UI automation framework related to PC Internet interfaces   . Subconsciously think that UI automation testing is very important. Simple. But after using it for a period of time, it was mixed, especially when it was actually used at work, it immediately became unacceptable. The time for developing and maintaining scripts was much longer than the time for manual testing. The gain outweighed the loss, and finally returned to manual testing.

If UI automation is to be used in actual work, the following pain points must be resolved, otherwise UI automation testing still has a long way to go.

1. Projects with unstable requirements and frequent changes

The biggest challenge of UI automation testing is the change of requirements. If the interface changes frequently, the script needs to be rewritten. Frequent changes in interface requirements cause the speed of writing scripts to fail to keep up with the changes in requirements. Then UI automation is in name only, so UI automation testing is especially suitable for requirements. A project that is stable and does not change frequently. The requirements of agile development projects are unstable, and changes in requirements often lead to changes in the interface. At the same time, the project cycle of agile development is short, so agile development projects are not suitable for UI automation.

2. Projects with short development and maintenance cycles

For one-time development and short-cycle projects, considering the input-output ratio of UI automation, UI automation testing is not suitable. The benefits of UI automation are mainly reflected in multiple rounds of testing. Imagine that a project with a short maintenance cycle has fewer rounds of testing. For example, one or two rounds of interface testing can be tested, so manual testing can be used. . At the same time, the development and debugging of automated scripts takes a certain amount of time. If the project cycle is short and there is not enough time to support the development of scripts, then there is no need for automated testing.

3. The development of the system under test is not standardized, and the testability requirements are not clear

UI automation testing is actually simulating manual clicks. Unlike the human eye that can directly find the controls that need to be clicked, the program is different. We need to find the controls to be clicked in advance, and then let the program click to complete the simulated manual operation. This requires defining a series of specifications for automated testing before project development, and development engineers follow the specification development during development, so that UI automation can proceed. For example, there is no unique id or text description defined for the button control, and the control cannot be found when the automation script is written. If the development often changes the definition of controls casually before different versions, then the scripts that can be executed before will not run correctly afterwards, requiring real-time maintenance, which will bring high labor costs and become inefficient. Similarly, there are interface parameters in the process of interface automation testing.

So what kind of project is suitable for UI automation testing? The following list can be used for reference: stable requirements and infrequent changes; frequent regression verification is required; stable UI interface, interface control definition specifications and strong testability; projects with long development and maintenance cycles; small project progress pressure; large companies and large platforms; testing department Most of the testers have the ability to develop scripts.

Currently, UI testing is the testing link that consumes the most manpower of the testing team, and most of the testers' daily work is UI testing. Therefore, UI automation is very suitable for solving simple, mechanical, repetitive tasks and increasing the coverage of tests.

UI automation testing not only needs to write test scripts, but also needs to be designed. It needs to consider not only the execution efficiency of hundreds of use cases, but also the maintenance cost and the correctness of execution results. We need to understand that UI automation testing cannot replace manual testing, and it is difficult to reduce testers. We cannot blindly promote and pursue UI automation testing .

[A full 200 episodes] Ultra-detailed advanced tutorials on automated testing of Python interfaces, truly simulating the actual combat of enterprise projects! !

Guess you like

Origin blog.csdn.net/xiao1542/article/details/132069600