Test case execution path set generation method and device and electronic equipment

Through the combination of natural language processing technology and multi-cluster directed graphs, the dependencies between test cases are effectively identified and managed, and the execution path set of test cases is generated, which solves the problem of low efficiency in test path planning in the existing technology and improves the testing efficiency and quality.

CN120086144APending Publication Date: 2025-06-03中国邮政储蓄银行股份有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510251345.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and manage complex dependencies between test cases, resulting in low efficiency in testing path planning.

Method used

The functional points and key entities in the test cases are extracted through natural language processing technology, a function point-attribute mapping table is constructed, the association relationship between the functional points and the key entities is identified, and a multi-cluster directed graph is constructed based on this, and a path solution algorithm is used to determine multiple execution path sets of the test cases.

Benefits of technology

Improve the efficiency and accuracy of test case analysis, reduce redundant paths, ensure the comprehensiveness and effectiveness of test coverage, and significantly reduce the execution time of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086144A_ABST
    Figure CN120086144A_ABST
Patent Text Reader

Abstract

The invention provides a test case execution path set generation method and device and electronic equipment. The method comprises the steps that a test case is obtained, a natural language processing technology is adopted to extract function points in the test case, key entities of the test case are recognized, the incidence relation between the function points and the key entities is determined, a function point-attribute mapping table is obtained, attributes are responsible for storing the key entities, and the attributes are responsible for storing the key entities; recording test data and a constraint relation between verification operation and the function points; a multi-cluster directed graph is constructed according to the function point-attribute mapping table, the function points serve as nodes of the multi-cluster directed graph, and the attributes serve as edges between the nodes and the directions of the edges; and performing traversal solving processing on the multi-cluster directed graph by adopting a path solving algorithm, and determining a plurality of execution path sets of the test case. The problem that in the prior art, the complex dependency relationship between test cases is difficult to effectively recognize and manage, and consequently the efficiency of test path planning is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of test case execution path set generation. Specifically, it relates to a method, device, computer-readable storage medium, and electronic device for generating a test case execution path set. Background Art

[0002] In the field of software testing, traditional manual test case execution order optimization methods face many technical problems. Among them, the intricate dependency relationships between test case function points and the difficulty in clearly defining optimization goals are particularly prominent. These challenges not only lead to low execution efficiency and difficulty in meeting the test coverage standard, but also increase unnecessary human and resource consumption during the testing process. Especially when dealing with a large number of test cases, how to efficiently organize and optimize the test execution order to ensure both wide test coverage and efficient operation has become an important technical problem that needs to be solved urgently.

[0003] When the prior art deals with the optimization of software test case execution order, the main drawback is that it cannot effectively identify and manage the complex dependency relationships between test cases, thereby greatly reducing the efficiency and effectiveness of test path planning. Specifically, traditional sorting methods often ignore the preconditions and execution order constraints of function points in test cases, resulting in a lack of systematicness and optimization in the execution path. This not only increases unnecessary human and resource consumption during the testing process, but also may miss key test scenarios due to improper execution order, or repeat similar test cases during the testing process, wasting testing time. Summary of the Invention

[0004] The main purpose of this application is to provide a method, device, computer-readable storage medium, and electronic device for generating a test case execution path set, so as to at least solve the problem that the prior art is difficult to effectively identify and manage the complex dependency relationships between test cases, resulting in low efficiency of test path planning.

[0005] To achieve the above object, according to one aspect of the present application, there is provided a method for generating a test case execution path set, including: obtaining a test case, extracting function points in the test case by using natural language processing technology, identifying key entities of the test case, and determining an association relationship between the function points and the key entities to obtain a function point-attribute mapping table, where the key entities include test data, expected results, and verification operations, and the attribute is responsible for storing the key entities and recording the constraint relationships between the test data and the verification operations and the function points; constructing a multi-cluster directed graph according to the function point-attribute mapping table, where the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges between the nodes and the directions of the edges; using a path solving algorithm to perform a traversal and solving process on the multi-cluster directed graph to determine multiple execution path sets of the test case.

[0006] Optionally, using a path solving algorithm to perform a traversal and solving process on the multi-cluster directed graph to determine the execution path set of the test case includes: using a path solving algorithm to perform a traversal and solving process on the multi-cluster directed graph to obtain a path set, where the path solving algorithm includes a heuristic algorithm and an approximation algorithm; using a path optimization algorithm to perform a merging and optimization process on the paths in the path set to obtain the execution path set of the test case, where the path optimization algorithm includes a path merging algorithm and a meta-heuristic algorithm.

[0007] Optionally, constructing a multi-cluster directed graph according to the function point-attribute mapping table includes: traversing each function point in the function point-attribute mapping table, for the first function point, creating an initial cluster and adding the first function point as the first node to the initial cluster, and during the traversal of the Nth function point, determining whether there is the constraint relationship between the Nth function point and each node in the existing clusters, where the existing clusters are the created clusters and N≥2; in the case of determining that there is the constraint relationship, adding the Nth function point to the existing cluster, or in the case of determining that there is no constraint relationship, creating a new cluster for the Nth function point; determining the connection relationship between each node according to the association relationship and the constraint relationship in the function point-attribute mapping table to obtain the multi-cluster directed graph.

[0008] Optionally, before determining the connection relationship between each node, the method further includes: determining the test data and verification operations of each node according to the function point-attribute mapping table, and constructing a function time stamp for each cluster, where the function time stamp is used to record the function execution order of the cluster.

[0009] Optionally, natural language processing technology is used to extract the function points in the test case, including: obtaining a preset lexical rule, and constructing a lexical analyzer by using the natural language processing technology and the preset lexical rule; inputting the test case into the lexical analyzer to obtain the function points in the test case.

[0010] Optionally, after determining multiple execution path sets of the test case, the method further includes: determining the total number of paths corresponding to each execution path set; determining an optimal execution path set according to the total number of paths.

[0011] Optionally, before using natural language processing technology to extract the function points in the test case, the method further includes: performing a preprocessing operation on the test case, where the preprocessing operation includes text cleaning and data standardization.

[0012] According to another aspect of the present application, there is provided a method for generating an execution path set of a test case, including: an acquisition unit, configured to acquire a test case, extract function points in the test case by using natural language processing technology, and identify key entities of the test case, and determine an association relationship between the function points and the key entities to obtain a function point-attribute mapping table, where the key entities include test data, expected results, and verification operations, and the attribute is responsible for storing the key entities and recording the constraint relationship between the test data and the verification operations and the function points; a construction unit, configured to construct a multi-cluster directed graph according to the function point-attribute mapping table, where the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges and the directions of the edges between the nodes; a processing unit, configured to perform a traversal and solution process on the multi-cluster directed graph by using a path solving algorithm to determine multiple execution path sets of the test case.

[0013] According to still another aspect of the present application, there is provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the methods for generating an execution path set of a test case.

[0014] According to yet another aspect of the present application, there is provided an electronic device, including: one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any one of the methods for generating an execution path set of a test case.

[0015] Applying the technical solution of the present application, test cases are obtained, function points in the test cases are extracted by using natural language processing technology, key entities of the test cases are identified, and the association relationship between the function points and the key entities is determined to obtain a function point-attribute mapping table, where the key entities include test data, expected results, and verification operations, and the attributes are responsible for storing the key entities and recording the constraint relationships between the test data and verification operations and the function points; a multi-cluster directed graph is constructed according to the function point-attribute mapping table, where the function points are used as the nodes of the multi-cluster directed graph, and the attributes are used as the edges and the directions of the edges between the nodes; a path solving algorithm is used to traverse and solve the multi-cluster directed graph to determine multiple execution path sets of the test cases. Through the combination of natural language processing technology and the multi-cluster directed graph, the function points and key entities in the test cases can be accurately extracted, the association relationships and constraint relationships between the function points can be automatically constructed, and then the execution path sets of the test cases can be generated, which not only improves the efficiency and accuracy of test case analysis, but also can reduce redundant paths through the path optimization algorithm to ensure the comprehensiveness and effectiveness of test coverage. This solution can significantly reduce the execution time of test cases, improve the efficiency and quality of software testing, and is especially suitable for the automated testing scenario of large-scale software systems. It solves the problem that it is difficult to effectively identify and manage the complex dependency relationships between test cases in the prior art, resulting in low efficiency of test path planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0017] Figure 1 The hardware structure block diagram of a mobile terminal showing a method for generating an execution path set of test cases provided in an embodiment of the present application is shown;

[0018] Figure 2 The flowchart showing a method for generating an execution path set of test cases provided in an embodiment of the present application is shown;

[0019] Figure 3 The flowchart showing a specific method for generating an execution path set of test cases provided in an embodiment of the present application is shown;

[0020] Figure 4 The flowchart of the function point extraction module provided in an embodiment of the present application is shown;

[0021] Figure 5 The flowchart for generating a function point-attribute mapping table provided in an embodiment of the present application is shown;

[0022] Figure 6Shows a flowchart for constructing a multi-cluster directed graph provided according to an embodiment of the present application;

[0023] Figure 7 Shows an example graph of a multi-cluster directed graph provided according to an embodiment of the present application;

[0024] Figure 8 Shows a clustering flowchart of a multi-cluster directed graph provided according to an embodiment of the present application;

[0025] Figure 9 Shows a flowchart for determining the edges and directions of a single directed graph provided according to an embodiment of the present application;

[0026] Figure 10 Shows a flowchart for generating a test case execution path set provided according to an embodiment of the present application;

[0027] Figure 11 Shows a structural block diagram of a device for generating a test case execution path set provided according to an embodiment of the present application.

[0028] Among them, the above-mentioned drawings include the following reference numerals:

[0029] 102, processor; 104, memory; 106, transmission device; 108, input / output device. Detailed implementation manners

[0030] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0032] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of the present application described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0033] For the convenience of description, some nouns or terms related to the embodiments of this application are described below:

[0034] Natural Language Processing (NLP): A technology that uses a computer to understand, analyze, generate and process the natural language used by human beings for communication. In this patent, it is used for text extraction and text comparison to help the machine understand and process the text data of human language.

[0035] Semantic analysis: Based on other sub-fields of natural language processing such as part-of-speech tagging and named entity recognition, it maps the surface structure of language to the semantic structure, enabling the computer to understand the actual meaning of natural language.

[0036] Multi-cluster directed graph: Composed of multiple directed graphs, with connections between nodes and edges inside each directed graph. One node corresponds to one test case, and each node has multiple attributes, recording the constraint relationships between test cases. The direction of the edge records the execution order of test cases.

[0037] Key entity: A word or phrase with a specific meaning in the text, which can represent an entity object in the real world. The key entities in this patent specifically refer to the entities that are of great significance in test cases, such as test data, expected results, verification operations, etc. These entities are the key information for function point extraction and analysis, and are crucial for understanding and executing test cases.

[0038] Depth-first search algorithm: Starting from the root (or any node), search along the depth of the tree or graph until the target is reached or all nodes are traversed.

[0039] Path planning algorithm: By evaluating factors such as the cost, distance or time of different paths, select the optimal or sub-optimal path from the starting point to the ending point to meet specific requirements. In this patent, it is used to plan the execution path of test cases.

[0040] Lexical analyzer: Scan and read the use case text according to the predefined lexical rules, decompose it into individual meaningful phrases, mark them, and extract functional points.

[0041] Functional time stamp: Extract information from the operation steps of the test case, record the execution order of each function in the cluster, and clarify the dependency relationships and test sequence of different functions (such as operations like addition, query, modification, deletion, etc.).

[0042] Heuristic algorithm: Give a feasible solution to the combinatorial optimization problem to be solved at an acceptable cost (referring to computing time and space), which is an algorithm based on experience or intuition rather than a strictly optimal solution.

[0043] Meta-heuristic algorithm: Solve complex optimization problems by simulating natural or social processes, such as simulated annealing, genetic algorithms, ant colony algorithms, etc. The meta-heuristic algorithm is an improvement of the heuristic algorithm and is the product of the combination of random algorithms and local search algorithms.

[0044] As introduced in the background art, it is difficult for the prior art to effectively identify and manage the complex dependency relationships between test cases, resulting in low efficiency of test path planning. To solve the problem that it is difficult for the prior art to effectively identify and manage the complex dependency relationships between test cases, resulting in low efficiency of test path planning, embodiments of the present application provide a method, device, computer-readable storage medium, and electronic device for generating a test case execution path set.

[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0046] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a method of generating a test case execution path set according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in Figure 1 a processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown, or have a different configuration from

[0047] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the test case execution path set generation method in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0048] In this embodiment, a test case execution path set generation method running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0049] Figure 2 is a flowchart of the test case execution path set generation method according to the embodiments of the present application. As Figure 2 shown, the method includes the following steps:

[0050] Step S201, obtain a test case, extract function points in the above test case by using natural language processing technology, and identify key entities of the above test case, and determine the association relationship between the above function points and the above key entities to obtain a function point-attribute mapping table, where the above key entities include test data, expected results, and verification operations, and the attribute is responsible for storing the above key entities and recording the constraint relationship between the above test data and the above verification operations and function points;

[0051] Among them, the constraint relationships of test cases in requirements are mainly reflected in whether the test data can be reused, whether the preconditions are consistent, and whether the expected results can be converted.

[0052] Specifically, the lexical analysis for extracting verification function points is responsible for extracting the test function points verified by test cases. This information is mainly included in the test outline and verification key points in the test cases. Lexical analysis needs to first define lexical rules, and then construct a lexical analyzer according to the lexical rules to identify the input test cases, and tokenize, annotate, and extract function point information according to the defined lexical rules. Identifying key entities is responsible for identifying key information such as test data, expected results, and verification operations in test cases, and storing this information in the attributes of the corresponding function points extracted from the test cases as the judgment conditions for the multi-cluster directed graph. Identifying key entities first requires defining key entities and using entity recognition tools to identify named entities in the text to obtain the key information of test cases. The relationship extraction to generate the function point-attribute mapping table is responsible for maintaining the mapping relationship between function points and key entities in real time. The table records information such as the function point information, test data, preconditions, expected results, and verification operations of this test case. The function point-attribute mapping table first binds the one-to-one correspondence between test cases and function points, and then sequentially determines whether there are constraint relationships in the information of key entities. After marking the entity information according to the judgment results, it is stored as an attribute in the function points. The constraint relationships of entity information include whether the test data can be reused, whether the preconditions have changed, whether the expected results have changed, etc. This constraint relationship can be maintained and updated according to actual needs. The more constraint relationships there are, the better the generated execution path set performs.

[0053] Step S202, construct a multi-cluster directed graph according to the above function point-attribute mapping table. Among them, use the above function points as the nodes of the above multi-cluster directed graph, and use the above attributes as the edges and the directions of the edges between the above nodes;

[0054] Specifically, through function point extraction and multi-cluster directed graph construction, it intuitively records and effectively manages the conditional or process constraint relationships between test cases, helps testers quickly and comprehensively master the complex dependency relationships between various function points, and improves the accuracy and quality of testing.

[0055] Step S203, use a path solving algorithm to traverse and solve the above multi-cluster directed graph to determine multiple execution path sets of the above test cases.

[0056] Specifically, innovatively transform the problem of optimizing the execution order of test cases in requirements into a classic path optimization problem, introduce a mature dynamic programming algorithm for solving to optimize the test execution order, reduce the labor and resource costs consumed by test execution, and improve the test execution efficiency.

[0057] Through this embodiment, test cases are obtained, function points in the test cases are extracted by using natural language processing technology, key entities of the test cases are identified, and the association relationship between the function points and the key entities is determined to obtain a function point-attribute mapping table. The key entities include test data, expected results, and verification operations. The attributes are responsible for storing the key entities and recording the constraint relationships between the test data and verification operations and the function points. A multi-cluster directed graph is constructed according to the function point-attribute mapping table. In the multi-cluster directed graph, the function points are used as nodes, and the attributes are used as the edges and the directions of the edges between the nodes. A path solving algorithm is used to traverse and solve the multi-cluster directed graph to determine multiple execution path sets of the test cases. By combining natural language processing technology with the multi-cluster directed graph, the function points and key entities in the test cases can be accurately extracted, the association relationships and constraint relationships between the function points can be automatically constructed, and then the execution path sets of the test cases can be generated. This not only improves the efficiency and accuracy of test case analysis, but also can reduce redundant paths through a path optimization algorithm to ensure the comprehensiveness and effectiveness of test coverage. This solution can significantly reduce the execution time of test cases, improve the efficiency and quality of software testing, and is especially suitable for the automated testing scenario of large-scale software systems. It solves the problem that it is difficult to effectively identify and manage the complex dependency relationships between test cases in the prior art, resulting in low efficiency of test path planning.

[0058] In the specific implementation process, a path solving algorithm is used to traverse and solve the above multi-cluster directed graph to determine the execution path set of the above test cases, including: using a path solving algorithm to traverse and solve the above multi-cluster directed graph to obtain a path set, where the above path solving algorithm includes a heuristic algorithm and an approximation algorithm; using a path optimization algorithm to merge and optimize the paths in the above path set to obtain the above execution path set of the above test cases, where the above path optimization algorithm includes a path merging algorithm and a meta-heuristic algorithm.

[0059] This method traverses the multi-cluster directed graph, performs path planning on each directed graph, and takes covering all nodes in the directed graph as a prerequisite and the minimum number of paths as the goal to solve the dynamic programming problem. This problem is a typical NP-hard problem, and usually a heuristic algorithm or an approximation algorithm can be used to solve it. The generated path set may contain many unnecessary paths or detours. Therefore, it is necessary to optimize the path set by means of merging paths, meta-heuristic algorithms, etc. to reduce the total number of paths. The finally output path set is the test case execution order set corresponding to this requirement. The path optimization algorithm can reduce the redundant paths in the path set and improve the test efficiency, and is applicable to the scenario where it is necessary to optimize the test path and reduce the test time.

[0060] Specifically, construct a multi-cluster directed graph according to the above function point-attribute mapping table, including: traversing each of the above function points in the function point-attribute mapping table. For the first function point, create an initial cluster and add the above first function point as the first node to the above initial cluster. During the process of traversing the Nth function point, determine whether there is the above constraint relationship between the Nth function point and each of the above nodes in the existing clusters, where the above existing clusters are the created clusters and N≥2; in the case of determining that there is the above constraint relationship, add the Nth function point to the above existing cluster, or in the case of determining that there is no such constraint relationship, create a new cluster for the Nth function point; determine the connection relationship between each of the above nodes according to the above association relationship and the above constraint relationship in the function point-attribute mapping table to obtain the above multi-cluster directed graph.

[0061] This method can effectively organize function points, avoid conflicts between function points, and is applicable to test scenarios that need to consider the constraint relationship of function points. When there is a constraint relationship, add the Nth function point to the existing cluster; when there is no constraint relationship, create a new cluster for the Nth function point; in this way, a more reasonable and efficient multi-cluster directed graph can be constructed, which is applicable to scenarios that need to dynamically adjust the execution path of test cases. Determine the connection relationship between nodes according to the association relationship and the constraint relationship in the function point-attribute mapping table to obtain a multi-cluster directed graph; this method can clearly display the association and constraint between function points, provide an intuitive basis for generating the execution path of test cases, and is applicable to test scenarios that need to analyze the complex relationship between function points.

[0062] More specifically, before determining the connection relationship between each of the above nodes, the above method further includes: determining the test data and verification operations of each of the above nodes according to the above function point-attribute mapping table, and constructing the function time stamps of each cluster, where the above function time stamps are used to record the function execution order of the above cluster.

[0063] This method constructs function time stamps according to the verification operations and test step information extracted from the node attributes in the cluster, and is responsible for recording the function execution order of the cluster, such as add -> query -> modify -> delete. According to the corresponding relationship between function points and function time stamps, the initial distribution order of nodes in the cluster can be realized, so that the nodes for verifying the same function are distributed at the same level. The nodes in the upper level can directly point to the edges of the nodes in the lower level. For nodes at the same level, such as add success and add failure, further judge the direction of the edges between each node at the same level according to the information of whether the test data in the node attributes can be reused and whether the expected result status changes.

[0064] Extract the conditional or process constraint relationships between recorded test cases through semantic analysis, supplemented by the construction of functional time stubs and multi-cluster directed graphs, and automatically generate the optimal test execution path. This can provide a scientific and reasonable test case execution path for test executors, which can not only ensure test coverage, improve test quality, but also avoid redundant tests and thus improve test efficiency.

[0065] Furthermore, adopt natural language processing technology to extract the function points in the above test cases, including: obtaining the preset lexical rules, and constructing a lexical analyzer by using the above natural language processing technology and the above preset lexical rules; inputting the above test cases into the above lexical analyzer to obtain the above function points in the above test cases.

[0066] The construction of the lexical analyzer of this method can improve the accuracy and efficiency of function point extraction, and is applicable to scenarios that need to process a large number of test cases described in natural language. Input the test cases into the lexical analyzer to obtain function points; through the lexical analyzer, the function points in the test cases can be automatically identified and extracted, which is applicable to scenarios that need to automate the processing of test cases, such as continuous integration and automated test environments.

[0067] Furthermore, after determining multiple execution path sets of the above test cases, the above method further includes: determining the total number of paths corresponding to each of the above execution path sets; determining the optimal execution path set according to the above total number of paths.

[0068] The determination of the total number of paths of this method can provide a quantitative index for the execution of test cases, and is applicable to scenarios that need to evaluate the execution efficiency of test cases. Determine the optimal execution path set according to the total number of paths; the determination of the optimal execution path set can improve the efficiency and effect of testing, and is applicable to scenarios that need to execute as comprehensive a test as possible under limited resources.

[0069] Specifically, before adopting natural language processing technology to extract the function points in the above test cases, the above method further includes: performing a preprocessing operation on the above test cases, where the above preprocessing operation includes text cleaning and data standardization.

[0070] The preprocessing operation of this method includes two operations: text cleaning and data standardization, so as to perform subsequent semantic analysis. Text cleaning is responsible for screening redundant data in test cases, such as authors, design times, review times, etc., and retaining high-value text information. Data standardization is responsible for converting the cleaned data into a unified format and standard, which is convenient for computer processing. The preprocessing operation can improve the accuracy and efficiency of test case analysis, and is applicable to test scenarios that need to process dirty data or non-standard data.

[0071] To enable those skilled in the art to more clearly understand the technical solution of this application, the implementation process of the test case execution path set generation method of this application will be described in detail below in combination with specific embodiments.

[0072] 1). For the requirements of large-scale new projects in the waterfall model, there are often situations such as long development cycles, large time spans from design to execution of testing, and differences between use case designers and executors, which increase the complexity of test execution and thus affect test quality.

[0073] Through the function point extraction and multi-cluster directed graph construction module, the present invention visually records and effectively manages the conditional or process constraint relationships between test cases, enabling test executors to quickly master the logical associations between function points of the system under test, thereby improving the accuracy and quality of test execution.

[0074] 2). For the first full-scale test of newly added system requirements, the number of test cases is often extremely large. Without reasonable planning, a large amount of human and resource costs will be consumed on inefficient non-optimal test paths. The present invention introduces a path set planning module and adopts a dynamic programming algorithm to optimize the test execution order, effectively improving the test execution efficiency.

[0075] 3). Manually optimizing the test case execution order has high requirements for the professional skills, business understanding ability, and familiarity with the system of testers, which easily leads to chaos in the execution order and omission of key test scenarios. The present invention automatically generates and selects the optimal test execution path through dynamic programming, ensuring the orderly progress and comprehensiveness of the test process.

[0076] 4). In full-scale testing, due to the lack of systematic planning in test execution, defects in some key test scenarios may not be discovered until the later stage of the test cycle, affecting the repair timing of software development and the overall progress of the project. The test case execution paths generated by the present invention help to detect more function points or business rules earlier by prioritizing use cases with a precondition paving effect, thereby discovering potential defects earlier.

[0077] This embodiment relates to a specific test case execution path set generation method. As Figure 3 shown, the test case execution path set generation system mainly includes three modules: a function point extraction module, a multi-cluster directed graph construction module, and a path set planning module.

[0078] Based on the mapping relationship between test cases and verification function points, the function point extraction module uses natural language processing (NLP) technology to understand the verification objectives and operations described in test cases, and extracts the function points to be verified in test cases through semantic analysis and semantic extraction techniques, and establishes a one-to-one correspondence with the test cases.

[0079] Based on the constraint relationships between the functional points of test cases, the multi-cluster directed graph construction module extracts the sequential constraint relationships between test steps and expected results in test cases through semantic analysis technology, and points to the functional points formed in the functional point extraction module, thereby constructing a directed graph of functional points with potential constraint relationships, and sequentially adding the remaining test cases to the directed graph construction until all test cases in this requirement are traversed.

[0080] The path set planning module aims to perform a depth traversal on the multi-cluster directed graph using the dynamic programming method. Its objective function is to minimize the total number of paths, with the prerequisite of covering all nodes in the directed graph and minimizing the required number of paths. The module uses heuristic or approximate algorithms to generate all feasible test case execution paths. Subsequently, the path set is optimized through methods such as path merging and meta-heuristic algorithms to find the optimal solution, that is, the set with the minimum number of paths.

[0081] In this embodiment, the problem of optimizing the execution order of test cases in the requirement is transformed into a classical path optimization problem, and this problem is solved based on the idea of dynamic programming to generate an execution path set of test cases. This method first traverses the test cases in the requirement through the functional point extraction module, uses natural language processing technology to extract the verification function information of each test case one by one, and stores it in the functional point set. The multi-cluster directed graph construction module then maps to the functional point set according to the test steps and expected results of the test cases to generate multiple directed graphs, recording the constraint relationships between functional points in this requirement. The path set planning module uses the path planning algorithm with the minimum number of paths as the optimization goal to generate the optimal execution path of the test cases in this requirement.

[0082] The detailed working flowchart of the functional point extraction module is as Figure 4 shown, mainly consisting of four parts: test case preprocessing, lexical analysis to extract verification functional points, identifying key entities, and relationship extraction to generate a functional point-attribute mapping set.

[0083] The functional point extraction module is mainly used to traverse the test cases in the requirement one by one, and uses natural language processing technology to extract the functional points of the test cases, identify key entities, and extract the relationships between functional points and entities in the test cases to generate a functional point-attribute set. The attribute is responsible for storing key entities, recording the test data, expected results of this functional point, and the constraint relationships between the verification operations and the functional points.

[0084] (1) The test case preprocessing is responsible for preprocessing the test cases, including two operations: text cleaning and data standardization, in order to perform subsequent semantic analysis. Text cleaning is responsible for screening redundant data in the test cases, such as the author, design time, review time, etc., and retaining high-value text information. Data standardization is responsible for converting the cleaned data into a unified format and standard for convenient computer processing.

[0085] (2) The lexical analysis for extracting verification function points is responsible for extracting the test function points verified by the test cases. This information is mainly contained in the test outline and verification key points in the test cases. Lexical analysis needs to first define lexical rules, and then construct a lexical analyzer according to the lexical rules to identify the input test cases, and tokenize, annotate, and extract function point information according to the defined lexical rules.

[0086] (3) Identifying key entities is responsible for identifying key information such as test data, expected results, and verification operations in the test cases, and storing this information in the attributes of the corresponding function points extracted from the test cases, as the judgment conditions for the multi-cluster directed graph. To identify key entities, it is first necessary to define key entities and use entity recognition tools to identify named entities in the text to obtain the key information of the test cases.

[0087] (4) The relationship extraction to generate the function point - attribute mapping table is responsible for maintaining the mapping relationship between function points and key entities in real time. The table records information such as function point information, test data, preconditions, expected results, and verification operations of this test case. As Figure 5 shown, the function point - attribute mapping table first binds the one-to-one correspondence between the test case and the function point, and then sequentially determines whether there are constraint relationships in the information of the key entities. After marking the entity information according to the judgment results, it is stored as an attribute in the function point. The constraint relationships of entity information include whether the test data can be reused, whether the preconditions have changed, whether the expected results have changed, etc. This constraint relationship can be maintained and updated according to actual needs. The more constraint relationships there are, the better the generated execution path set performs.

[0088] The detailed workflow diagram of the multi-cluster directed graph construction module is as Figure 6 shown, mainly consisting of defining the nodes of the multi-cluster directed graph, constructing the edges and directions of a single directed graph, and generating the multi-cluster directed Figure 3 part.

[0089] The multi-cluster directed graph construction module defines the function points of the test cases in the requirements as the nodes of the directed graph, and determines the number of directed graphs through clustering operations. The number of clusters is also the number of directed graphs generated in this requirement. In a single cluster, this module determines the edges and directions between nodes according to the attributes in the function point - attribute mapping table, thereby generating a single directed graph, and traversing the entire cluster until the construction of the multi-cluster directed graph is completed. After the construction of the multi-cluster directedFigure 1 The general schematic diagram is as follows Figure 7 shown.

[0090] (1) Defining the nodes of the multi-cluster directed graph mainly involves using the function point-attribute mapping table set output by the function point extraction module as the set of nodes, defined as {n 0 , n 1 ,..., n m-1}, where m - 1 represents the number of test cases in the requirement. The attributes of each node can be expressed as {a 0 , a 1 ,..., a y-1}, where y - 1 represents the number of defined attributes. The clustering operation of the nodes is as shown in Figure 8 . When traversing the nodes of the directed graph for the first time, the first node can directly create a new cluster. For subsequent traversals, it is necessary to determine whether there is a constraint relationship between the new node and the existing clusters. The existence of a constraint relationship means that there is a sequential execution constraint relationship between the new node and the nodes in the existing clusters. If there is no constraint relationship, it means that the execution order of the new node and the nodes in the existing clusters does not affect the overall execution efficiency. For the case where there are multiple existing clusters, it is necessary to determine whether there is a constraint relationship between the new node and each existing cluster in turn.

[0091] (2) Constructing the edges and directions of a single directed graph mainly involves determining whether there are edges between functional nodes and determining the directions of the edges by judging the constraint relationships of functional point attributes. Generally speaking, the constraint relationships in the test cases of the requirement are mainly reflected in whether the test data can be reused, whether the preconditions are consistent, and whether the expected results can be converted. As shown in Figure 9 , the process of determining the edges and directions of a single directed graph is introduced.

[0092] To determine the edges and directions, first, according to the verification operations and test step information extracted from the node attributes in the cluster, a functional time stamp is constructed, which is responsible for recording the functional execution order of the cluster, such as add -> query -> modify -> delete. According to the correspondence between the function points and the functional time stamp, the initial distribution order of the nodes in the cluster can be realized, so that the nodes verifying the same function are distributed at the same level. The nodes at the upper level can directly point to the edges of the nodes at the lower level. For the nodes at the same level, such as add success and add failure, according to the information of whether the test data can be reused and whether the expected result status changes in the node attributes, the directions of the edges between each node at the same level are further determined.

[0093] (3) The main function of generating the multi-cluster directed graph is to traverse each cluster, determine the edges and directions of a single directed graph in each cluster until all the test cases in the requirement are covered.

[0094] The detailed workflow diagram of the path set planning module is as shown in Figure 10As shown in the figure, the path set planning module traverses the multi-cluster directed graph, performs path planning on each directed graph, and solves the dynamic programming problem with the premise of covering all nodes in the directed graph and the goal of minimizing the number of paths. This problem is a typical NP-hard problem, and usually, it can be solved by using heuristic algorithms or approximation algorithms. The generated path set may contain many unnecessary paths or detours. Therefore, it is necessary to optimize the path set by means of merging paths, meta-heuristic algorithms, etc., to reduce the total number of paths. The path set output by the path set planning module is the set of test case execution orders corresponding to this requirement.

[0095] In this embodiment, by mapping the execution steps and conditional constraint relationships of test cases onto a multi-cluster directed graph and adopting dynamic path planning technology, the complex test case execution sorting problem is transformed into a classic path optimization problem, providing a new solution for solving the test case execution priority problem, effectively avoiding invalid redundant tests, and improving the test efficiency of testers. By proposing the concept of a function point-attribute mapping table, the function information in this requirement and the constraint information between corresponding test cases are recorded, intuitively showing the constraint relationships of test cases. Testers can quickly understand the potential constraints of test cases in the requirement according to the function point-attribute mapping table, confirm the edges of the graph according to the function point corresponding to the graph node and the constraint information, so as to complete the construction of the multi-cluster directed graph and record the potential execution order information between test cases. Through the concept of function time stamps, the basic execution order and main test process of a single directed graph are recorded, which is mainly used for initially allocating the execution paths of test cases and accelerating the rapid construction of the multi-cluster directed graph. This embodiment proposes a multi-cluster directed graph, which intuitively represents the conditional dependency relationships of different test function points and test cases in the form of nodes and edges, showing the interaction relationships between software functions. This enables testers to quickly grasp the logical connections between operation steps under each function point based on the multi-cluster directed graph, deepen the understanding of the overall system, and improve the accuracy and quality of testing.

[0096] The embodiment of the present application also provides a test case execution path set generation device. It should be noted that the test case execution path set generation device of the embodiment of the present application can be used to execute the method for generating a test case execution path set provided by the embodiment of the present application. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0097] The following introduces the test case execution path set generation device provided by the embodiment of the present application.

[0098] Figure 11It is a schematic diagram of a test case execution path set generation device according to an embodiment of the present application. As Figure 11 shown, the device includes:

[0099] An acquisition unit 1101, configured to acquire a test case, extract function points in the test case by using natural language processing technology, identify key entities of the test case, and determine an association relationship between the function points and the key entities to obtain a function point-attribute mapping table, where the key entities include test data, expected results, and verification operations, and the attribute is responsible for storing the key entities and recording a constraint relationship between the test data and the verification operations and the function points;

[0100] A construction unit 1102, configured to construct a multi-cluster directed graph according to the function point-attribute mapping table, where the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges and the directions of the edges between the nodes;

[0101] A processing unit 1103, configured to perform a traversal and solution process on the multi-cluster directed graph by using a path solving algorithm to determine multiple execution path sets of the test case.

[0102] In this embodiment, the acquisition unit is configured to acquire a test case, extract function points in the test case by using natural language processing technology, identify key entities of the test case, and determine an association relationship between the function points and the key entities to obtain a function point-attribute mapping table, where the key entities include test data, expected results, and verification operations, and the attribute is responsible for storing the key entities and recording a constraint relationship between the test data and the verification operations and the function points; the construction unit is configured to construct a multi-cluster directed graph according to the function point-attribute mapping table, where the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges and the directions of the edges between the nodes; the processing unit is configured to perform a traversal and solution process on the multi-cluster directed graph by using a path solving algorithm to determine multiple execution path sets of the test case.

[0103] As an optional solution, the processing unit includes a solution processing module and a merging and optimization processing module; the solution processing module is configured to perform a traversal and solution process on the multi-cluster directed graph by using a path solving algorithm to obtain a path set, where the path solving algorithm includes a heuristic algorithm and an approximation algorithm; the merging and optimization processing module is configured to perform a merging and optimization process on the paths in the path set by using a path optimization algorithm to obtain the execution path set of the test case, where the path optimization algorithm includes a path merging algorithm and a meta-heuristic algorithm.

[0104] An alternative solution is that the construction unit includes a traversal module, a first determination module, and a second determination module. The traversal module is used to traverse each of the above function points in the function point-attribute mapping table. For the first function point, an initial cluster is created, and the above first function point is added as the first node to the above initial cluster. During the process of traversing the Nth function point, it is determined whether there is the above constraint relationship between the Nth function point and each of the above nodes in the existing clusters, where the above existing clusters are the created clusters and N≥2. The first determination module is used to, when it is determined that there is the above constraint relationship, add the Nth function point to the above existing cluster, or, when it is determined that there is no such constraint relationship, create a new cluster for the Nth function point. The second determination module is used to determine the connection relationship between each of the above nodes according to the above association relationship and the above constraint relationship in the function point-attribute mapping table, so as to obtain the above multi-cluster directed graph.

[0105] An alternative solution is that the construction unit further includes a third determination module, which is used to, before determining the connection relationship between each of the above nodes, determine the test data and verification operations of each of the above nodes according to the function point-attribute mapping table, and construct the function time stamps of each cluster, where the above function time stamps are used to record the function execution order of the above clusters.

[0106] An alternative solution is that the acquisition unit includes an acquisition module and an input module. The acquisition module is used to acquire a preset lexical rule and construct a lexical analyzer by using the above natural language processing technology and the above preset lexical rule. The input module is used to input the above test case into the above lexical analyzer to obtain the above function points in the above test case.

[0107] An alternative solution is that the device further includes a fourth determination module and a fifth determination module. The fourth determination module is used to determine the total number of paths corresponding to each of the above execution path sets after determining the multiple execution path sets of the above test case. The fifth determination module is used to determine the optimal execution path set according to the above total number of paths.

[0108] An alternative solution is that the device further includes a preprocessing operation unit, which is used to perform a preprocessing operation on the above test case before extracting the function points in the above test case by using natural language processing technology, where the above preprocessing operation includes text cleaning and data standardization.

[0109] The above test case execution path set generation device includes a processor and a memory. The above acquisition unit, construction unit, and processing unit, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement the corresponding functions. The above modules are all located in the same processor; or, the above each module is located in different processors in any combination form.

[0110] The processor contains cores, and the cores retrieve corresponding program units from the memory. One or more cores can be set, and by adjusting the core parameters, the problem that it is difficult to effectively identify and manage the complex dependencies between test cases in the prior art, resulting in low efficiency of test path planning, can be solved.

[0111] The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0112] An embodiment of the present invention provides a computer-readable storage medium. The above computer-readable storage medium includes a stored program. Wherein, when the above program runs, it controls the device where the above computer-readable storage medium is located to execute the above test case execution path set generation method.

[0113] An embodiment of the present invention provides a processor. The above processor is used to run a program. Wherein, when the above program runs, it executes the above test case execution path set generation method.

[0114] An embodiment of the present invention provides an electronic device. The device includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements at least the steps of the above test case execution path set generation method. The device herein can be a server, a PC, a PAD, a mobile phone, etc.

[0115] This application also provides a computer program product. When executed on a data processing device, it is adapted to execute a program initialized with at least the steps of the above test case execution path set generation method.

[0116] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented with program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.

[0117] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0118] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0119] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0121] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0122] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0123] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0124] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0125] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating a test case execution path set, characterized in that: include: Acquire a test case, extract function points in the test case using natural language processing technology, identify key entities of the test case, and determine the association relationship between the function points and the key entities, and obtain a function point-attribute mapping table, wherein the key entity includes test data, expected results, and verification operations, and the attributes are responsible for storing the key entities and recording the constraint relationship between the test data and the verification operation and the function points; Constructing a multi-cluster directed graph according to the function point-attribute mapping table, wherein the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges between the nodes and directions of the edges; A path solving algorithm is used to traverse and solve the multi-cluster directed graph to determine multiple execution path sets of the test case.

2. The method according to claim 1, characterized in that The multi-cluster directed graph is traversed and solved by using a path solving algorithm to determine an execution path set of the test case, including: Using a path solving algorithm to traverse and solve the multi-cluster directed graph to obtain a path set, wherein the path solving algorithm includes a heuristic algorithm and an approximate algorithm; A path optimization algorithm is used to merge and optimize the paths in the path set to obtain the execution path set of the test case, wherein the path optimization algorithm includes a path merging algorithm and a meta-heuristic algorithm.

3. The method according to claim 1, characterized in that Constructing a multi-cluster directed graph according to the function point-attribute mapping table includes: Traversing each of the function points in the function point-attribute mapping table, creating an initial cluster for a first function point, and adding the first function point as a first node to the initial cluster, and in the process of traversing the Nth function point, determining whether the Nth function point has the constraint relationship with each of the nodes in the existing cluster, wherein the existing cluster is a created cluster, and N≥2; If it is determined that the constraint relationship exists, adding the Nth function point to the existing cluster, or if it is determined that the constraint relationship does not exist, creating a new cluster for the Nth function point; According to the association relationship and the constraint relationship in the function point-attribute mapping table, the connection relationship between the nodes is determined to obtain the multi-cluster directed graph.

4. The method according to claim 3, characterized in that Before determining the connection relationship between the nodes, the method further includes: According to the function point-attribute mapping table, the test data and verification operation of each node are determined, and the function time pile of each cluster is constructed, wherein the function time pile is used to record the function execution order of the cluster.

5. The method according to claim 1, characterized in that The natural language processing technology is used to extract the functional points in the test case, including: Acquire preset lexical rules, and construct a lexical analyzer using the natural language processing technology and the preset lexical rules; The test case is input into the lexical analyzer to obtain the functional points in the test case.

6. The method according to claim 1, characterized in that After determining a plurality of execution path sets of the test case, the method further comprises: Determine the total number of paths corresponding to each of the execution path sets; An optimal execution path set is determined according to the total number of paths.

7. The method according to any one of claims 1 to 6, characterized in that Before extracting the functional points in the test case using natural language processing technology, the method further includes: A preprocessing operation is performed on the test case, wherein the preprocessing operation includes text cleaning and data standardization.

8. A method for generating a test case execution path set, characterized in that: include: An acquisition unit is used to acquire a test case, extract function points in the test case using natural language processing technology, identify key entities of the test case, and determine the association relationship between the function points and the key entities to obtain a function point-attribute mapping table, wherein the key entity includes test data, expected results, and verification operations, and the attributes are responsible for storing the key entities and recording the constraint relationship between the test data and the verification operation and the function points; A construction unit, configured to construct a multi-cluster directed graph according to the function point-attribute mapping table, wherein the function points are used as nodes of the multi-cluster directed graph, and the attributes are used as edges between the nodes and directions of the edges; The processing unit is used to use a path solving algorithm to traverse and solve the multi-cluster directed graph to determine multiple execution path sets of the test case.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the test case execution path set generation method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing a test case execution path set generation method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Technology transfer industry chain management method and system adopting dynamic matching algorithm

    CN120707341A

  • A technology transfer supply chain management method and system employing a dynamic matching algorithm

    CN120707341B

  • E2E scene test optimization method and system based on target man-machine cooperation

    CN121387710A

  • Target human-computer cooperation-based e2e scene test optimization method and system

    CN121387710B