A 2000-word article teaching you how to build an automated testing platform

In the previous issue, we introduced the basic concepts of automated testing, so that everyone can establish a basic understanding of automated testing. With the implementation of the automated testing construction project this year, our bank's automated testing platform has also emerged as the times require, providing tool support for our bank's practical exploration in the field of automated testing. Let me share with you some thoughts in the process of platform construction.

01. Platform construction ideas

At present, automated testing has relatively mature technical conditions. There are a large number of open source frameworks on the market that support the implementation of automated testing, but they all require a certain development language as a basic support. Due to the diversity of the bank's internal systems and the current technical reserve of the internal testing team is relatively weak, it is obviously not suitable for the actual situation of our bank to directly choose a certain framework for automation practice. Therefore, in 2020, we invited 6 professional manufacturers to conduct multiple rounds of exchanges, and conducted POC tests on the products of each company on site. Through testing, we found that although the existing products of the manufacturer can solve the feasibility problem at the technical level, the technical architecture of the product is relatively backward, and the functional planning is relatively fragmented, which brings a poor user experience to users. Therefore, with the support of department leaders, we chose to cooperate with manufacturers to customize and develop an automated testing platform exclusive to our bank. The design of the platform will take "applicability" and "efficiency" as the theme to realize the implementation of our bank's automated testing work and the unification of the technology stack development plan.

02. Platform function planning

The essence of automated testing is to convert the original manual verification into machine-executed verification, and its implementation cannot be separated from the basic test workflow. Therefore, the automated test platform needs to carry all links from the beginning of demand analysis to the end of problem feedback, and organically combine with the R&D management process to form a logical and complete workflow. After various investigations and discussions by the project team, we first output the operation process on the automated testing platform side:

We divide the operation of automated testing into 3 stages and 8 links, so that platform users can carry out automated testing from the perspective of testers. On this basis, the project team conducted a detailed demand analysis for the 8 operation links, sorted out and output 32 function points that the platform needs to realize, and carried out logical integration according to the business relationship between the function points to form an automated implementation as the core. The 6 major functional modules:

03. Technical Architecture Planning

After determining the functional requirements of the platform, how to select technology to realize the landing and iteration of the platform has become a problem that the project team needs to solve. Since the manufacturer's original product is a "B/S+C/S" combined application, its development framework and system architecture have lagged far behind the mainstream solutions in the industry. Therefore, with the encouragement of the department leaders, the project team decided to boldly try to The technical framework of the sensitive development platform is the development base, and the engineering mode of front-end and back-end separation is used to reconstruct a B/S application integrating operation and execution.

In addition to re-planning the technical solution on the automated test platform side, the project team also selected the JVM-based agile development language Groovy for refactoring of the engine script on the execution machine side, canceling the original script solution of mixing Java, Python and Vbs , which establishes a unified standard for the development and maintenance of subsequent execution scripts.

Considering that with the improvement of automated test coverage and the advancement of DevOps construction in the future, the frequency and capacity of automated test tasks will also increase significantly, which will bring certain performance requirements to the platform server. In order to ensure the continuous availability of services, when designing the deployment architecture, the project team uses a master server and a slave server to build a service cluster, and implements load balancing by connecting to F5 at the front end to meet future 2-3 years of pressure demand brought about by the increase in business volume.

04. Core function design

After sorting out the functional architecture and technical solutions of the platform, how to ensure the operating experience of platform users in the use link and improve the efficiency of automated testing is a problem that the project team needs to focus on solving. The following are solutions to several core issues for everyone. Simple sharing:

1. How to make manual testers get started with the platform quickly?

As a customized development tool platform of our bank, an important problem to be solved is how to effectively lower the technical threshold and facilitate users to quickly carry out automated testing practices. At the beginning of the project design, it was determined that the business test will be implemented at the platform operation level as the core, and the implementation and docking of all technical levels will be made by the platform developers by encapsulating keywords and execution engines for users to call at the display layer. The operation page will hide all execution scripts, so as to reduce users' resistance and fear of technology, and build automation use case templates by dragging and dropping keywords, so as to improve the efficiency of building automation use cases;

2. How to solve the acquisition and reuse of test data?

At present, the solutions for automated testing are all designed with data-driven ideas, so a series of problems caused by test data have become a common problem in the practice process. How to solve the problem of effectively obtaining and reusing test data in a limited resource environment has become a key issue in the platform's implementation. After many investigations and practices by the project team, modules for test data usage and management were independently designed in the platform:

 3. How to improve the efficiency of automation tasks in the execution link?

On the one hand, the efficiency of automated test execution lies in the service scheduling on the platform side, and on the other hand, in the execution feedback on the execution machine side. In terms of the deployment of execution nodes, the project team adopts the mode of unified management of the execution machine environment resources, and integrates them on the platform side to form a basic resource package. Through one-click deployment, the expansion of new execution nodes can be completed within 10 minutes:

In addition, in the process of project construction, the execution strategy of automation tasks is also continuously optimized, and the original mode of waiting for tasks on the execution side is adjusted to actively pull tasks from the platform side. Through this strategy, the execution strategy of tasks has been improved by nearly 10 times, for The rapid verification of the system under test after deployment provides the possibility;

This year is the first year of our bank's automated testing. With the support of the leaders and the help of colleagues, the automated testing work has been able to achieve a leap from 0 to 1. Looking forward to the future work, there is a long way to go. I hope that in the future work, I will accumulate more for everyone Bring to share.


If after reading the above article, you still don’t know how to start building an automated testing platform, I suggest that you learn more about software testing. Don’t worry about not having learning resources. Now I will offer you a 13G super practical dry goods testing learning resource. , the content involved is very comprehensive. Including functional testing , linux database, python , interface automation testing , ui automation testing , performance testing...

Including the test software learning roadmap, and this test interview document , more than 50 days of test class videos, 16 surprise actual combat test items, more than 80 software test software, 37 test documents, 70 software test related questions, 40 A test experience level article, thousands of real test questions to share, as well as the 2023 software testing interview book, as well as various selected resumes for software testing job hunting, I hope it will be helpful to everyone... [Follow my VX public account : Programmer Xiaohao gets it for free~]

Guess you like

Origin blog.csdn.net/IT_LanTian/article/details/131444880