Community sharing|MeterSphere transforms into a "woodpecker" to help automated testing of cloud account room landing interfaces

Yunzhangfang Network Technology Co., Ltd. (hereinafter referred to as "Yunchangfang") was established in March 2015. With the vision of "becoming the most trustworthy tax intelligence company", it uses artificial intelligence, big data and other Internet technologies, combined with profound With rich service experience in the financial and taxation industry, we provide intelligent and automated financial and taxation solutions for accounting companies and medium and large enterprises. We also provide full-cycle ecological services around the entire chain of enterprise operation and management to help enterprises reduce costs, increase efficiency, and achieve sustainable development.

1. Background of introducing interface automation project

The "Youdu Tax Intelligence" brand under Yunzhangfang is committed to providing high-quality intelligent tax services to medium and large enterprises and group enterprises. Its SaaS products include corporate tax, input invoice application, output invoice application, personal tax application and AutoWork Applications etc. In addition, there are tax digital platforms that provide public capabilities for business departments and convergence platforms that provide invoice capabilities. With the development of business scale, the cloud account test team faces the following challenges:

  The business logic is complex. As product iteration speed accelerates, the cost of regression testing is getting higher and higher;

  Multi-tenant systems need to ensure the stability and reliability of online system functions;

  Most of the customer groups of the "Youdu Tax Intelligence" brand are group customers with many tax numbers, large amounts of data, and strong correlation between data. Manually constructing a large amount of test data is inefficient and has poor replicability. It is expected that through automation way to construct test data.

Currently, Youdu Taxizhi’s testing team has a total of 10 testers. Most of the team members are independently responsible for the testing and management of individual applications and have rich experience in functional testing and interface testing. 50% of the team members have experience in writing interface automation test scripts, and some have Python and Java coding capabilities and performance testing experience.

The testing team is responsible for the requirements testing of all applications in the business unit. Version iterations are fast and the time to test is short. However, new function testing and partial impact function regression are mainly manual testing, and the testing efficiency cannot support high-frequency iteration of versions. At the same time, the technical transformation of products has a wide impact, and it is difficult to accurately assess the scope of impact. We hope to reduce the potential risks caused by changes through interface regression.

2. Why choose MeterSphere open source continuous testing platform?

For smart testing teams, MeterSphere can meet their goals and needs for building an automated testing platform. Compared with other testing tools or platforms, the advantages of the MeterSphere open source continuous testing platform are reflected in:

1. Low-code platform, simple and easy to use. All functions of API automated testing can be covered without CODING, and running results and logs are presented in real time to facilitate debugging and positioning;

2. Powerful use case management capabilities. MeterSphere can support project reuse, scenario reuse, and use case reuse, and one set of use cases supports multi-environment operation;

3. High scalability. The MeterSphere platform supports Python and Java code running, and supports expansion and encapsulation for unsatisfactory data processing;

4. Diverse execution methods. The MeterSphere platform supports scheduled execution test scenarios, system build-triggered execution test scenarios, and single or batch manual execution test scenarios.

3. Practical problems and solutions encountered during the implementation of interface automation

1. Automated implementation of external open interfaces

The external open interface is used to provide product capabilities for third parties to call. In order to ensure the security of the call, the interface content is generally signed and encrypted. Because the pre-scripts, post-scripts and custom scripts provided by MeterSphere can all support Java program running, you can refer to the encapsulated methods in the Java package to implement dynamic encryption of interface request parameters.

2. Combination of third-party interface test stubs and automation scenarios

Many of the "Youdu Tax Intelligence" products rely on third-party interfaces, and it is difficult for companies to achieve full coverage of functional scenarios through testing. MeterSphere is an open source continuous testing platform. In order to better cover the different return results of third-party interfaces, Youdu Taxizhi's testing team integrated and developed a test pile management module on the MeterSphere platform. This module supports enterprises to open test stub scenarios, test stub scenario management of service interfaces, and free switching of interface test stub scenarios.

■ Test stub management:

■ Application of test stubs in automation scenarios:

3. Scenario-based encapsulation of public processes to improve reusability

The invoice collection capability in the "Youdu Enterprise Taxation" product is a very important function. For different invoice types, the collection process and collection result verification are the same. In order to cover all invoice type collection scenarios, Youdu Taxizhi's testing team refined the public process, encapsulated it through basic functional scenarios, and parameterized assertions, effectively improving the efficiency of use case writing. Taking the input collection process as an example, the process includes four parts: "User login → Historical data cleaning → Input invoice collection → Collection result verification".

① Log in to the basic scenario

② Delete historical data basic scenario

③ Basic scenario of input invoice collection

④ Verification of collection results

The final effect is as follows. For scenarios of different invoice types, just define different scenario variables.

4. Project benefits brought by using the MeterSphere platform

MeterSphere's code name within the "Youdu Tax Intelligence" testing team is "Woodpecker", which means that it can help testers better find system bugs. At present, the construction of the interface automation system based on the MeterSphere platform has been promoted from the sales application of "Youdu Tax Intelligence" to 6 products of the entire business unit, and the main process coverage of all products has reached 100%. It also includes the pure interface automation of the "Middle Platform Project-Integrated Platform", as well as complex tax calculation module scenarios such as value-added tax and stamp duty for corporate tax applications.

Through the scheduled task function of MeterSphere, daily operation and regression automation testing before release are carried out, and the quality of product iterations is guaranteed. At the same time, when dealing with technical transformations such as Huawei cloud migration, service unitization, and MQ switching, many potential risks can be avoided in advance.

In addition, in the sales localization project, because MeterSphere provides API and Case replication functions, the testing team completed the automated migration from SaaS to localization projects through a small amount of debugging and changes, achieving automated replication across projects. Used to ensure the delivery quality and efficiency of localization projects.

In addition to interface test automation, currently through the MeterSphere open source continuous testing platform, the cloud account room has also established some complex data construction scenarios to solve the problem of low test efficiency caused by repeated operations, effectively improving the efficiency of data construction.

Lei Jun: The official version of Xiaomi's new operating system ThePaper OS has been packaged. The pop-up window on the lottery page of Gome App insults its founder. Ubuntu 23.10 is officially released. You might as well take advantage of Friday to upgrade! Ubuntu 23.10 release episode: The ISO image was urgently "recalled" due to containing hate speech. A 23-year-old PhD student fixed the 22-year-old "ghost bug" in Firefox. RustDesk remote desktop 1.2.3 was released, enhanced Wayland to support TiDB 7.4 Release: Official Compatible with MySQL 8.0. After unplugging the Logitech USB receiver, the Linux kernel crashed. The master used Scratch to rub the RISC-V simulator and successfully ran the Linux kernel. JetBrains launched Writerside, a tool for creating technical documents.
{{o.name}}
{{m.name}}

Supongo que te gusta

Origin my.oschina.net/u/4736111/blog/10110461
Recomendado
Clasificación