Regression test range determination method and device, equipment and medium
By introducing data blood relationship analysis technology into the regression test range judgment, the data blood relationship map is constructed, and the problem of inaccurate regression test range judgment is solved, and more accurate and efficient regression test range judgment is achieved, reducing costs and ensuring system quality .
Patent Information
- Application Number
- CN202411487881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
AI Technical Summary
The judgment of the regression test range in the prior art is inaccurate, which leads to excessive or too small workload of regression tests, increases labor and time costs, and may lead to negative system impacts.
In the process of determining the scope of the regression test, data blood relationship analysis technology is introduced to determine the system data list and function change list of the software system, and a data blood relationship map is constructed to accurately determine the scope of the regression test.
It improves the accuracy and efficiency of the regression test range judgment, reduces the labor and time cost of project investment, and ensures system quality.
Smart Images

Figure CN119441035A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of software testing technology, and specifically relates to a method, device, equipment and medium for determining a regression test scope. Background Art
[0002] At any stage of the software life cycle, as long as the software is changed, it may cause problems to the software. When errors contained in the software are discovered, if the developer does not understand the errors thoroughly enough, he only corrects the external manifestations of the errors, but does not fix the errors themselves, resulting in modification failure; or the modification may have side effects, causing new problems in the unmodified parts of the software, causing errors in functions that were originally working properly. Similarly, when new code is added to the software, in addition to the possibility of errors in the new code, the new code will have an impact on the original code. Therefore, regression testing is carried out to verify the correctness of the modification and its impact. Whenever the software changes, the system must retest the existing functions to determine whether the modification has achieved the intended purpose and check whether the modification has damaged the original normal functions.
[0003] Currently, in the process of updating and iterating software systems, regression testing is an integral part of the software life cycle. In most cases, the scope of regression testing is determined based on the experience of test engineers and development engineers, and the scope of determination is often unclear.
[0004] At present, there are the following problems in the scope determination of regression testing of software systems: If the scope determination of regression testing is wrong, the following consequences will occur: if the scope is determined to be too large, the workload of regression testing will be too large, which will significantly increase the manpower and time costs of system updates; if the scope is determined to be too small, the problems introduced by code changes will not be discovered, which will have a negative impact on the system after going online. In addition, most of the system codes are in a black box state, and code association analysis cannot be performed; when the system logic and volume reach a certain level, even if the development and database personnel perform association analysis at the code and data level, it is a huge manpower investment, and the results may not be accurate. Summary of the invention
[0005] The present application provides a method, device, equipment and medium for determining a regression test scope, so as to solve the problems existing in the prior art of inaccurate regression test scope determination and high manpower and time costs of project investment.
[0006] In a first aspect, the present application provides a method for determining a regression test scope, the method comprising:
[0007] In the case of regression testing of the software system, determining a system data list and a function change list of the software system, wherein the system data list is used to indicate associations between a plurality of system functions in the software system and a database table;
[0008] Determine corresponding database table fields according to the system data list and the function change list;
[0009] Determine a target test node according to the database table fields and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association relationship between the data in the software system;
[0010] Determining the regression test scope of the software system based on the target test node and the system data list;
[0011] Optionally, before determining the target test node according to the database table field and the data lineage relationship map of the software system, the method further includes:
[0012] Performing node processing on multiple functional modules in the software system to obtain multiple nodes;
[0013] Performing data lineage analysis on system data corresponding to the multiple nodes to obtain associated nodes of each node;
[0014] Based on the multiple nodes and the associated nodes of each node, construct a data lineage relationship map of the software system;
[0015] Optionally, determining corresponding database table fields according to the system data list and the function change list includes:
[0016] Determine a corresponding function change module according to the function change list;
[0017] Determine the database table field corresponding to the function modification module by combining the function modification module and the system list data;
[0018] Optionally, the associated node includes: at least one downstream node, and the determining of the target test node according to the database table field and the data lineage relationship map of the software system includes:
[0019] Determine the modified node corresponding to the database table field from the data lineage relationship map;
[0020] Determine the associated node corresponding to the modified node, and use the associated node corresponding to the modified node as the target test node;
[0021] Optionally, the number of the downstream nodes is multiple, and the associated node corresponding to the modified node is used as the target test node, including:
[0022] Using the first N downstream nodes of the multiple downstream nodes of the modified node as the target test nodes, wherein the correlation degree between the N target test nodes and the modified node is greater than a preset correlation degree, and N is an integer greater than 1;
[0023] Optionally, determining the regression test scope of the software system based on the target test node and the system data list includes:
[0024] Based on the system data list, determining the test module corresponding to the target test node;
[0025] Using the test module as the regression test scope of the software system;
[0026] Optionally, after determining the regression test scope of the software system based on the target test node and the system data list, the method further includes:
[0027] Determine the association degree between the modified node and N target test nodes, wherein the association degree is determined according to the superior-subordinate relationship between the test node and the modified node;
[0028] The association degrees of the N target test nodes are sorted in order, and based on the order of the N target test nodes, the test intensity of the corresponding functional module is determined, wherein the test intensity is related to the association degree.
[0029] In a second aspect, the present application provides a device for determining a regression test scope, the device comprising:
[0030] A determination module, used to determine a system data list and a function change list of the software system when the software system is undergoing regression testing, wherein the system data list is used to indicate associations between a plurality of system functions in the software system and a database table;
[0031] The determination module is further used to determine corresponding database table fields according to the system data list and the function modification list;
[0032] The determination module is further used to determine the target test node according to the database table fields and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association relationship between the data in the software system;
[0033] The determination module is further used to determine the regression test scope of the software system based on the target test node and the system data list;
[0034] Optionally, the device further comprises: a processing module, an analysis module, and a construction module;
[0035] The processing module is used to perform node processing on multiple functional modules in the software system to obtain multiple nodes;
[0036] The analysis module is used to perform data lineage analysis on the system data corresponding to the multiple nodes to obtain the associated nodes of each node;
[0037] The construction module is used to construct a data lineage relationship map of the software system based on the multiple nodes and the associated nodes of each node;
[0038] Optionally, the determination module is further used to determine a corresponding function change module according to the function change list;
[0039] The determination module is further used to determine the database table field corresponding to the function modification module in combination with the system list data;
[0040] Optionally, the determination module is further used to determine the modified node corresponding to the database table field from the data blood relationship map;
[0041] The determination module is further used to determine the associated node corresponding to the modified node, and use the associated node corresponding to the modified node as the target test node;
[0042] Optionally, the determination module is further configured to use the first N downstream nodes of the multiple downstream nodes of the modified node as the target test nodes, wherein the degree of association between the N target test nodes and the modified node is greater than a preset degree of association, and N is an integer greater than 1;
[0043] Optionally, the determination module is further used to determine the test module corresponding to the target test node based on the system data list;
[0044] The determination module is further used to use the test module as the regression test scope of the software system;
[0045] Optionally, the device further comprises: a sorting module;
[0046] The determination module is further used to determine the association degree between the modified node and the N target test nodes, wherein the association degree is determined according to the superior-subordinate relationship between the test node and the modified node;
[0047] The sorting module is used to sort the association degrees of the N target test nodes in order;
[0048] The determination module is further used to determine the test intensity of the corresponding functional module based on the order of the N target test nodes, wherein the test intensity is related to the degree of association.
[0049] In a third aspect, the present application provides a device for determining a regression test scope, comprising:
[0050] processor;
[0051] Memory;
[0052] Wherein, the memory stores computer-executable instructions;
[0053] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method for determining the regression test scope as described in the first aspect and various possible implementations of the first aspect.
[0054] In a fourth aspect, an embodiment of the present invention provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining the regression test scope as described in the first aspect and various possible implementations of the first aspect.
[0055] The present application provides a method, device, equipment and medium for determining the scope of regression testing, which relates to the field of software testing technology. The method determines the system data list and function change list of the software system when the software system is undergoing regression testing, wherein the system data list is used to indicate the association between multiple system functions in the software system and a database table; the corresponding database table field is determined according to the system data list and the function change list; the target test node is determined according to the database table field and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association between the data in the software system; the regression test scope of the software system is determined based on the target test node and the system data list. By introducing data lineage analysis technology in the process of determining the scope of regression testing, the scope of regression testing can be determined more accurately and quickly based on the analysis results of data association relationships, thereby reducing the manpower and time costs of project investment while ensuring system quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] Figure 1 This is the process of determining the regression test scope provided by this application Figure 1 ;
[0058] Figure 2 This is the process of determining the regression test scope provided by this application Figure 2 ;
[0059] Figure 3 This is the process of determining the regression test scope provided by this application Figure 3 ;
[0060] Figure 4 This is the process of determining the regression test scope provided by this application Figure 4 ;
[0061] Figure 5 A schematic diagram of the structure of a device for determining a regression test range provided in this application;
[0062] Figure 6 A schematic diagram of the structure of a device for determining the scope of regression testing provided in this application.
[0063] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0066] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0067] First, the terms involved in this application are explained:
[0068] Data Lineage: Data Lineage, also known as data lineage, data origin, and data genealogy, refers to a naturally formed relationship between data, similar to human bloodline, during the entire life cycle of data, from data generation, processing, processing, fusion, circulation to final extinction. In simple terms, it is the upstream and downstream source and destination relationship between data, that is, where the data comes from and where it goes. Data lineage not only involves the physical flow of data, but also includes the logical relationship and conversion process of data.
[0069] Data lineage analysis: refers to tracking and analyzing the flow path of data in the system, including the source of data, processing process, usage, etc. It plays a vital role in data governance. By analyzing data lineage, organizations can quickly locate potential problems, prevent potential security threats, and take emergency measures quickly in the face of security incidents or data leaks to minimize losses.
[0070] Regression testing: Regression testing refers to retesting after modifying the old code to confirm that the modification has not introduced new errors or caused errors in other codes. Automatic regression testing will greatly reduce the cost of system testing, maintenance and upgrades. As an integral part of the software life cycle, regression testing accounts for a large proportion of the workload in the entire software testing process. Multiple regression tests will be performed at each stage of software development.
[0071] Database table: In a relational database, a database table is a collection of two-dimensional arrays that represent and store the relationships between data objects. It consists of vertical columns and horizontal rows.
[0072] Field: Each row in a table is called a "record". Each record contains all the information in this row, just like all the information about a person in an address book database. However, records in the database do not have a specific record name, and the row number is often used to indicate which record it is. A field is a smaller unit than a record. A set of fields makes up a record. Each field describes a feature of a document, namely a data item, and has a unique field identifier for computer recognition.
[0073] Currently, in the process of updating and iterating software systems, regression testing is an integral part of the software life cycle. In most cases, the scope of regression testing is determined based on the experience of test engineers and development engineers, and the scope of determination is often unclear.
[0074] At present, there are the following problems in the scope determination of regression testing of software systems: If the scope determination of regression testing is wrong, the following consequences will occur: if the scope is determined to be too large, the workload of regression testing will be too large, which will significantly increase the manpower and time costs of system updates; if the scope is determined to be too small, the problems introduced by code changes will not be discovered, which will have a negative impact on the system after going online. In addition, most of the system codes are in a black box state, and code association analysis cannot be performed; when the system logic and volume reach a certain level, even if the development and database personnel perform association analysis at the code and data level, it is a huge manpower investment, and the results may not be accurate.
[0075] In response to the above problems, the present application provides a method for determining the scope of regression testing. In the process of determining the scope of regression testing, this method introduces data lineage analysis technology, abstracts the software system into a process of data production, circulation, processing, and use, describes the correlation between the modules of the software system from the data level, and infers the code correlation between the modules of the software system from the correlation relationship of data lineage, constructs a data lineage analysis map of the software, and determines the associated nodes of the data nodes corresponding to the software update module in the data lineage analysis map, and uses the functional modules corresponding to the associated nodes as the scope of regression testing. By using data lineage as the basis for determination, the efficiency and accuracy of regression test scope determination can be improved, avoiding missed tests and test scope expansion.
[0076] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0077] Figure 1 This is the process of determining the regression test scope provided by this application Figure 1 .like Figure 1 As shown, the method for determining the regression test scope shown in this embodiment includes:
[0078] S101: When a software system is undergoing regression testing, a system data list and a function change list of the software system are determined. The system data list is used to indicate associations between multiple system functions in the software system and database tables.
[0079] Among them, the system data list is used to indicate the relationship between system functions and library tables. The source of this data list is the design document of the software system, which is a necessary document of the software system. It is mainly used to describe the database tables and fields involved in each functional module of the system, and explain the business logic meaning of each library table and field. The function change list is used to indicate the special version function change list of the software system during the iterative update process, that is, the detailed record of function module changes, which is used to describe all the changed or newly added functions in the software system since the last test, and can be used to ensure that regression testing covers all important function changes.
[0080] It can be understood that by combining the system data list and the function change list of the software system, the library table field data affected by the version function change can be determined.
[0081] S102: Determine corresponding database table fields according to the system data list and the function change list.
[0082] The database table fields refer to the data modules that are modified during the software update process.
[0083] It can be understood that the system data list may include the association relationship between each functional module in the software system and the database table, for example, it may include: a description of each independent functional module in the software system, a database storage structure associated with the functional module, and how the functional module interacts with the database table, such as data reading, writing, updating and deleting operations.
[0084] The functional change list records all functional changes of the software system since the last test or release. For example, it may include: newly added software functions; updates or improvements to existing functions; functions removed from the system. For each functional change, its impact on the database can be analyzed, including whether it is necessary to add, modify or delete database table fields.
[0085] Specifically, if the function change list includes new functions, and these functions require additional data storage, that is, adding new fields in the relevant database tables, for example, the business needs of the new functions can be analyzed to determine the data type, length, whether to allow empty fields and other field attributes that need to be stored; if the function change list includes modifications to existing functions, and the modifications involve changes to database table fields, such as data type, length, constraints, etc., then the corresponding database table fields can be updated and the attributes of the database table fields can be adjusted according to the modified function requirements; if the function change list includes deletion of functions, and the functions no longer require related data storage, the corresponding fields can be deleted from the database table.
[0086] It should be noted that, based on the association relationships in the system data list and analyzing the data interaction requirements between functional modules, the data modules that are modified during the software update process can be determined, and the logical relationships between database table fields can be obtained.
[0087] S103: Determine the target test node according to the database table fields and the data lineage relationship map of the software system. The data lineage relationship map is used to indicate the association relationship between the data in the software system.
[0088] Among them, the database table field is the basic unit for storing data in the database; the data lineage relationship map is a visual tool used to indicate the relationship between data in the software system. During the testing process, the accuracy and effectiveness of the test data can be guaranteed by testing the database table fields related to the modification target.
[0089] It can be understood that each field has a specific data type, length, and constraints to describe and store specific data. The data lineage graph may include but is not limited to: data nodes and relationship edges. Data nodes can be used to represent entities that store data, such as database tables, fields, and views; relationship edges can be used to represent the relationship between data nodes, such as data flow, data conversion, etc. By analyzing the data lineage graph, you can understand the flow path and conversion process of data in the software system, and thus determine which data nodes are the change nodes of the test target.
[0090] Specifically, according to the database table fields and the data lineage relationship map, the change node corresponding to the initial change module, that is, the data node corresponding to the change data, can be determined first according to the database table fields. Identify the change nodes related to the change module from the data lineage relationship map, and analyze the data nodes that are directly related to the test target, as well as the data nodes that indirectly affect the test target through data flow and conversion. For example, during the current software update process, functional module A has been changed. In the data lineage relationship map, the node represented by functional module A is a, that is, the change node is a. Therefore, node a is analyzed to obtain its downstream first-level node b and second-level node c, that is, the target test nodes are b and c.
[0091] It should be noted that the flow path of data in the data lineage relationship graph can be tracked to understand the data transmission process from the source node to the target node, and to analyze the conversion and processing operations that may occur in the data flow process, as well as the impact of these operations on the test target. The purpose of this step is to determine the target test node, the modified node and the data flow path, and determine the test scope, for example, it can include the database table fields that need to be tested, the data conversion and processing operations on the data flow path, etc. It can be used to ensure that the test scope covers all data nodes and relationship edges related to the test target to fully verify the correctness and effectiveness of the test target.
[0092] S104: Determine the regression test scope of the software system based on the target test nodes and the system data list.
[0093] Among them, the change nodes can be obtained according to the software development life cycle and change history, and key change points can be identified, such as new function addition, old function modification, performance optimization, etc. The target test node is obtained according to the change node, and the modules associated with it are identified by combining the target test node and the system data list. Since these associated modules may be affected by the change, they need to be included in the scope of regression testing.
[0094] It can be understood that for each target test node, the modules and functions that need to be tested can be determined, so that the test scope covers all node-related changes and associated modules, and the regression test scope is further refined based on the module and function descriptions in the system data list.
[0095] Specifically, for example, the first-level downstream node b and the second-level downstream node c obtained in step S103 can be used to derive the functional module B represented by node b and the functional module C represented by node c according to the system data list. The relationship at the functional and code levels can be deduced through the relationship of data lineage, thereby defining the functional module B and the functional module C as the scope of regression testing.
[0096] The method for determining the scope of regression testing provided in this embodiment is to determine the system data list and function change list of the software system when the software system is undergoing regression testing; determine the corresponding database table fields according to the system data list and the function change list; determine the target test nodes according to the database table fields and the data lineage relationship map of the software system; and determine the regression test scope of the software system based on the target test nodes and the system data list. By introducing data lineage analysis technology in the process of determining the scope of regression testing, starting from the analysis results of data association relationships, the scope of regression testing can be determined more accurately and quickly, thereby reducing the manpower and time costs of project investment while ensuring system quality.
[0097] Figure 2 The process of the method for determining the regression test scope provided in the embodiment of the present application is as follows Figure 2 This embodiment is in Figure 1 Based on the embodiment, the data lineage relationship map for constructing the software system is described in detail. Figure 2 As shown, the method for determining the regression test scope shown in this embodiment includes:
[0098] S201: Node processing is performed on multiple functional modules in the software system to obtain multiple nodes.
[0099] Among them, multiple functional modules in the software system are node-based, with the aim of splitting the complex software system into multiple independent parts, each part (i.e., node) representing a functional module.
[0100] It is understandable that a comprehensive analysis of the software system can be conducted to clarify the functions, inputs, outputs and relationships between each functional module. And according to the functional characteristics and relationships of these functional modules, they can be divided into multiple independent nodes.
[0101] S202: Perform data lineage analysis on system data corresponding to multiple nodes to obtain associated nodes of each node.
[0102] Among them, data lineage can be used to describe the source and destination of data, as well as the conversion of data in multiple processing processes. Data lineage analysis can sort out the relationship between systems, tables, views, stored procedures, ETL, program codes, fields, etc., and use graph databases for visual display. Through data lineage analysis, you can clearly understand the flow path and conversion process of data in the system, so as to determine the associated nodes of each node. The associated node is used to represent the node corresponding to the data module that has a data association relationship with the module corresponding to the target node.
[0103] It can be understood that the data lineage relationship processing process can, for example, first collect relevant data of all nodes in the system, including database tables, fields, views, stored procedures, ETL tasks, etc. Then clean and organize the collected data, remove redundant and erroneous data, and convert the data into a format suitable for lineage analysis. Through the flow path and conversion process of the data in the system, the lineage relationship between the data is sorted out, which may include, for example, the source, destination, conversion rules, etc. of the data. Finally, based on the sorted out lineage relationship, the associated nodes of each node are determined, wherein the associated nodes may include directly associated nodes such as data inflow nodes and data outflow nodes, and indirectly associated nodes such as nodes indirectly connected to through other nodes.
[0104] Specifically, for example, the current software system includes three nodes: A is a data source node, B is a data processing node, and C is a data output node. Data source node A is responsible for generating raw data and passing it to data processing node B; data processing node B is used to receive data from data source node A, perform a series of processing and conversion, and then pass the processed data to data output node C; data output node C is used to receive data from data processing node B and further process or store it in a database.
[0105] By performing data lineage analysis on this system, for example, the following associated node information can be obtained: the associated nodes of node A include directly associated node B, indirectly associated node C, etc. By performing data lineage analysis on system data corresponding to multiple nodes, the associated node information of each node can be obtained.
[0106] S203: Based on the multiple nodes and the associated nodes of each node, construct a data lineage relationship map of the software system.
[0107] The software system is abstracted as the process of data production, processing, and transmission. The data lineage analysis tool is used to analyze it, and a data lineage relationship map can be obtained. The map can be composed of nodes and edges. Nodes represent data entities such as database tables and fields, and edges represent dependencies or conversion relationships between data.
[0108] It is understandable that this relationship map can illustrate the life cycle and flow process of system data. In the map, related data can be displayed in the form of "nodes". Most nodes have their upstream nodes and downstream nodes, that is, associated nodes. The circulation and association relationship between data can be displayed in the form of "edges".
[0109] The method for determining the scope of regression testing provided in this embodiment is to analyze the functional modules of the software system into nodes, and obtain the upstream and downstream source and destination relationships of the data modules through data lineage analysis, and infer the code correlation of each module of the software system based on the correlation relationship of data lineage, so as to more accurately determine the associated modules of the modified modules.
[0110] Figure 3 The process of the method for determining the regression test scope provided in the embodiment of the present application is as follows Figure 3 This embodiment is in Figure 1 Based on the embodiment, a method for determining a regression test range provided by the present application is described in detail. Figure 3 As shown, the method for determining the regression test scope shown in this embodiment includes:
[0111] S301: When a software system is undergoing regression testing, a system data list and a function change list of the software system are determined. The system data list is used to indicate associations between multiple system functions in the software system and database tables.
[0112] Among them, step S301 is similar to the above step S101 and will not be repeated here.
[0113] S302: Determine a corresponding function change module according to the function change list.
[0114] Among them, the corresponding function change module is determined according to the function change list, and the requirement change can be mapped to the specific components or modules in the software architecture.
[0115] Understandably, functional changes can be classified and sorted according to their nature or scope of impact, such as new functions, modified functions, deleted functions, etc. Understand the overall architecture of the software system, such as the division of modules. Usually the software system is divided into multiple modules, each module is responsible for specific functions or business logic, and analyze the dependencies between modules and the interaction between the components within the modules.
[0116] Specifically, each item in the function change list is matched with a module of the software system to obtain a corresponding function change module.
[0117] S303: Determine the database table field corresponding to the function change module in combination with the system list data.
[0118] Among them, during the iterative update process of the software system, the function change module and the system list data are combined to obtain the database table fields affected by the version function changes, that is, the database table fields that are added, modified or deleted based on the requirements of the function change module and the system list data.
[0119] It can be understood that, based on the description of the functional modification module, the specific scope of the modification can be determined, for example, which database tables and fields will be modified, and how these modifications will affect the flow and conversion of data.
[0120] S304: Determine the modified node corresponding to the database table field from the data lineage relationship map.
[0121] Among them, after determining the database table fields affected by the functional change, combined with the lineage data analysis results of the software system, the nodes represented by the change-affected data, that is, the change nodes, can be found in the data lineage relationship map.
[0122] S305: Determine an associated node corresponding to the modified node, and use the associated node corresponding to the modified node as a target test node, where the associated node includes: at least one downstream node.
[0123] The target test node is used to indicate the downstream nodes that have data association with the modified node. By tracing the data flow path related to the modified node in the graph, all downstream nodes that may be affected can be found starting from the modified database table or field and following the direction of data flow.
[0124] It is understandable that all nodes directly related to the change can be marked in the graph, which can include, for example, the modified database table, field, and other data entities directly associated with it. In addition to directly related nodes, the indirect impact that the change may bring can also be analyzed, for example, the modification of a field may affect the index, constraint or trigger related to it.
[0125] S306: taking the first N downstream nodes of the multiple downstream nodes of the modified node as target test nodes, wherein the number of the downstream nodes is multiple, the correlation degree between the N target test nodes and the modified node is greater than a preset correlation degree, and N is an integer greater than 1.
[0126] The target test node may be determined according to the degree of association between the downstream node and the modified node, so as to reduce the resource consumption of the regression test and improve the test efficiency.
[0127] It is understandable that one or more indicators for evaluating the degree of association between nodes can be determined, and these indicators can include, for example, the frequency of data flow, the size of data volume, the complexity of data conversion, etc. And according to the determined indicators, the degree of association between the modified node and its downstream nodes is calculated, and the degree of association value can be calculated by analyzing the edge and node attributes in the data lineage relationship map, and using database query or data analysis tools.
[0128] Specifically, a preset correlation degree value can be set according to business needs or data quality requirements. This value will serve as a threshold for screening target test nodes. According to the calculated correlation degree value, the subordinate nodes of the changed node are sorted from high to low according to the correlation degree. From the sorted list of subordinate nodes, the first N nodes with a correlation degree greater than the preset correlation degree are selected as target test nodes. The value of N can be determined according to business needs or test resources, and this application does not limit this.
[0129] S307: Determine the test module corresponding to the target test node based on the system data list.
[0130] S308: Use the test module as the regression test scope of the software system.
[0131] The test module is used to indicate a data module that is associated with a function modification module and needs to undergo regression testing.
[0132] It can be understood that the module structure of the system can be understood through the system data list, including the functions, input and output, data interaction, etc. of each module, and the relationship between modules can be analyzed, such as calling relationship, data transfer relationship, etc., to understand the dependencies and mutual influences between modules.
[0133] Based on the information in the target test node, data lineage relationship map and data list, a module mapping relationship associated with the target test node is established, and modules that are directly related to or indirectly affected by the target test node are selected as test modules. These modules may include, for example, data processing modules, data storage modules, data interaction modules, etc.
[0134] The method for determining the scope of regression testing provided in this embodiment introduces data lineage analysis technology in the process of determining the scope of regression testing, and visualizes the association relationship between data modules by constructing a data lineage relationship map. Based on the analysis results of the data association relationship, the scope of regression testing can be determined more accurately, thereby reducing the manpower and time costs of project investment while ensuring the quality of the system.
[0135] Figure 4 The process of the method for determining the regression test scope provided in the embodiment of the present application is as follows Figure 4 This embodiment is in Figure 1 and Figure 3 Based on the embodiment, the test intensity of the regression test is determined according to the correlation between the target test node and the modified node. Figure 4 As shown, the method for determining the regression test scope shown in this embodiment includes:
[0136] S401: Determine the association degree between the modified node and N target test nodes, where the association degree is determined according to the superior-subordinate relationship between the test node and the modified node.
[0137] Specifically, let the modified node be a, the first-level downstream node be b, the second-level downstream node be c, node b represents function module B, and node c represents function module C. The data in the first-level downstream node b directly uses or processes the data in node a, so function module B and function module A should have a high degree of association at the code level in addition to the blood relationship in data, while the second-level downstream node c indirectly uses the data in node a, so function module C and function module A have a relatively low degree of association at the code level.
[0138] S402: sorting the association degrees of the N target test nodes in order, and determining the test intensity of the corresponding functional modules based on the order of the N target test nodes, wherein the test intensity is related to the association degree.
[0139] Among them, according to the correlation degree of the sorted target test nodes, a corresponding test strategy can be formulated for each functional module. Functional modules with a higher correlation degree should be allocated more test resources and more stringent test methods.
[0140] It can be understood that the relationship between functions and codes can be deduced through the relationship between data lineage, the scope of regression testing can be defined, and the intensity of regression testing can be determined, namely: Functional module B is the regression testing module that we need to focus on, which requires greater testing intensity; Functional module C is the module that we need to perform regression testing on, but the testing intensity can be reduced.
[0141] It should be noted that, let the downstream third-level node of node a be d, and the functional module corresponding to node d be module D. If the system is more complex or has higher requirements for stability, the downstream third-level node d of node a can also be analyzed, and the functional module D represented by it can also be subjected to a certain degree of regression testing. The above specific strength can be quickly screened by the priority of the system test case, and this application does not make specific restrictions here.
[0142] The method for determining the scope of regression testing provided in this embodiment determines the test priority of the target test node by analyzing the degree of correlation between the modified node and the target test node. It can systematically process the correlation degree ranking of N target test nodes, and determine the test intensity of the corresponding functional module based on the ranking result, which helps to ensure the comprehensiveness and accuracy of the testing work, improve the quality and stability of the system, and enhance the test efficiency of the regression test.
[0143] Figure 5 This is a schematic diagram of the structure of the device for determining the regression test range provided in this application. Figure 5 As shown, the regression test range determination device 500 provided in this embodiment includes:
[0144] A determination module 501 is used to determine a system data list and a function change list of the software system when the software system is undergoing regression testing, wherein the system data list is used to indicate associations between multiple system functions in the software system and database tables;
[0145] The determination module 501 is further used to determine corresponding database table fields according to the system data list and the function modification list;
[0146] The determination module 501 is further used to determine the target test node according to the database table fields and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association relationship between the data in the software system;
[0147] The determination module 501 is further used to determine the regression test scope of the software system based on the target test node and the system data list;
[0148] Optionally, the device further includes: a processing module 502, an analysis module 503, and a construction module 504;
[0149] The processing module 502 is used to perform node processing on multiple functional modules in the software system to obtain multiple nodes;
[0150] The analysis module 503 is used to perform data lineage analysis on the system data corresponding to the multiple nodes to obtain the associated nodes of each node;
[0151] The construction module 504 is used to construct a data lineage relationship map of the software system based on the multiple nodes and the associated nodes of each node;
[0152] Optionally, the determination module 501 is further configured to determine a corresponding function modification module according to the function modification list;
[0153] The determination module 501 is further used to determine the database table field corresponding to the function modification module in combination with the system list data;
[0154] Optionally, the determination module 501 is further used to determine the modified node corresponding to the database table field from the data lineage relationship map;
[0155] The determination module 501 is further used to determine the associated node corresponding to the modified node, and use the associated node corresponding to the modified node as the target test node;
[0156] Optionally, the determination module 501 is further configured to use the first N downstream nodes of the multiple downstream nodes of the modified node as the target test nodes, wherein the association degree between the N target test nodes and the modified node is greater than a preset association degree, and N is an integer greater than 1;
[0157] Optionally, the determination module 501 is further configured to determine a test module corresponding to the target test node based on the system data list;
[0158] The determination module 501 is further configured to use the test module as the regression test scope of the software system;
[0159] Optionally, the device further includes: a sorting module 505;
[0160] The determination module 501 is further used to determine the association degree between the modified node and the N target test nodes, wherein the association degree is determined according to the superior-subordinate relationship between the test node and the modified node;
[0161] The sorting module 505 is used to sort the association degrees of the N target test nodes in order;
[0162] The determination module 501 is further configured to determine the test intensity of the corresponding functional module based on the order of the N target test nodes, wherein the test intensity is related to the degree of association.
[0163] Figure 6 This is a schematic diagram of the structure of the device for determining the regression test range provided in this application. Figure 6 As shown, the present application provides a device for determining a regression test range. The device 600 for determining a regression test range includes: a receiver 601 , a transmitter 602 , a processor 603 , and a memory 604 .
[0164] Receiver 601, used for receiving instructions and data;
[0165] A transmitter 602, used for sending instructions and data;
[0166] Memory 604, used to store computer-executable instructions;
[0167] The processor 603 is used to execute the computer-executable instructions stored in the memory 604 to implement the steps executed by the various execution entities of the method for determining the regression test scope in the above embodiment. For details, please refer to the relevant description in the above embodiment of the method for determining the regression test scope.
[0168] Optionally, the memory 604 may be independent or integrated with the processor 603 .
[0169] When the memory 604 is independently provided, the electronic device further includes a bus for connecting the memory 604 and the processor 603 .
[0170] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a regression test scope determination method as performed by the regression test scope determination device described above is implemented.
[0171] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0172] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0173] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for determining the scope of regression testing, characterized in that: The method comprises: In the case of regression testing of the software system, determining a system data list and a function change list of the software system, wherein the system data list is used to indicate associations between a plurality of system functions in the software system and a database table; Determine corresponding database table fields according to the system data list and the function change list; Determine a target test node according to the database table fields and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association relationship between the data in the software system; Based on the target test node and the system data list, a regression test scope of the software system is determined.
2. The method according to claim 1, characterized in that Before determining the target test node according to the database table fields and the data lineage relationship map of the software system, the method further includes: Performing node processing on multiple functional modules in the software system to obtain multiple nodes; Performing data lineage analysis on system data corresponding to the multiple nodes to obtain associated nodes of each node; Based on the multiple nodes and the associated nodes of each node, a data lineage relationship map of the software system is constructed.
3. The method according to claim 1, characterized in that Determining corresponding database table fields according to the system data list and the function change list includes: Determine a corresponding function change module according to the function change list; The database table field corresponding to the function modification module is determined by combining the function modification module and the system list data.
4. The method according to claim 2, characterized in that: The associated node includes: at least one downstream node, and the target test node is determined according to the database table field and the data lineage relationship map of the software system, including: Determine the modified node corresponding to the database table field from the data lineage relationship map; An associated node corresponding to the modified node is determined, and the associated node corresponding to the modified node is used as the target test node.
5. The method according to claim 4, characterized in that The number of the downstream nodes is multiple, and the associated node corresponding to the modified node is used as the target test node, including: The first N downstream nodes of the multiple downstream nodes of the modified node are used as the target test nodes, wherein the correlation degree between the N target test nodes and the modified node is greater than a preset correlation degree, and N is an integer greater than 1.
6. The method according to claim 4, characterized in that The step of determining the regression test scope of the software system based on the target test node and the system data list includes: Based on the system data list, determining a test module corresponding to the target test node; The test module is used as the regression test scope of the software system.
7. The method according to claim 5, characterized in that After determining the regression test scope of the software system based on the target test node and the system data list, the method further includes: Determine the association degree between the modified node and N target test nodes, wherein the association degree is determined according to the superior-subordinate relationship between the test node and the modified node; The association degrees of the N target test nodes are sorted in order, and based on the order of the N target test nodes, the test intensity of the corresponding functional module is determined, wherein the test intensity is related to the association degree.
8. A device for determining a regression test range, characterized in that: include: A determination module, used to determine a system data list and a function change list of the software system when the software system is undergoing regression testing, wherein the system data list is used to indicate associations between a plurality of system functions in the software system and a database table; The determination module is further used to determine corresponding database table fields according to the system data list and the function modification list; The determination module is further used to determine the target test node according to the database table fields and the data lineage relationship map of the software system, wherein the data lineage relationship map is used to indicate the association relationship between the data in the software system; The determination module is further used to determine the regression test scope of the software system based on the target test node and the system data list.
9. A device for determining the scope of regression testing, characterized in that: include: Memory; processor; Wherein, the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for determining the regression test scope according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for determining the regression test scope according to any one of claims 1 to 7.