Practical thoughts on hierarchical automated testing!

Layered model for automated testing

We should be familiar with the layered model of automated testing. According to the layered testing concept, the input and output of automated testing should be a pyramid model. The further down, the higher the input/output ratio, but the higher the difficulty/cost and technical requirements of implementation. However, according to the current actual implementation plans of various companies, it has gradually evolved into a rugby model, and the unit test part The implementation of various companies has not been very smooth, mainly because of their reliance on development. As shown below:

American quality management guru Dr. William Deming proposed that product quality is produced, not inspected. Only in every link of the production process, the production process must be strictly followed. Only by complying with the requirements of the work instructions can the quality of the product be guaranteed. If you ignore process control and rely only on inspection, it is impossible to ensure product quality, because quality inspection can only eliminate defective and scrap products and cannot improve product quality. In other words, the focus of quality control must not be placed on post-event inspection, but must be placed on the manufacturing stage, that is, the production process stage.

From a quality control perspective, unit test automation is the most worthwhile investment in resources. Because the earlier code quality problems are discovered, the lower the repair cost and the smaller the impact on the final delivery quality.

In the current reality, most companies invest a lot of resources in API automation. This is mainly due to the front-end and back-end separation architecture adopted by many companies and complex business scenarios. As the interface is a key part of the interaction and logic processing layer, the improvement of its automation coverage can ensure the accuracy of the data processing logic, thereby saving a lot of time for subsequent testing and significantly improving testing efficiency.

From the perspective of user experience, automated testing of the UI layer is also essential. Interface interaction is the most intuitive experience for users. If users feel that it is not easy to use, users will give up and choose other products.

We all know that the factors that affect quality arecost, scope and time. In the implementation process of technology, although the importance of technical practice is self-evident, we still need to make a choice and balance between cost and output. Therefore, it is particularly important to choose the most suitable automated testing method according to specific business scenarios.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:310357728【暗号:csdn999】

Practical prerequisites for layered automated testing

Let’s first understand the characteristics of different automated tests, and then talk about their applicable scenarios.

Cell automation

The target of unit testing is usually a class, method, or a specific function in the code, which are the tiny units that make up a system or service. Therefore, implementing unit automation testing becomes very important, but there are several prerequisites:

  • • You need to be very familiar with the details of business requirements. If you are not familiar with the details of business and requirements, unit testing is better than nothing

  • • Since the company has few or no dedicated unit testers, unit testing is mainly conducted for developers. During the demand iteration period, developers need to write business code and unit test code at the same time,< a i=1>Iterative requirements require enough time, but each iteration often has insufficient time. Agile development models are now common

  • • Need the support of the team leader,  Without the support of the team leader, often no one will conduct unit testing

Interface automation

Compared with UI automation, the task of interface automation is to verify the accuracy of data interaction and logic, which will verify system design and development coding specifications. Therefore, the implementation prerequisites or applicable scenarios for interface automation include:

  • • Relatively complete technical architecture and interface documentation

  • • Have relatively good process specifications

  • • Relatively stable environment and relevant infrastructure

UI automation

The biggest challenge in the implementation of UI automation is that frequent changes in requirements and UI design will lead to a large number of changes. If requirements and UI design change frequently, then the test framework, scripts and even related test data will need to be changed frequently, which will increase the maintenance cost of the environment and testing. There is a high probability that it will remain high, so a sustained and stable system is a very needed attribute for the implementation of UI automated testing. Scenarios where UI automation is more applicable include:

  • • Relatively stable system version iteration and regression testing

  • • Online business main process inspection work that cannot be covered by interface inspection

  • • High-frequency and stable small-scale functional operation in unstable systems

Automated testing is just one of many technical means to ensure quality. Deciding whether to perform tiered testing, and how much resources to invest in which testing method, mainly depends on the problems we face and the extent to which these problems affect quality. Then, we will choose the most appropriate testing method to solve the problem based on the specific situation. Cost, coverage and time continue to be the biggest factors influencing our technology selection and implementation.

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/134896215