Precise testing method, system, device and medium based on configuration center

By constructing a hierarchical and categorized configuration structure, obtaining test scope suggestions, establishing a test scope library, storing test scripts, and matching test scripts in real time, the problems of incomplete test coverage and low efficiency in the distributed configuration center system are solved, achieving accurate test results.

CN115422031BActive Publication Date: 2026-02-17SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210459623.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2026-02-17
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

In a distributed configuration center system, the lack of a systematic approach to classify configurations, analyze their impact, compare differences, and conduct precise testing results in incomplete test coverage and low efficiency.

Method used

Build a hierarchical structure for configurations, categorize configuration types, obtain test scope suggestions, establish a test scope library, store test scripts, and perform tests by matching test scripts in real time.

Benefits of technology

It enables precise testing of configurations, improves the reliability and efficiency of testing, and ensures comprehensive and accurate test coverage under different environments and clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115422031B_ABST
    Figure CN115422031B_ABST
Patent Text Reader

Abstract

The application relates to a configuration center-based accurate testing method, system, device and medium, which comprises the following steps: S1, constructing and confirming a structure level of different configurations; S2, classifying configurations according to the structure level of the configurations, and confirming test points corresponding to different configuration types; S3, obtaining a test range suggestion of different configurations according to the types and the structure level of the configurations; S4, obtaining a test range library according to the test range suggestion of the configurations and the structure level, wherein the test range library stores test scripts corresponding to different configuration types; and S5, obtaining a configuration type of a configuration to be tested in real time, matching corresponding test scripts in the test range library according to the configuration type and the structure level, and testing the configuration to be tested. Compared with the prior art, the application has the advantages of good test reliability and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of configuration testing, and in particular to a precise testing method, system, device, and medium based on a configuration center. Background Technology

[0002] In the microservice architecture, the original monolithic architecture is being continuously broken down. Under a distributed architecture, application service nodes require different configurations in different environments and even different clusters, leading to numerous problems due to the high costs of configuration deployment and management. The industry has adopted methods such as introducing distributed configuration centers to separate applications from configurations and centrally manage configurations. Under a distributed configuration center system, new challenges arise for system testing. A systematic approach is needed to achieve a balanced and efficient testing model by assessing the testing scope, testing strategies, regression frequency, and testing targeting for applications in different environments and clusters.

[0003] (1) In a distributed configuration center system, applications and configurations are separated, and distributed configurations are centrally managed. Traditional test scope assessments are difficult to effectively pinpoint the dimensions of the environment, project, application, and cluster affected by configuration, and the comprehensiveness of test coverage based on configuration impact faces significant challenges.

[0004] (2) There is currently a lack of effective means to systematically implement a complete solution for configuration from classification, to the scope of influence sorting, to difference comparison and interference removal, and finally to difference analysis and push for accurate testing.

[0005] (3) Lack of configuration of classification methods based on test focus and corresponding test recommendation models;

[0006] (4) In the absence of a distributed configuration center system, the ability to detect and respond to configuration changes is formed by connecting to the pipeline. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a precise testing method, system, device and medium based on a configuration center.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] A precise testing method based on a configuration center includes the following steps:

[0010] S1: Build and confirm the structural hierarchy of different configurations;

[0011] S2: Classify the configurations according to their structural hierarchy and identify the test points corresponding to different configuration types;

[0012] S3: Obtain test scope suggestions for different configurations based on the configuration type and structure hierarchy;

[0013] S4: Obtain and build a test scope library based on the configured test scope suggestions and structural hierarchy. The test scope library stores test scripts corresponding to different configuration types.

[0014] S5: Real-time acquisition of the configuration type of the configuration to be tested, matching the corresponding test script in the test scope library according to the configuration type and structure hierarchy, and testing the configuration to be tested.

[0015] Preferably, the configuration types include system access types, function switch types, and system parameter types.

[0016] Preferably, the test points for system access include functional link health checks, the test points for functional switches include obtaining the effectiveness of the switches through positive and negative scenario tests, and the test points for system parameters include functional impact tests of boundary values ​​and equivalence classes.

[0017] Preferably, the configuration hierarchy includes environment, project, application, cluster, namespace, keyword, and value.

[0018] Preferably, the method for obtaining the test range suggestion includes vertical comparison and horizontal comparison. The vertical comparison is based on the differences in historical configuration change records to obtain the test range suggestion, and the horizontal comparison is based on the differences between clusters in different dimensions to obtain the test range suggestion.

[0019] A precision testing system based on a configuration center, the system comprising a test range acquisition module, a test range library, and a testing module.

[0020] The range acquisition module is used to construct and confirm the structural hierarchy of different configurations, then classify the configurations according to the structural hierarchy, confirm the test points corresponding to different configuration types, and obtain test range suggestions for different configurations based on the configuration type and structural hierarchy.

[0021] The test scope library is obtained based on the configured test scope suggestions and structural hierarchy, and the test scope library stores test scripts corresponding to different configuration types;

[0022] The testing module obtains the configuration type of the configuration to be tested in real time, matches the corresponding test script in the test scope library according to the configuration type and structure hierarchy, and tests the configuration to be tested.

[0023] Preferably, the configuration types include system access types, function switch types, and system parameter types.

[0024] Preferably, the test points for system access include functional link health checks, the test points for functional switches include obtaining the effectiveness of the switches through positive and negative scenario tests, and the test points for system parameters include functional impact tests of boundary values ​​and equivalence classes.

[0025] An electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described configuration center-based precision testing method.

[0026] A readable storage medium storing computer instructions that, when executed by a processor, implement the aforementioned precision testing method based on a configuration center.

[0027] Compared with the prior art, the present invention has the following advantages:

[0028] (1) This invention sorts out the hierarchy and classification of configurations, uses systematic methods to analyze the test characteristics of different configurations and achieves accurate test recommendations, which can effectively improve the reliability and efficiency of testing;

[0029] (2) This invention uses two methods to obtain test scope suggestions, namely vertical and horizontal, to evaluate and recommend test scope. This allows for different tests to be performed on different clusters, thereby improving the accuracy of the tests. The vertical comparison mode covers the configuration history changes within the version, while the horizontal comparison mode covers the configuration differences between the environment and clusters. The two complement each other to cover the evaluation and recommendation of test scope under various configuration changes. Attached Figure Description

[0030] Figure 1 This is a flowchart of the method of the present invention;

[0031] Figure 2 This is a schematic diagram of the system structure of the present invention;

[0032] Figure 3 This is a schematic diagram of the structural hierarchy of different configurations in embodiments of the present invention;

[0033] Figure 4 This is a schematic diagram illustrating the vertical comparison acquisition and horizontal comparison acquisition in an embodiment of the present invention. Detailed Implementation

[0034] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Note that the following description of the embodiments is merely illustrative and is not intended to limit its applicability or use, nor is the present invention limited to the following embodiments.

[0035] Example 1

[0036] This invention provides a precise testing method based on a configuration center, such as... Figure 1 As shown, it includes the following steps:

[0037] S1: Build and confirm the structural hierarchy of different configurations.

[0038] The prerequisites for testing the configuration center in this invention require analyzing and establishing comprehensive preconditions for accurate assessment and comparison of the test scope based on the organizational environment and current architecture. These preconditions mainly include, but are not limited to, the following:

[0039] The configuration center comprehensively manages the maintenance, modification, and release of relevant configurations; it should have an approval and review mechanism based on an operational pipeline, with clearly defined permissions for relevant positions such as "development, operation and maintenance, configuration, testing, and business"; the configuration center has implemented comprehensive configuration management throughout the entire lifecycle, including different environments, different clusters, and different namespaces; configuration release can be achieved through server-to-client push or client-initiated retrieval, and configuration activation requires relatively real-time hot deployment; it is recommended that the relevant configuration center management have a unified and user-friendly interface; and it is recommended that the naming conventions for configurations have a certain degree of binding force, standardization, and consensus at the organizational or professional level.

[0040] Under the premise of the above basic conditions, preparation and continuous optimization work shall be carried out in the following manner:

[0041] The testing function should have appropriate access to the configuration center; maintain good communication with relevant positions, including development, operations, configuration, and business; and, based on their own testing experience, ensure a clear and consistent understanding of the business and testing impacts of configuration changes in different environments, clusters, and namespaces. The configuration center should have functions to facilitate continuous improvement of this solution, including functions such as maintaining configuration and testing suggestions, comparing configuration history, analyzing differences between configuration environments, and reviewing and releasing configurations by the testing function. The configuration center should be open and continuously receive feedback from this solution and related areas, and actively respond to and optimize accordingly.

[0042] Based on the above, this invention constructs and confirms structural hierarchies with different configurations, such as... Figure 3 As shown, it includes levels such as environment, project, application, cluster, namespace, key, and value.

[0043] S2: Classify the configurations according to their structural hierarchy and identify the test points corresponding to different configuration types.

[0044] Configuration types include system access types, function switch types, and system parameter types.

[0045] System access can generally be achieved through methods such as functional link health checks. As long as the functional links are normal, the configuration can be considered correct.

[0046] Function switch classes need to be tested in both positive and negative scenarios based on the function of the switch, to test the effectiveness of the switch and its impact on the function.

[0047] System parameter classes require testing the functional impact of parameter-related boundary values ​​and equivalence classes, with particular attention needed to extreme value cases. Specific examples are shown in the table below:

[0048]

[0049] S3: Obtain test scope suggestions for different configurations based on the configuration type and structure hierarchy.

[0050] Based on the scope of impact and type of the above configurations, test recommendations for the relevant configurations will be jointly established, maintained, reviewed, and updated by relevant positions such as "development, operations, configuration, testing, and business".

[0051] Test recommendations should at least clearly specify the following under the influence of the corresponding configuration: preconditions for testing, necessary steps for testing, expected results of testing, and recommended scope of testing. The scope of testing should be specifically defined to account for differences in environment, project, application, cluster, etc.

[0052] S4: Based on the configured test scope suggestions and structural hierarchy, obtain and build the test scope library, which stores the test scripts corresponding to different configuration types.

[0053] The recommended test scope can be obtained through two methods: longitudinal comparison and horizontal comparison. Longitudinal comparison suggests test scope based on differences in historical configuration changes, while horizontal comparison suggests test scope based on differences between clusters across different dimensions. For example... Figure 4 As shown, a systematic approach is used to record the reasonable differences in relevant configurations across different "environments, projects, applications, and clusters," along with testing recommendations. The following two methods are used for testing evaluation and recommendations.

[0054] The first method is vertical comparison: Within an environment, such as the SIT system integration testing environment, examine the change records of the "key" to the "value" under a specific "Namespace" within a "Project, Application, Cluster Class". Based on the change records, test suggestions, and assessments from testing personnel, conduct targeted testing.

[0055] The second type is the horizontal comparison mode, which is generally divided into the following categories.

[0056] Inter-environment comparisons, such as the differences between SIT system integration testing and UAT user acceptance testing, are important test bases for configuration upgrades between environment versions, as these differences represent version release differences.

[0057] Inter-cluster comparison: In distributed mode, due to differences in deployment modes such as physical machines, virtual machines, containers, networks, middleware, etc., different configurations are required in different clusters. Such differences require targeted testing of inter-cluster configuration differences.

[0058] S5: Real-time acquisition of the configuration type of the configuration to be tested, matching the corresponding test script in the test scope library according to the configuration type and structure hierarchy, and testing the configuration to be tested.

[0059] By maintaining the mapping between "configuration," "test suggestions," and "automated test scripts," the system enables the invocation of corresponding automated test scripts after automated difference analysis when the configuration changes. This is typically achieved using the following method:

[0060] Maintaining the correspondence between "configuration" and "automated test scripts" allows for the establishment of a many-to-many relationship. In the pipeline, after automatically removing non-automatable parts and reasonable differences, the corresponding "automated test script" can be invoked. If the test passes, it can serve as an entry condition for the current version's quality control, allowing it to proceed to subsequent testing and verification stages. If the test fails, the issue is promptly reported to check the correctness of the configuration immediately and prevent problems in subsequent configuration releases.

[0061] Example 2

[0062] This invention also provides a precision testing system based on a configuration center, which can implement the method as described in Example 1, such as... Figure 2 As shown, the system includes a test range acquisition module 1, a test range library 2, and a test module 3.

[0063] The scope acquisition module 1 is used to construct and confirm the structural hierarchy of different configurations, then classify the configurations according to the structural hierarchy, confirm the test points corresponding to different configuration types, and obtain test scope suggestions for different configurations based on the configuration type and structural hierarchy.

[0064] Test Scope Library 2 is obtained based on the configured test scope suggestions and structural hierarchy. The test scope library stores test scripts corresponding to different configuration types.

[0065] Test module 3 obtains the configuration type of the configuration to be tested in real time, and matches the corresponding test script in the test scope library according to the configuration type and structure hierarchy to test the configuration to be tested.

[0066] Example 3

[0067] The present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described configuration center-based precision testing method.

[0068] The present invention also provides a readable storage medium storing computer instructions, which, when executed by a processor, implement the above-described configuration center-based precision testing method.

[0069] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0070] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0071] The program product provided in this application embodiment can be any combination of one or more readable media, wherein the readable media can be a readable signal medium or a readable storage medium, and the readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. Specifically, more specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0072] The program product provided in this application embodiment can be a CD-ROM and include program code, and can also run on a computing device. However, the program product provided in this application embodiment is not limited thereto. In this application embodiment, the readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0073] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0074] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0075] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

[0076] The above embodiments are merely illustrative and do not constitute a limitation on the scope of the present invention. These embodiments can also be implemented in various other ways, and various omissions, substitutions, and modifications can be made without departing from the technical spirit of the present invention.

Claims

1. A configuration center-based precision testing method, characterized in that, The method comprises the following steps: S1: constructing and confirming a structural hierarchy of different configurations, wherein the structural hierarchy of the configurations comprises an environment, a project, an application, a cluster, a namespace, a keyword, and a value; S2: classifying the configurations according to the structural hierarchy of the configurations, and confirming test points corresponding to different configuration types; S3: obtaining a test range suggestion of different configurations according to the types and the structural hierarchy of the configurations; S4: obtaining a test range library according to the test range suggestion of the configurations and the structural hierarchy, wherein the test range library stores test scripts corresponding to different configuration types; S5: obtaining, in real time, a configuration type of a configuration to be tested, matching corresponding test scripts in the test range library according to the configuration type and the structural hierarchy, and testing the configuration to be tested. The test range suggestion is obtained in a longitudinal comparison manner or a transverse comparison manner, wherein the test range suggestion is obtained according to differences in historical change records of the configurations in the longitudinal comparison manner, and the test range suggestion is obtained according to differences between clusters in different dimensions in the transverse comparison manner.

2. The configuration center-based precision testing method according to claim 1, wherein, The configuration type comprises a system access type, a function switch type, and a system parameter type.

3. The configuration center-based precision testing method according to claim 2, wherein, The test point of the system access type comprises a function link health check, the test point suggestion of the function switch type comprises obtaining an effectiveness of a switch through positive and negative scene tests of the function switch, and the test point of the system parameter type comprises a boundary value and an equivalent class function impact test.

4. A configuration center-based precision testing system, characterized in that, The system comprises a test range obtaining module, a test range library, and a test module. The range obtaining module is used to construct and confirm a structural hierarchy of different configurations, classify the configurations according to the structural hierarchy of the configurations, confirm test points corresponding to different configuration types, and obtain a test range suggestion of different configurations according to the types and the structural hierarchy of the configurations, wherein the structural hierarchy of the configurations comprises an environment, a project, an application, a cluster, a namespace, a keyword, and a value. The test range library is obtained according to the test range suggestion of the configurations and the structural hierarchy, and the test range library stores test scripts corresponding to different configuration types. The test module is used to obtain, in real time, a configuration type of a configuration to be tested, match corresponding test scripts in the test range library according to the configuration type and the structural hierarchy, and test the configuration to be tested. The test range suggestion is obtained in a longitudinal comparison manner or a transverse comparison manner, wherein the test range suggestion is obtained according to differences in historical change records of the configurations in the longitudinal comparison manner, and the test range suggestion is obtained according to differences between clusters in different dimensions in the transverse comparison manner.

5. The configuration center-based precision testing system according to claim 4, wherein, The configuration type comprises a system access type, a function switch type, and a system parameter type.

6. The configuration center-based precision testing system according to claim 5, wherein, The test point of the system access type comprises a function link health check, the test point suggestion of the function switch type comprises obtaining an effectiveness of a switch through positive and negative scene tests of the function switch, and the test point of the system parameter type comprises a boundary value and an equivalent class function impact test.

7. An electronic device, comprising: The system comprises: The memory, the processor and the computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to implement the configuration center-based precision testing method according to any one of claims 1-3.

8. A readable storage medium, characterized by, The readable storage medium stores computer instructions, and the computer instructions are executed by the processor to implement the configuration center-based precision testing method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Test method and device, electronic equipment and storage medium

    CN110874315A