Software automation test framework and test method

By introducing a unified environment management platform, modular scripts, and machine learning algorithm optimization, combined with cloud computing resource optimization, the problems of environmental inconsistency and low resource utilization in the software automation testing framework were solved, achieving an efficient and accurate testing process.

CN120653569APending Publication Date: 2025-09-16XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510893564.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing software automation testing frameworks have deficiencies in test environment stability, reliability, sustainability, and test resource utilization, resulting in low testing efficiency, inconsistent test cases, increased costs, and extended software testing and release cycles.

Method used

Introduce a unified and standardized environment management platform, adopt a version control system (Git) to ensure environment consistency, modularize and parameterize test scripts, establish a test asset library, use machine learning algorithms to optimize testing, and combine cloud computing resource optimization and automated deployment to achieve comprehensive test coverage.

Benefits of technology

It improves the consistency and traceability of the test environment, reduces manual errors, enhances the reusability and versatility of test scripts, automatically generates test cases, optimizes resource utilization, shortens the test cycle, and improves test efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653569A_ABST
    Figure CN120653569A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software automatic test frameworks, and discloses a software automatic test framework and a test method. The system has the advantages of unified and standardized environment management, modularized and parameterized test scripts, establishment of a test asset library, intelligent test optimization, realization of a comprehensive test coverage rate, resource optimization, cloud computing integration and continuous integration and automatic deployment. According to the automatic software testing framework and the testing method, a unified and standardized environment management platform is introduced, and a version control system (Git) is combined, so that the consistency and the traceability of a testing environment are ensured, manual operation errors and environment differences are reduced through automatic deployment and a rollback mechanism of the environment, and the testing efficiency is improved. Therefore, the testing accuracy and efficiency are improved, the reusability and universality of the script are improved through the modularized and parameterized testing script, and the testing data and the script are separated through the parameterization technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software automated testing frameworks, and in particular to a software automated testing framework and a testing method. Background Art

[0002] A software automation testing framework is a software system that supports the automated testing process. It usually includes a series of tools, libraries and frameworks to support test engineers in writing, executing, managing and maintaining test cases. The purpose of this framework is to improve the efficiency and accuracy of software testing, reduce human errors, and allow the testing team to complete more testing work in a shorter time. However, the existing software automation testing frameworks and testing methods have poor test environment stability and reliability during use, and weak sustainability and traceability of test assets. At the same time, the use of test resources and testing efficiency are also low, resulting in test cases being unable to remain consistent across environments. Some tests may pass in the development environment but fail in the production environment, and it is easy to cause servers, networks and other hardware resources to be underutilized, thereby increasing costs. Due to low testing efficiency, testers need to spend more time manually executing or repairing test cases, resulting in extended software testing and release cycles. Summary of the Invention

[0003] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.

[0004] To achieve the above object, the present invention provides the following technical solutions: A software automation testing framework and testing method, whose method steps include unified and standardized environment management, modular and parameterized test scripts, establishment of a test asset library, intelligent test optimization, realization of comprehensive test coverage, resource optimization and cloud computing integration, as well as continuous integration and automated deployment.

[0005] As a further solution of the present invention: In the unified and standardized environment management, a central environment management platform needs to be created to store and manage all test environment configurations, and a version control system (Git) is used to track changes in environment configurations to ensure environment consistency. An automated deployment and rollback mechanism for environment configurations is introduced to reduce manual errors and environment differences.

[0006] As a further solution of the present invention: in the modular and parameterized test scripts, component-based test scripts need to be developed, each script focuses on a specific function or module, and uses parameterization technology to separate test data from the script to make the script more versatile. At the same time, an automated test script generation tool is introduced to automatically generate test cases through code analysis.

[0007] As a further solution of the present invention: in the establishment of the test asset library, it is necessary to create a test asset library for storing reusable test scripts, use cases and data sets, and use metadata to describe the test assets to make them easy to retrieve and reuse, while implementing version control of the test assets to track changes and maintenance history.

[0008] As a further solution of the present invention: in the intelligent test optimization, machine learning algorithms are used to analyze test results, automatically identify bottlenecks and defects in testing, and automatically adjust test priorities and test case sets based on historical data and software changes. At the same time, an intelligent test scheduling system is introduced to automatically adjust the test execution plan according to resource availability and test requirements.

[0009] As a further aspect of the present invention, the method for automatically adjusting test priorities and test case sets based on historical data and software changes using time series analysis may further include: Difference processing: The purpose is to make the non-stationary time series into a stationary time series. ; Data standardization or normalization: All values ​​need to be scaled into a common range; Standardized example: ; Normalization example: .

[0010] As a further solution of the present invention: When performing time series analysis, a variety of different models can be selected, depending on the characteristics of the data, including: Autoregressive (AR) model: Applied to scenarios where a linear relationship between the current value and its previous n values ​​is shown ; Moving Average (MA) model: Applied to scenarios where the current value is not only related to the past value, but also has a linear relationship with the past error. ; Autoregressive Moving Average (ARMA) model: combines the characteristics of AR and MA and is suitable for scenarios where both past values ​​and past errors affect current values. ; Autoregressive Integrated Moving Average (ARIMA) model: It combines the characteristics of AR, MA and differential integration. It is suitable for analyzing non-stationary time series and expecting to convert them into stationary scenarios. It also includes differential processing to make non-stationary time series into stationary series. ; Where B is the back-off operator and d is the difference order; After the optimal model is selected, it is used to predict the testing demand for future periods based on the recent time series data, thereby adjusting the test case set and priority.

[0011] As a further solution of the present invention: the machine learning algorithm uses the K-means algorithm, which can cluster test cases to identify similar test scenarios or classify defects into different repair priorities based on the characteristics of the test results. The specific algorithm formula is as follows: There is a data set , where each data point xi is an n-dimensional real vector, then the goal of the K-means algorithm is to divide the data set D into K clusters , so that the similarity between points in the cluster is high (or the distance is small), the algorithm attempts to minimize the squared error function, defined as: ; Where: μi is the center of cluster Si, usually defined as the mean of all points in the cluster, represents the distance between the data point x and the cluster center μi (using Euclidean distance); Formula for updating cluster centers: As part of the algorithm, each cluster center μi needs to be updated after each iteration as follows: ; Here, |Si| represents the number of points in cluster Si.

[0012] As a further solution of the present invention: in the implementation of the comprehensive test coverage, a code coverage tool (JaCoCo) is used to monitor test coverage and identify untested code areas, and test design techniques such as boundary value analysis and equivalence class partitioning are introduced to improve the coverage of test cases. Manual code reviews are performed regularly to ensure that test cases can cover complex business logic.

[0013] As a further solution of the present invention: in the resource optimization and cloud computing integration, the cloud computing platform (AWS or Azure) is used to dynamically expand test resources to cope with peak loads, realize automated test resource management, automatically allocate and recycle resources according to test requirements, and use virtualization technology to simulate different hardware and network environments to ensure the comprehensiveness and accuracy of the test.

[0014] Compared with the prior art, the present invention has the following beneficial effects: By introducing a unified and standardized environment management platform and combining it with a version control system (Git), the present invention ensures the consistency and traceability of the test environment. The automated deployment and rollback mechanism of the environment reduces manual operation errors and environment differences, thereby improving the accuracy and efficiency of the test. The modular and parameterized test scripts proposed by the present invention improve the reusability and versatility of the scripts. Through parameterization technology, the test data is separated from the script, so that the same script can be applied to a variety of test data scenarios. In addition, the automated test script generation tool can automatically generate test cases through code analysis, greatly reducing the development time and workload of the test script. When processing time series data, the present invention provides a variety of model options, including autoregression (AR), moving average (MA), autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA), etc., making the analysis of non-stationary time series more accurate. By selecting the optimal model, the test requirements for the future period can be predicted, thereby reasonably adjusting the test case set and priority. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 The figure is a schematic diagram of the method steps of a software automation testing framework and testing method. DETAILED DESCRIPTION

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0017] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0018] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0019] Example See also Figure 1, is an embodiment of the present invention, which provides a software automation testing framework and testing method, the method steps of which include unified and standardized environment management, modular and parameterized test scripts, establishment of a test asset library, intelligent test optimization, realization of comprehensive test coverage, resource optimization and cloud computing integration, and continuous integration and automated deployment.

[0020] Specifically, in unified and standardized environment management, a central environment management platform needs to be created to store and manage all test environment configurations, and a version control system (Git) should be used to track changes in environment configurations to ensure environment consistency. An automated deployment and rollback mechanism for environment configurations should be introduced to reduce manual errors and environment differences.

[0021] Furthermore, through the central environment management platform, all test environment configurations are managed and distributed from a single source, ensuring that the settings of each test environment are exactly the same, eliminating the test inconsistencies caused by environmental differences, which is crucial to ensuring that software applications can run stably in various environments. The use of version control systems such as Git to record changes in all environment configurations provides a clear history and change log, which not only makes it easier to track the source of the problem, but also enhances the transparency of the configuration. When problems arise, you can quickly see which changes may have caused the problem and when these changes were introduced.

[0022] Specifically, in modular and parameterized test scripts, component-based test scripts need to be developed. Each script focuses on a specific function or module, and uses parameterization technology to separate test data from the script to make the script more versatile. At the same time, an automated test script generation tool is introduced to automatically generate test cases through code analysis.

[0023] Furthermore, by splitting the test scripts into small units that focus on specific functions or modules, maintenance becomes easier. When the functionality of a module changes, only the scripts related to that module need to be adjusted without having to rewrite the entire test suite. This approach reduces code complexity and reduces maintenance overhead. Through parameterization, test data is separated from the script, allowing the same test script to use different input values. This not only makes the script more versatile, but also facilitates the management of test data and supports a wider range of test coverage, including boundary conditions and outlier testing.

[0024] Specifically, when establishing a test asset library, you need to create a test asset library to store reusable test scripts, use cases, and data sets, and use metadata to describe test assets to make them easy to retrieve and reuse. At the same time, implement version control of test assets to track changes and maintain history.

[0025] Furthermore, the reusable test scripts, use cases, and data sets stored in the test asset library can significantly reduce duplication of work. Development and testing teams can quickly find and utilize existing test assets, accelerate the test preparation process, and improve overall testing efficiency. By implementing version control on test assets, they can easily track the change history of assets and understand the evolution of each asset over time. This transparency not only helps to quickly locate changes that introduce defects, but also facilitates the maintenance and updating of test assets.

[0026] Specifically, in intelligent test optimization, machine learning algorithms are used to analyze test results, automatically identify bottlenecks and defects in testing, and automatically adjust test priorities and test case sets based on historical data and software changes. At the same time, an intelligent test scheduling system is introduced to automatically adjust the test execution plan according to resource availability and test requirements.

[0027] Furthermore, by automatically analyzing test results and identifying bottlenecks and defects in testing, problem areas can be quickly located, thereby speeding up problem resolution. This not only reduces the workload of manual analysis, but also shortens the entire testing cycle. The intelligent test scheduling system automatically adjusts the test execution plan based on resource availability and test requirements to ensure that test resources are used in the most reasonable way. This dynamic scheduling strategy can avoid resource idleness and overload, and improve resource utilization efficiency.

[0028] Specifically, the automatic adjustment of test priorities and test case sets based on historical data and software changes using time series analysis methods in operation also includes: Difference processing: The purpose is to make the non-stationary time series into a stationary time series. ; Data standardization or normalization: All values ​​need to be scaled into a common range; Standardized example: ; Normalization example: .

[0029] Furthermore, time series prediction models (ARIMA models) require that the input data be stationary. Through differential processing, the trend and seasonal components in the series can be eliminated, thereby improving the prediction accuracy of the model. The standardization or normalization process can help speed up the convergence of machine learning algorithms.

[0030] Specifically, when conducting time series analysis, there are many different models that can be chosen, depending on the characteristics of the data, including: Autoregressive (AR) model: Applied to scenarios where a linear relationship between the current value and its previous n values ​​is shown ; Moving Average (MA) model: Applied to scenarios where the current value is not only related to the past value, but also has a linear relationship with the past error. ; Autoregressive Moving Average (ARMA) model: combines the characteristics of AR and MA and is suitable for scenarios where both past values ​​and past errors affect current values. ; Autoregressive Integrated Moving Average (ARIMA) model: It combines the characteristics of AR, MA and differential integration. It is suitable for analyzing non-stationary time series and expecting to convert them into stationary scenarios. It also includes differential processing to make non-stationary time series into stationary series. ; Where B is the back-off operator and d is the difference order; After the optimal model is selected, it is used to predict the testing demand for future periods based on the recent time series data, thereby adjusting the test case set and priority.

[0031] Furthermore, based on model predictions, necessary testing resources, such as personnel and hardware, can be allocated more accurately. Predicting test needs helps test managers plan and adjust test strategies in advance, improving their ability to respond to emergency needs. By predicting potential high-risk areas, testing in these areas can be prioritized, thereby reducing the overall risk of the project.

[0032] Specifically, the machine learning algorithm uses the K-means algorithm, which can cluster test cases to identify similar test scenarios or classify defects into different repair priorities based on the characteristics of the test results. The specific algorithm formula is as follows: There is a data set , where each data point xi is an n-dimensional real vector, then the goal of the K-means algorithm is to divide the data set D into K clusters , so that the similarity between points in the cluster is high (or the distance is small), the algorithm attempts to minimize the squared error function, defined as: ; Where: μi is the center of cluster Si, usually defined as the mean of all points in the cluster, represents the distance between the data point x and the cluster center μi (using Euclidean distance); Formula for updating cluster centers: As part of the algorithm, each cluster center μi needs to be updated after each iteration as follows: ; Here, |Si| represents the number of points in cluster Si.

[0033] Furthermore, through clustering, pixel testing and defect attribution can be targeted at more concentrated areas, avoiding aimless comprehensive testing. The automated process reduces the workload of manual classification and analysis, saving time and reducing costs.

[0034] Specifically, in the implementation of comprehensive test coverage, a code coverage tool (JaCoCo) is used to monitor test coverage and identify untested code areas. Test design techniques such as boundary value analysis and equivalence class partitioning are introduced to improve test case coverage. Manual code reviews are performed regularly to ensure that test cases can cover complex business logic.

[0035] Furthermore, comprehensive test coverage helps identify and fix more potential errors and defects, reducing problems in the production environment, thereby significantly improving the overall quality of the software product. By covering more code paths, especially boundary conditions and exception handling, it ensures that all expected functions are fully tested and work properly according to the specifications, increasing user trust in the product.

[0036] Specifically, in resource optimization and cloud computing integration, cloud computing platforms (AWS or Azure) are used to dynamically expand test resources to cope with peak loads, implement automated test resource management, automatically allocate and recycle resources according to test requirements, and use virtualization technology to simulate different hardware and network environments to ensure the comprehensiveness and accuracy of the test.

[0037] Furthermore, by allocating resources on demand, enterprises can avoid over-investment in physical hardware and related maintenance costs. When testing is not needed, resources can be simply recycled to reduce waste caused by idleness. During peak demand periods (large-scale parallel testing or big data processing testing), the cloud platform can quickly expand resources to ensure the stable operation of the test environment. When demand decreases, resources can also be quickly reduced to match actual usage and improve resource utilization efficiency.

[0038] In summary, by introducing a unified and standardized environment management platform and combining it with a version control system (Git), the present invention ensures the consistency and traceability of the test environment. The automated deployment and rollback mechanism of the environment reduces manual operation errors and environmental differences, thereby improving the accuracy and efficiency of the test. The modular and parameterized test scripts proposed by the present invention improve the reusability and versatility of the scripts. Through parameterization technology, the test data is separated from the script, so that the same script can be applied to a variety of test data scenarios. In addition, the automated test script generation tool can automatically generate test cases through code analysis, greatly reducing the development time and workload of the test script. When processing time series data, the present invention provides a variety of model options, including autoregression (AR), moving average (MA), autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA), etc., which makes the analysis of non-stationary time series more accurate. By selecting the optimal model, the test requirements for the future period can be predicted, thereby reasonably adjusting the test case set and priority.

[0039] It is important to note that the construction and arrangement of the present application, as illustrated in various exemplary embodiments, are illustrative only. Although only a few embodiments are described in detail in this disclosure, those reading this disclosure will readily appreciate that numerous modifications are possible (e.g., variations in the size, dimensions, structure, shape, and proportions of various components, as well as parameter values ​​(e.g., temperature, pressure, etc.), mounting arrangements, use of materials, color, orientation, etc.) without materially departing from the novel teachings and advantages of the subject matter described herein. For example, components shown as integrally formed may be constructed from multiple parts or components, the positions of components may be inverted or otherwise altered, and the nature, number, or position of discrete components may be modified or changed. All such modifications are therefore intended to be encompassed within the scope of this invention. The order or sequence of any process or method steps may be altered or resequenced according to alternative embodiments. In the claims, any "means-plus-function" clause is intended to cover structures described herein that perform the recited function, and not only structural equivalents but also equivalent structures. Other substitutions, modifications, changes, and omissions may be made in the design, operating conditions, and arrangement of the exemplary embodiments without departing from the scope of this invention. Therefore, the invention is not limited to the specific embodiments, but extends to various modifications that still fall within the scope of the appended claims.

[0040] Additionally, in order to provide a concise description of exemplary embodiments, all features of an actual embodiment may not be described (i.e., those features that are not relevant to the best mode presently contemplated for carrying out the invention or those that are not relevant to implementing the invention).

[0041] It will be appreciated that in the development of any actual embodiment, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but will, for those of ordinary skill having the benefit of this disclosure, be a routine undertaking of design, fabrication, and production without undue experimentation.

[0042] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A software automation testing framework and testing method, characterized by: Its methods and steps include unified and standardized environment management, modular and parameterized test scripts, establishment of a test asset library, intelligent test optimization, implementation of comprehensive test coverage, resource optimization and cloud computing integration, as well as continuous integration and automated deployment.

2. A software automation testing framework and testing method according to claim 1, characterized in that: In the unified and standardized environment management, a central environment management platform needs to be created to store and manage all test environment configurations. A version control system (Git) is used to track changes in environment configurations to ensure environment consistency. An automated deployment and rollback mechanism for environment configurations is introduced to reduce manual errors and environment differences.

3. A software automation testing framework and testing method according to claim 1, characterized in that: In the modular and parameterized test scripts, component-based test scripts need to be developed. Each script focuses on a specific function or module, and uses parameterization technology to separate test data from the script to make the script more versatile. At the same time, an automated test script generation tool is introduced to automatically generate test cases through code analysis.

4. A software automation testing framework and testing method according to claim 1, characterized in that: In establishing a test asset library, a test asset library needs to be created to store reusable test scripts, use cases, and data sets, and metadata is used to describe test assets to make them easy to retrieve and reuse. At the same time, version control of test assets is implemented to track changes and maintain history.

5. A software automation testing framework and testing method according to claim 1, characterized in that: In the intelligent test optimization described above, machine learning algorithms are used to analyze test results, automatically identify bottlenecks and defects in testing, and automatically adjust test priorities and test case sets based on historical data and software changes. At the same time, an intelligent test scheduling system is introduced to automatically adjust the test execution plan according to resource availability and testing needs.

6. A software automation testing framework and testing method according to claim 5, characterized in that: The method of automatically adjusting test priorities and test case sets based on historical data and software changes using time series analysis in operation specifically includes: Difference processing: The purpose is to make the non-stationary time series into a stationary time series. ; Data standardization or normalization: All values ​​need to be scaled into a common range; Standardized example: ; Normalization example: .

7. A software automation testing framework and testing method according to claim 6, characterized in that: When performing time series analysis, a variety of different models can be selected, depending on the characteristics of the data, including: Autoregressive (AR) model: Applied to scenarios where a linear relationship between the current value and its previous n values ​​is shown ; Moving Average (MA) model: Applied to scenarios where the current value is not only related to the past value, but also has a linear relationship with the past error. ; Autoregressive Moving Average (ARMA) model: combines the characteristics of AR and MA and is suitable for scenarios where both past values ​​and past errors affect current values. ; Autoregressive Integrated Moving Average (ARIMA) model: It combines the characteristics of AR, MA and differential integration. It is suitable for analyzing non-stationary time series and expecting to convert them into stationary scenarios. It also includes differential processing to make non-stationary time series into stationary series. ; Where B is the back-off operator and d is the difference order; After the optimal model is selected, it is used to predict the testing demand for future periods based on the recent time series data, thereby adjusting the test case set and priority.

8. A software automation testing framework and testing method according to claim 5, characterized in that: The machine learning algorithm uses the K-means algorithm, which can cluster test cases to identify similar test scenarios or classify defects into different repair priorities based on the characteristics of the test results. The specific algorithm formula is as follows: There is a data set , where each data point xi is an n-dimensional real vector, then the goal of the K-means algorithm is to divide the data set D into K clusters , so that the similarity between points in the cluster is high (or the distance is small), the algorithm attempts to minimize the squared error function, defined as: ; Where: μi is the center of cluster Si, usually defined as the mean of all points in the cluster, represents the distance between the data point x and the cluster center μi (using Euclidean distance); Formula for updating cluster centers: As part of the algorithm, each cluster center μi needs to be updated after each iteration as follows: ; Here, |Si| represents the number of points in cluster Si.

9. A software automation testing framework and testing method according to claim 1, characterized in that: In the implementation of comprehensive test coverage, a code coverage tool (JaCoCo) is used to monitor test coverage and identify untested code areas. Test design techniques such as boundary value analysis and equivalence class partitioning are introduced to improve test case coverage. Manual code reviews are performed regularly to ensure that test cases can cover complex business logic.

10. A software automation testing framework and testing method according to claim 1, characterized in that: In the resource optimization and cloud computing integration, cloud computing platforms (AWS or Azure) are used to dynamically expand test resources to cope with peak loads, realize automated test resource management, automatically allocate and recycle resources according to test requirements, and use virtualization technology to simulate different hardware and network environments to ensure the comprehensiveness and accuracy of the test.