Test methods, apparatus, equipment and media

By constructing a test script knowledge graph, analyzing and optimizing the automated testing process, the problem of low testing efficiency in complex systems was solved, and efficient test execution was achieved.

CN115687076BActive Publication Date: 2025-10-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210971380.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-10-28
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

As application system functions increase, the probability of automated test execution failures increases, resulting in longer test execution times and lower test execution efficiency, making it difficult to meet actual testing needs.

Method used

By constructing a test script knowledge graph, we can determine the clustering relationships of test scripts that fail to execute, filter out other test scripts with the same attributes, optimize the test process, avoid test processes that fail to execute, and improve test efficiency.

Benefits of technology

By analyzing the clustering relationships of test scripts, the testing process was optimized, which improved the success rate and efficiency of testing, reduced testing time, and enhanced the overall testing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687076B_ABST
    Figure CN115687076B_ABST
Patent Text Reader

Abstract

This disclosure provides a testing method applicable to the fields of artificial intelligence, computer science, and software testing. The method includes: determining a first target test script based on the execution result of a test script obtained from an initial testing process; querying a test script knowledge graph for a second target test script that has a clustering relationship with the first target test script based on the script name of the first target test script; determining a target latency test process containing the first target test script and / or the second target test script from a set of candidate test processes based on the script names of the first and second target test scripts; and executing other candidate test processes in the set of candidate test processes besides the target latency test process. This disclosure also provides a testing apparatus, device, storage medium, and program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of artificial intelligence, computer science, and software testing, and specifically to a testing method, apparatus, device, medium, and program product. Background Technology

[0002] In recent years, with the continuous application of automated testing technology, more and more enterprises have introduced automated testing tools to improve the quality of application system version testing. Automated testing technology is widely used in different testing phases such as unit testing, interface testing, integration testing, and acceptance testing.

[0003] However, as the functionality of application systems increases, the complexity of these systems increases significantly, leading to a higher probability of failure in automated testing. This results in longer execution times and lower efficiency, making it difficult to meet actual testing needs. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a test method, apparatus, device, medium and program product.

[0005] According to a first aspect of this disclosure, a testing method is provided, comprising:

[0006] Based on the test script execution results obtained from the initial test process, a first target test script is determined, wherein the first target test script is the first test script among the first test scripts used to execute the initial test process, and the execution failure rate is higher than a first preset threshold.

[0007] Based on the script name of the first target test script, query the test script knowledge graph for a second target test script that has a clustering relationship with the first target test script. The clustering relationship includes the first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and the second association relationship between the transaction information entity and the test error entity.

[0008] Based on the script names of the first target test script and the second target test script, a target latency test process containing the first target test script and / or the second target test script is determined from the candidate test process set; and

[0009] Execute other candidate test processes from the above candidate test process set, excluding the target delay test process mentioned above.

[0010] According to embodiments of this disclosure, the above-described test method further includes:

[0011] According to the preset extraction rules, test error entities, transaction information entities, and initial test script entities are extracted from the sample test execution information. Among them, the test error entities are used to describe the error information obtained after executing the sample test process.

[0012] Based on the call relationship between the transaction interface and the initial test script, the first association between the initial test script entity and the transaction information entity, and the second association between the transaction information entity and the test error entity are determined.

[0013] Based on the aforementioned test error entity, transaction information entity, initial test script entity, first association, and second association, the aforementioned test script knowledge graph is constructed.

[0014] According to embodiments of this disclosure, wherein,

[0015] The above-mentioned second target test scripts include N, where N is a positive integer greater than 1;

[0016] Based on the script name of the first target test script mentioned above, the second target test scripts that have a clustering relationship with the first target test script in the test script knowledge graph include:

[0017] Based on the script name of the first target test script, query the target execution failure information that caused the first target test script to fail in the execution results of the test script in the initial test process. The target execution failure information includes target test error information.

[0018] Based on the script name of the first target test script and the target test error information, the first target test script entity and the target test error entity are determined in the test script knowledge graph.

[0019] Based on the second association relationship of the target test error entity, the transaction information entity in the test script knowledge graph that has the second association relationship with the target test error entity is identified as the target transaction entity.

[0020] Based on the first association relationship of the target transaction entity, the initial test script entity in the test script knowledge graph that has the first association relationship with the target transaction entity is determined as the target clustering test script entity, and the target clustering test script entity set is obtained, wherein the first target test script entity is included in the target clustering test script entity set.

[0021] Using the first target test script entity described above, a second target test script entity is selected from the target clustering test script entity set; and

[0022] Based on the aforementioned second target test script entity, the aforementioned second target test script is determined.

[0023] According to embodiments of this disclosure, the above-described test method further includes:

[0024] Extract data error entities from the above sample test execution information, and the third association relationship between the above data error entities and the above initial test script entities; and

[0025] Based on the above-mentioned data error entities and the above-mentioned third relationship, the above-mentioned test script knowledge graph is updated to obtain a new test script knowledge graph.

[0026] According to embodiments of this disclosure, the above-mentioned clustering relationship also includes the above-mentioned third association relationship, and the above-mentioned target execution failure information also includes target data error information;

[0027] The process of querying the test script knowledge graph for a second target test script that has a clustering relationship with the first target test script, based on the script name of the first target test script, also includes:

[0028] Based on the above target data error information, the target data error entity is identified in the above new test script knowledge graph;

[0029] The initial test script entities in the new test script knowledge graph that have a third relationship with the target data error entity are identified as new target clustering test script entities, resulting in a new set of target clustering test script entities.

[0030] Using the aforementioned first target test script entity, new second target test script entities are selected from the new target clustering test script entity set; and

[0031] Based on the aforementioned new second target test script entity, determine the new second target test script.

[0032] According to embodiments of this disclosure, the above-described test method further includes:

[0033] Based on the test script execution results obtained from executing the above initial test process, a third target test script is determined, wherein the third target test script is the first test script used to execute the above initial test process, and the execution success rate is higher than the second preset threshold.

[0034] Based on the script name of the aforementioned third-objective test script, search the aforementioned test script knowledge graph for fourth-objective test scripts that have a clustering relationship with the aforementioned third-objective test script; and

[0035] Based on the script names of the third target test script and the fourth target test script, a target priority test process containing the third target test script and the fourth target test script is determined from the candidate test process set.

[0036] Among them, the other candidate test processes in the above-mentioned candidate test process set besides the target latency test process include:

[0037] Prioritize executing the target priority test process from the above candidate test process set.

[0038] According to an embodiment of this disclosure, the aforementioned test error entity includes: a log-type error entity and a UI-type error entity, wherein the log-type error entity and the UI-type error entity have an inclusion relationship, and the UI-type error entity and the aforementioned transaction information entity have the aforementioned first association relationship.

[0039] A second aspect of this disclosure provides a testing apparatus, comprising:

[0040] The first determining module is used to determine a first target test script based on the test script execution result obtained from the execution of the initial test process, wherein the first target test script is the first test script among the first test scripts used to execute the initial test process, and the execution failure rate is higher than a first preset threshold.

[0041] The query module is used to query the test script knowledge graph for a second target test script that has a clustering relationship with the first target test script based on the script name of the first target test script. The clustering relationship includes a first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and a second association relationship between the transaction information entity and the test error entity.

[0042] The second determining module is configured to determine, based on the script name of the first target test script and the script name of the second target test script, a target delay test process containing the first target test script and / or the second target test script from the candidate test process set; and

[0043] The execution module is used to execute other candidate test processes in the above candidate test process set, excluding the target delay test process mentioned above.

[0044] A third aspect of this disclosure provides an electronic device, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the test method described above.

[0045] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described test method.

[0046] A fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described test method. Attached Figure Description

[0047] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0048] Figure 1 This diagram illustrates an application scenario of the testing method and apparatus according to embodiments of the present disclosure.

[0049] Figure 2 A flowchart illustrating a test method according to an embodiment of the present disclosure is shown schematically;

[0050] Figure 3 A flowchart illustrating a test method according to another embodiment of this disclosure is shown schematically;

[0051] Figure 4 This illustration schematically shows a flowchart of querying a second target test script that has a clustering relationship with the first target test script in a test script knowledge graph according to an embodiment of the present disclosure, based on the script name of the first target test script;

[0052] Figure 5 A schematic diagram of a test script knowledge graph according to an embodiment of the present disclosure is shown.

[0053] Figure 6 This schematically illustrates a flowchart of querying a second target test script that has a clustering relationship with the first target test script in a test script knowledge graph according to the script name of the first target test script, according to another embodiment of the present disclosure.

[0054] Figure 7 A schematic diagram of a test script knowledge graph according to another embodiment of the present disclosure is shown.

[0055] Figure 8 A flowchart illustrating a test method according to another embodiment of the present disclosure is shown schematically;

[0056] Figure 9 A schematic block diagram of a test apparatus according to an embodiment of the present disclosure is shown; and

[0057] Figure 10 A block diagram schematically illustrates an electronic device suitable for implementing a test method according to an embodiment of the present disclosure. Detailed Implementation

[0058] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0059] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0060] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0061] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0062] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.

[0063] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.

[0064] In the process of automating system testing, when the relationships between multiple business functions implemented by the system are complex and the process of each business function is relatively long, simply testing one or more business functions of the system independently through unit testing, interface testing and other testing methods will not yield test results that meet the test quality requirements.

[0065] To avoid blind spots in the testing system's business functions, test cases are usually designed from the perspective of business systems and business processes. Different business functions may cross different service groups or different systems, so that the assembly and connection of different business functions can complete a complete business processing flow.

[0066] However, in this test case mode, when a certain system or system business function node is abnormal, the only way to determine the system and system business function node that caused the abnormality is to check the automated test execution results one by one, or to analyze the system and system business function node by pre-defining key information feature values. This results in a large workload and low efficiency in analyzing the execution results of automated test scripts.

[0067] To address the problems existing in the automated testing of systems and their business functions using current technologies, embodiments of this disclosure provide a testing method, including:

[0068] Based on the execution results of the test scripts obtained from the initial test process, a first target test script is determined, wherein the first target test script is the first test script used to execute the initial test process that has a failure rate higher than a first preset threshold. Based on the script name of the first target test script, a second target test script with a clustering relationship with the first target test script is queried in the test script knowledge graph. The clustering relationship includes the first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and the second association relationship between the transaction information entity and the test error entity. Based on the script names of the first target test script and the second target test script, a target delayed test process containing the first target test script and / or the second target test script is determined from the candidate test process set. And other candidate test processes in the candidate test process set, excluding the target delayed test process, are executed.

[0069] According to embodiments of this disclosure, by identifying a first target test script with a failure rate higher than a first preset threshold in the initial test process, and based on the script name of the first target test script, the first association between the initial test script entity and the transaction information entity in the test script knowledge graph, and the second association between the transaction information entity and the test error entity, a second target test script with the same clustering attributes as the first target test script can be selected. This allows for the analysis of the scope of negative impacts on script execution caused by the first target test script with a high failure rate. Based on the first and second target test scripts, target delayed test processes that require the execution of the first and second target test scripts are selected from the candidate test process set. Executing other candidate test processes in the candidate test process set, excluding the target delayed test process, can avoid test process execution failures caused by the execution of the target delayed test process, improve the success rate of subsequent test process execution, and allow for timely optimization measures based on the first and second target test scripts to improve the overall efficiency of the test.

[0070] Figure 1 The diagram illustrates an application scenario of the testing method and apparatus according to embodiments of the present disclosure.

[0071] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0072] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0073] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0074] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0075] It should be noted that the testing methods provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the testing apparatus provided in this disclosure embodiment can generally be located in server 105. The testing methods provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the testing apparatus provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0076] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0077] The following will be based on Figure 1 The described scene, through Figures 2-8 The testing methods of the disclosed embodiments are described in detail.

[0078] Figure 2 A flowchart illustrating a test method according to an embodiment of the present disclosure is shown schematically.

[0079] like Figure 2 As shown, the test method of this embodiment includes operations S210 to S240.

[0080] In operation S210, based on the execution results of the test script obtained from the initial test process, a first target test script is determined; wherein, the first target test script is the first test script among the first test scripts used to execute the initial test process, whose execution failure rate is higher than a first preset threshold.

[0081] According to embodiments of this disclosure, the initial test process includes multiple test scripts, and the initial test process performs tests in the order of the multiple test scripts. The execution result of the test script may include the status of whether the test script execution failed or succeeded, and the reason for the test script execution failure. The first target test script may be a test script in the initial test process whose execution failure rate or the number of execution failures recorded in the test script execution result exceeds a preset value.

[0082] In operation S220, based on the script name of the first target test script, a second target test script with a clustering relationship with the first target test script is queried in the test script knowledge graph. The clustering relationship includes the first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and the second association relationship between the transaction information entity and the test error entity.

[0083] According to embodiments of this disclosure, the script name of the first target test script may include multiple transaction business names or system names related to multiple transaction businesses. Based on the script name of the first target test script, the specific multiple transaction business functions that the first target test script needs to test can be determined.

[0084] According to embodiments of this disclosure, the initial test script entity can be multiple specific transaction services to be tested and systems related to those transactions. The transaction information entity can be the test result of a specific transaction service within the initial test script entity. The test error entity can be the specific error type of the test result of a specific transaction within the initial test script entity.

[0085] According to embodiments of this disclosure, the script name of the first target test script can be, for example, "First Product Query + Purchase + Cancel Purchase" or "Connect to First Server, Open First Database". This application does not limit the specific naming method of the script name of the first target test script, and those skilled in the art can name it according to actual needs. The script name of the second target test script, which is queried in the knowledge graph based on clustering relationships, can be "Second Product Query + Purchase + Cancel Purchase".

[0086] In operation S230, based on the script name of the first target test script and the script name of the second target test script, a target delay test process containing the first target test script and / or the second target test script is determined from the candidate test process set.

[0087] According to embodiments of this disclosure, the candidate test process set may include multiple test processes. Each of the multiple test processes may contain the exact same test script, or it may contain completely different test scripts, or it may contain both the same test process and different test scripts.

[0088] In operation S240, execute the other candidate test processes in the candidate test process set, excluding the target delay test process.

[0089] According to embodiments of this disclosure, by identifying a first target test script with a failure rate higher than a first preset threshold in the initial test process, and based on the script name of the first target test script, the first association between the initial test script entity and the transaction information entity in the test script knowledge graph, and the second association between the transaction information entity and the test error entity, a second target test script with the same clustering attributes as the first target test script can be selected. This allows for the analysis of the scope of negative impacts on script execution caused by the first target test script with a high failure rate. Based on the first and second target test scripts, target delayed test processes that require the execution of the first and second target test scripts are selected from the candidate test process set. Executing other candidate test processes in the candidate test process set, excluding the target delayed test process, can avoid test process execution failures caused by the execution of the target delayed test process, improve the success rate of subsequent test process execution, and allow for timely optimization measures based on the first and second target test scripts to improve the overall efficiency of the test.

[0090] Figure 3 A flowchart illustrating a test method according to another embodiment of this disclosure is shown schematically.

[0091] like Figure 3 As shown, the test method of this embodiment may further include operations S310 to S330.

[0092] In operation S310, test error entities, transaction information entities, and initial test script entities are extracted from the sample test execution information according to preset extraction rules. Among them, the test error entity information is used to describe the error information obtained after executing the sample test process.

[0093] According to embodiments of this disclosure, sample test execution information can be textual descriptions of the test process and test results of each initial test script in the test flow.

[0094] According to the embodiments of this disclosure, the sample test execution information can be identified by the text recognition technology OCR in the related art, and the entities and relationships in the sample test execution information can be extracted by the named entity recognition algorithm, keyword extraction method and other extraction methods accordingly. The embodiments of this disclosure do not limit the specific extraction rules, and those skilled in the art can choose according to actual needs.

[0095] According to embodiments of this disclosure, sample test information can be, for example, a text-formatted execution log of an automated test script. Sample test information can be, for example, "Transaction A, purchase of first product, product query logic judgment failed," the extracted test error entity can be "product query logic judgment failed," the transaction information entity can be "purchase of first product," and the initial test script entity can be "Transaction A." Depending on the different sample test execution information, the test error entity can also be, for example, "database exception," "error type location," or "network connection timeout," etc.

[0096] When operating S320, based on the call relationship between the transaction interface and the initial test script, the first association between the initial test script entity and the transaction information entity, and the second association between the transaction information entity and the test error entity are determined.

[0097] According to embodiments of this disclosure, the first association between the initial test script entity and the transaction information entity can be, for example, an inclusion relationship, and the second association between the transaction information entity and the test error entity can be, for example, a constraint relationship.

[0098] When operating S330, a test script knowledge graph is constructed based on the test error entity, transaction information entity, initial test script entity, first association relationship, and second association relationship.

[0099] According to embodiments of this disclosure, by constructing a test script knowledge graph based on the test error entity, transaction information entity, initial test script entity, first association relationship, and second association relationship, it is possible to pre-build the corresponding association relationships between the initial test script entity and the transaction information entity, as well as between the transaction information entity and the test error entity. When an error occurs during the execution of an automated test script, the automated test script that caused the error can be quickly located based on these association relationships, thereby improving query speed.

[0100] According to embodiments of this disclosure, the test error entity includes: a log-type error entity and a UI-type error entity, wherein the log-type error entity and the UI-type error entity have an inclusion relationship, and the UI-type error entity and the transaction information entity have a first association relationship.

[0101] According to embodiments of this disclosure, a log-type error entity can contain multiple interface-type error entities with high correlation. Since there is an inclusion relationship between the log-type error entity and the interface-type error entity, a test script knowledge graph can be constructed based on the inclusion relationship between the log-type error entity and the interface-type error entity.

[0102] According to embodiments of this disclosure, the interface-type error reporting entity can be: error information displayed in the execution interface related to the execution of the initial test script during the execution of the initial test script. For example, the error information contained in the screenshot can be obtained by taking a screenshot of the execution interface related to the execution of the initial test script and using OCR technology to intelligently recognize the screenshot.

[0103] According to embodiments of this disclosure, the interface-type error reporting entity can be, for example, interface l. o Errors displayed in the go area, interface function menu area, and interface pop-up error message prompt area.

[0104] According to embodiments of this disclosure, a log-type error entity may be, for example, "Failed to call the first service". "Failed to call the first service" may include UI-type error entities that occur during communication between programs in different systems, such as "Result communication packet error", "Error calling other programs", and "Error type unknown".

[0105] According to the embodiments of this disclosure, since there is an inclusion relationship between the log-type error entity and the interface-type error entity, and a first association relationship between the interface-type error entity and the transaction information entity, these relationships can be used to query error information that occurs when executing test scripts, thereby improving query speed.

[0106] According to an embodiment of this disclosure, the second target test script includes N scripts, where N is a positive integer greater than 1.

[0107] Figure 4 The illustration shows a flowchart of querying a second target test script that has a clustering relationship with the first target test script in a test script knowledge graph according to an embodiment of the present disclosure, based on the script name of the first target test script.

[0108] like Figure 4 As shown, operation S220, which queries the test script knowledge graph for a second target test script that has a clustering relationship with the first target test script based on the script name of the first target test script, may include operations S410 to S460.

[0109] In operation S410, based on the script name of the first target test script, the target execution failure information that caused the first target test script to fail is queried from the test script execution results of the initial test process. The target execution failure information includes target test error information.

[0110] According to embodiments of this disclosure, the execution result of the test script in the initial test process can be information that provides a textual description of the test process and test results of each test script in the initial test process.

[0111] According to embodiments of this disclosure, target execution failure information may include log-type error information that caused the first target test script to fail to execute. Target test error information may include UI-type information that caused the first target test script to fail to execute.

[0112] During operation of S420, based on the script name of the first target test script and the target test error information, the first target test script entity and the target test error entity are determined in the test script knowledge graph.

[0113] According to embodiments of this disclosure, the first target test script entity can be determined by keyword matching method, or by calculating the similarity between the script name of the first target test script and the initial test script entity in the test script knowledge graph, and determining the initial test script entity with the highest similarity in the calculation result as the first target test script entity.

[0114] In operation 430, based on the second association relationship of the target test error entity, the transaction information entity in the test script knowledge graph that has the second association relationship with the target test error entity is identified as the target transaction entity.

[0115] According to embodiments of this disclosure, the number of transaction information entities that have a second association with the target test error entity can be any number, and this disclosure does not limit the number of transaction information entities with a second association.

[0116] In operation 440, based on the first association relationship of the target transaction entity, the initial test script entities in the test script knowledge graph that have the first association relationship with the target transaction entity are identified as target clustering test script entities, resulting in a target clustering test script entity set, wherein the first target test script entity is included in the target clustering test script entity set.

[0117] In operation 450, the second target test script entity is selected from the target cluster test script entity set using the first target test script entity.

[0118] In operation 460, the second target test script is determined based on the second target test script entity.

[0119] According to embodiments of this disclosure, the script name of the first target test script can be, for example, "Type A Transaction Test Script". In the execution result of the test script in the initial test process, the target execution failure information that caused the first target test script to fail can be queried, for example, "Type A Transaction Test Failure". Based on the script name of the first target test script, "First Transaction Test Script" and the target execution failure information "Type A Transaction Test Failure", the first target test script entity and the target test error entity are determined in the test script knowledge graph. Then, based on the second association relationship of the target test error entity, the transaction information entities "Type A Transaction" and "Type B Transaction" that have a second association relationship with the target test error entity in the test script knowledge graph can be used as the target transaction entities.

[0120] According to embodiments of this disclosure, based on the first association relationships of the transaction information entities "Type A Transaction" and "Type B Transaction," initial test script entities with first association relationships with "Type A Transaction" and / or "Type B Transaction" can be queried in the test script knowledge graph. Therefore, the initial test script entities with first association relationships with "Type A Transaction" and / or "Type B Transaction" can be identified as the second target test script.

[0121] It should be understood that, since the first target test script entity is contained in the target clustering test script entity set, other set elements in the target clustering test script entity set besides the first target test script entity can be used as the second target test script entity, thereby filtering out the second target test script entity.

[0122] According to embodiments of this disclosure, based on the first and second associations of the target transaction entity, the second test script affected by the first target test script when the first target test script has a problem can be quickly determined by querying the test script knowledge graph. This allows for the rapid querying of other initial test scripts with associated negative effects of the first target test script, improving the efficiency of analyzing the results of automated test execution and laying the foundation for further improving the efficiency of automated test execution.

[0123] Figure 5 A schematic diagram of a test script knowledge graph according to an embodiment of the present disclosure is shown.

[0124] like Figure 5As shown, the initial test script entities that can be included in the test script knowledge graph are: "Apply to purchase and cancel purchase of the first product" 511, "Apply to purchase and cancel purchase of the second product" 512, "Log in to the database and modify data information" 513, and "New user fills in and submits registration information" 514. "Purchase product" 521, "Product query" 522, "Open database" 523, and "Modify registration password" 524 can be transaction information entities in the test script knowledge graph. "Product query logic judgment failed" 531, "Database exception" 532, and "No access permission" 533 are UI-type error entities. "Failed to call database data" 541 and "Network connection timeout" 542 can be log-type error entities in the test script knowledge graph.

[0125] There is a primary related relationship between "Application to purchase and cancellation of purchase of product one" 511 and "Purchase of product one" 521. Figure 5 The inclusion relationship shown is as follows. There is a primary association between "Application to Purchase and Cancellation of Purchase of Second Product" 512 and "Second Product Inquiry" 522. Figure 5 The inclusion relationship shown is as follows. There is a primary association between "Log in to the database, modify data information" 513 and "Modify database information" 523. Figure 5 The inclusion relationship shown is as follows. There is a primary association between "New User Submits Registration Information" 514 and "Change Registration Password" 524, namely... Figure 5 The inclusion relationship is shown.

[0126] The message "Purchase first product" (521) has a second correlation with "Product query logic judgment failed" (531) and "Network connection error" (532). Figure 5 The constraint relationship shown is as follows. "Second Product Query" 522 has a second association relationship with "Product Query Logic Judgment Failure" 531 and "Network Connection Abnormality" 532, respectively. Figure 5 The constraint relationship shown is as follows. "Modify database information" 523 has a second association relationship with "Network connection error" 532 and "No access permission" 533, respectively. Figure 5 The constraint relationship shown is as follows. "Change registration password" 524 has a second association relationship with "Network connection error" 532 and "No access permission" 533, respectively. Figure 5 The constraints shown are illustrated.

[0127] There is an inclusion relationship between "Failed to retrieve database data" 541, "Failed to determine product query logic" 531, and "Network connection error" 532. There is also an inclusion relationship between "Network connection timeout" 542, "Network connection error" 532, and "No access permission" 533.

[0128] According to embodiments of this disclosure, the script name of the first target test script can be, for example, "Request to Cancel Purchase of First Product", and the target test error message can be, for example, "First Product Query Logic Failed". Figure 5 The first target test script entity identified by the test script knowledge graph shown can be "Apply to purchase and cancel purchase of the first product" 511, and the target test error entity can be "Product query logic judgment failed" 531.

[0129] When the target test error entity is "Product query logic judgment failed" 531, by querying... Figure 5 The test script knowledge graph shown yields transaction information entities “second product query” 522 and “purchase first product” 521 that have a second association with “product query logic judgment failed” 531. At this point, the transaction information entities “product query” 522 and “purchase first product” 521 can be identified as target transaction entities.

[0130] By query Figure 5 The test script knowledge graph shown determines that "Apply to purchase and cancel purchase of second product" 512 is a second target test script entity other than the first target test script entity "Apply to purchase and cancel purchase of first product" 511, based on the first association relationship of "Second product query" 522. Thus, the second target test script related to "Apply to purchase and cancel purchase of second product" 512 is determined based on "Apply to purchase and cancel purchase of second product" 512.

[0131] According to embodiments of this disclosure, by constructing a test script knowledge graph based on the test error entity, transaction information entity, initial test script entity, first association relationship, and second association relationship, it is possible to pre-construct the corresponding association relationships between the initial test script entity and the transaction information entity, as well as between the transaction information entity and the test error entity. Through these association relationships, a second target test script that has a clustering relationship with the first target test script can be queried in the test script knowledge graph, thereby determining the scope of influence of the first target test script when a problem occurs, and improving the efficiency of automated test execution result analysis.

[0132] According to embodiments of this disclosure, the testing method may further include the following operations:

[0133] Extract data error entities from the sample test execution information, as well as the third association between the data error entities and the initial test script entities; and update the test script knowledge graph based on the data error entities and the third association to obtain a new test script knowledge graph.

[0134] According to embodiments of this disclosure, when inputting test data into various initial test scripts in the testing process, errors in the format, value range, and other attribute information of the test data can lead to execution errors in the initial test scripts. A data error entity can represent data error class information caused by test data errors in the execution of the initial test scripts.

[0135] According to embodiments of this disclosure, the clustering relationship also includes a third association relationship, and the target execution failure information also includes target data error information.

[0136] Figure 6 The illustration shows a flowchart of querying a second target test script that has a clustering relationship with the first target test script in a test script knowledge graph according to the script name of the first target test script, according to another embodiment of the present disclosure.

[0137] like Figure 6 As shown, operation S220, which queries the test script knowledge graph for the second target test script that has a clustering relationship with the first target test script based on the script name of the first target test script, may also include operations S610 to S640.

[0138] When operating S610, the target data error entity is identified in the new test script knowledge graph based on the target data error information.

[0139] In operation S620, the initial test script entity in the new test script knowledge graph that has a third association with the target data error entity is identified as the new target clustering test script entity, thus obtaining a new target clustering test script entity set.

[0140] When operating S630, a new second target test script entity is selected from the new target clustering test script entity set using the first target test script entity.

[0141] In operation S640, a new second target test script is determined based on the new second target test script entity.

[0142] According to embodiments of this disclosure, the target execution failure information may be, for example, "The execution of the first script type A transaction failed, and the first test data value exceeded the upper limit." In this case, the target data error information may be, for example, "The first test data value exceeded the upper limit."

[0143] According to embodiments of this disclosure, by extracting data error entities and the third association between data error entities and initial test script entities from sample test execution information; and updating the test script knowledge graph based on the data error entities and the third association, a new test script knowledge graph can be obtained. This allows for timely updates to the test script knowledge graph, making the clustering relationships contained in the test script knowledge graph more comprehensive, improving the query scope for querying other affected target test scripts for the first target test script, and further improving the efficiency of automated test execution result query and analysis.

[0144] According to embodiments of this disclosure, the initial test script entities in the new test script knowledge graph can be, for example, "Test Script A" and "Test Script B", and the data error entities that have a third association relationship with "Test Script A" and "Test Script B" can be, for example, "Test Data Error A".

[0145] According to embodiments of this disclosure, for example, when test data is input into an initial test process containing an initial test script "Test Script A", the initial test script "Test Script A" fails to execute. In this case, the first target test script entity can be determined as "Test Script A" based on the new test script knowledge graph, and the target data error information can be, for example, "Test data value A exceeds the upper limit". The target data error entity determined in the new test script knowledge graph based on the target data error information "Test data value A exceeds the upper limit" can be "Data error A".

[0146] According to embodiments of this disclosure, based on the third association relationship of the target data error entity "Data Error A", the initial test script entities retrieved in the new test script knowledge graph are "Test Script A" and "Test Script B". Since "Test Script A" is the first target test script entity, and both "Test Script A" and "Test Script B" have a third association relationship with the target data error information "Data Error A", "Test Script B" is determined as the new second target test script.

[0147] According to embodiments of this disclosure, based on the third association relationship of the target transaction entity, the scope affected by the test script when the first target test script has a problem can be quickly determined by querying the new test script knowledge graph, thereby improving the efficiency of automated test execution result analysis.

[0148] Figure 7 A schematic diagram of a test script knowledge graph according to another embodiment of the present disclosure is shown.

[0149] like Figure 7As shown, “The number of products purchased exceeds the limit” 751 is a data error entity. “The number of products purchased exceeds the limit” 751 has a third relationship with the initial test script entities “Apply to purchase and cancel purchase of the first product” 711 and “Apply to purchase and cancel purchase of the second product” 712.

[0150] According to embodiments of this disclosure, the target data error message could be, for example, "The quantity of products purchased is greater than 10, exceeding the upper limit." Figure 7 The target data error entity identified by the new test script knowledge graph shown can be "The number of products purchased exceeds the upper limit" 751, and the target test error entity can be "Product query logic judgment failed" 731.

[0151] In the case where “Apply to purchase and cancel purchase of the first product” 711 in the initial test script entity is the first target test script entity, the test method provided in the above embodiment can determine that the second target test script entity that has a clustering relationship with “Apply to purchase and cancel purchase of the first product” 711 can be “Apply to purchase and cancel purchase of the second product” 712.

[0152] Furthermore, by querying the third association of the target data error entity "Purchasing product quantity exceeds the limit" 751 in the new test script knowledge graph, it can be determined that "Log in to the database and modify data information" 713 is a new second target test script entity. Therefore, a new second target test script can be determined based on "Log in to the database and modify data information" 713.

[0153] According to embodiments of this disclosure, by extracting data error entities and the third association between data error entities and initial test script entities from sample test execution information; and updating the test script knowledge graph based on the data error entities and the third association, a new test script knowledge graph can be obtained. This allows for timely updates to the test script knowledge graph, making the clustering relationships it contains more comprehensive. Based on the third association of the target data error entity, when a problem occurs in the first target test script, the scope of new second target test scripts affected by the first target test script can be quickly determined by querying the new test script knowledge graph, further improving the efficiency of automated test execution result query and analysis.

[0154] Figure 8 A flowchart illustrating a test method according to another embodiment of the present disclosure is shown.

[0155] like Figure 8 As shown, the test method of this embodiment may further include operations S810 to S830.

[0156] In operation S810, based on the execution results of the test scripts obtained from the initial test process, a third target test script is determined. This third target test script is the first test script used to execute the initial test process, and its execution success rate is higher than a second preset threshold.

[0157] When operating S820, based on the script name of the third target test script, query the test script knowledge graph for the fourth target test script that has a clustering relationship with the third target test script.

[0158] In operation S830, based on the script names of the third target test script and the fourth target test script, the target priority test process containing the third target test script and the fourth target test script is determined from the candidate test process set.

[0159] Specifically, operation S240, which executes other candidate test processes in the candidate test process set besides the target latency test process, may include the following operations:

[0160] Prioritize executing the target priority test process from the candidate test process set.

[0161] According to embodiments of this disclosure, the third target test script can be a first test script with a high execution success rate. Based on the same or similar methods described above, a fourth target test script with a clustering relationship to the third target test script can be queried through a test script knowledge graph. This allows the prediction of a fourth target test script with a similar execution success rate based on the clustering relationship of the third target test script. Then, the candidate test process containing both the third and fourth target test scripts in the candidate test process set is determined as the target-priority test process. This further allows the prediction that the execution success rate of the target-priority test process is higher than that of other candidate test processes in the candidate test process set. Prioritizing the execution of the target-priority test process helps to accelerate the testing speed of the automated test process. Furthermore, during the execution of the target-limited test process, errors appearing in the first target test script and / or the second target test script can be adjusted in parallel to improve the overall execution efficiency of the subsequent automated test process.

[0162] Based on the above testing method, this disclosure also provides a testing apparatus. The following will be combined with... Figure 9 The device is described in detail.

[0163] Figure 9 A schematic block diagram of a test apparatus according to an embodiment of the present disclosure is shown.

[0164] like Figure 9 As shown, the testing device 900 of this embodiment includes a first determining module 910, a query module 920, a second determining module 930, and an execution module 940.

[0165] The first determining module 910 is used to determine a first target test script based on the test script execution result obtained from executing the initial test process, wherein the first target test script is a first test script among the first test scripts used to execute the initial test process, whose execution failure rate is higher than a first preset threshold.

[0166] The first query module 920 is used to query a second target test script that has a clustering relationship with the first target test script in the test script knowledge graph according to the script name of the first target test script. The clustering relationship includes a first clustering relationship determined by a first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and a second association relationship between the transaction information entity and the test error entity.

[0167] The second determining module 930 is used to determine a target delay test process containing the first target test script and the second target test script from the candidate test process set based on the script name of the first target test script and the script name of the second target test script.

[0168] The execution module 940 is used to execute other candidate test processes in the candidate test process set besides the target delay test process.

[0169] According to embodiments of this disclosure, the testing apparatus further includes: a first extraction module, a third determination module, and a construction module.

[0170] The first extraction module is used to extract test error entities, transaction information entities, and initial test script entities from the sample test execution information according to preset extraction rules. Among them, the test error entities are used to describe the error information obtained after executing the sample test process.

[0171] The third determining module is used to determine the first association between the initial test script entity and the transaction information entity, and the second association between the transaction information entity and the test error entity, based on the call relationship between the transaction interface and the initial test script.

[0172] The building module is used to construct a test script knowledge graph based on the test error entity, transaction information entity, initial test script entity, first association relationship, and second association relationship.

[0173] According to an embodiment of this disclosure, the second target test script includes N scripts, where N is a positive integer greater than 1.

[0174] The first query module includes: a query submodule, a first determination submodule, a second determination submodule, a third determination submodule, a first filtering submodule, and a fourth determination submodule.

[0175] The query submodule is used to query the target execution failure information that caused the first target test script to fail to execute, based on the script name of the first target test script in the execution results of the test script in the initial test process. The target execution failure information includes target test error information.

[0176] The first determination submodule is used to determine the first target test script entity and the target test error entity in the test script knowledge graph based on the script name of the first target test script and the target test error information.

[0177] The second determination submodule is used to determine the transaction information entity in the test script knowledge graph that has a second association with the target test error entity as the target transaction entity based on the second association relationship of the target test error entity.

[0178] The third determining submodule determines the initial test script entities in the test script knowledge graph that have the first association with the target transaction entity as target clustering test script entities based on the first association with the target transaction entity, thereby obtaining a target clustering test script entity set, wherein the first target test script entity is included in the target clustering test script entity set.

[0179] The first filtering submodule is used to filter out the second target test script entity from the target clustering test script entity set using the first target test script entity.

[0180] The fourth determination submodule is used to determine the second target test script based on the second target test script entity.

[0181] According to embodiments of this disclosure, the clustering relationship also includes a third association relationship, and the target execution failure information also includes target data error information.

[0182] The first query module further includes: a fifth determination submodule, a sixth determination submodule, a second filtering submodule, and a seventh determination submodule.

[0183] The fifth determination submodule is used to determine the target data error entity in the new test script knowledge graph based on the target data error information.

[0184] The sixth determination submodule is used to determine the initial test script entity in the new test script knowledge graph that has a third association with the target data error entity as the new target clustering test script entity, thereby obtaining a new target clustering test script entity set.

[0185] The second filtering submodule is used to filter out new second target test script entities from the new target clustering test script entity set using the first target test script entity.

[0186] The seventh determination submodule is used to determine the new second target test script based on the new second target test script entity.

[0187] According to embodiments of this disclosure, the testing apparatus further includes: a fourth determining module, a second querying module, and a fifth determining module.

[0188] The fourth determination module is used to determine the third target test script based on the execution results of the test script obtained from the initial test process. The third target test script is the first test script used to execute the initial test process, which has a success rate higher than the second preset threshold.

[0189] The second query module is used to query the test script knowledge graph for the fourth target test script that has a clustering relationship with the third target test script, based on the script name of the third target test script.

[0190] The fifth determination module is used to determine the target priority test process that contains the third target test script and the fourth target test script from the candidate test process set based on the script name of the third target test script and the script name of the fourth target test script.

[0191] The execution module includes: the priority execution submodule.

[0192] The priority execution submodule is used to prioritize the execution of the target priority test process in the candidate test process set.

[0193] According to embodiments of this disclosure, the test error entity includes: a log-type error entity and a UI-type error entity, wherein the log-type error entity and the UI-type error entity have an inclusion relationship, and the UI-type error entity and the transaction information entity have a first association relationship.

[0194] Figure 10 A block diagram schematically illustrates an electronic device suitable for implementing a test method according to an embodiment of the present disclosure.

[0195] like Figure 10As shown, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage portion 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0196] RAM 1003 stores various programs and data required for the operation of electronic device 1000. Processor 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Processor 1001 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1002 and / or RAM 1003. It should be noted that the programs may also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0197] According to embodiments of this disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to a bus 1004. The electronic device 1000 may also include one or more of the following components connected to the I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.

[0198] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0199] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1002 and / or RAM 1003 and / or one or more memories other than ROM 1002 and RAM 1003 described above.

[0200] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiments of the present disclosure.

[0201] When the computer program is executed by the processor 1001, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0202] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1009, and / or installed from a removable medium 1011. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0203] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by processor 1001, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0204] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0205] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0206] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0207] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A testing method, comprising: Based on the execution results of the test scripts obtained from the initial test process, a first target test script is determined, wherein the first target test script is the first test script among the first test scripts used to execute the initial test process, and the execution failure rate is higher than a first preset threshold. Based on the script name of the first target test script, a second target test script with a clustering relationship with the first target test script is queried in the test script knowledge graph. The clustering relationship includes a first clustering relationship determined by a first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and a second association relationship between the transaction information entity and the test error entity. Based on the script names of the first target test script and the second target test script, determine the target latency test process that contains the first target test script and / or the second target test script from the candidate test process set; and Execute other candidate test processes in the candidate test process set besides the target latency test process.

2. The test method according to claim 1 further includes: According to the preset extraction rules, test error entities, transaction information entities and initial test script entities are extracted from the sample test execution information. The test error entities are used to describe the error information obtained after executing the sample test process. Based on the call relationship between the transaction interface and the initial test script, determine the first association between the initial test script entity and the transaction information entity, and the second association between the transaction information entity and the test error entity; The test script knowledge graph is constructed based on the test error entity, the transaction information entity, the initial test script entity, the first association relationship, and the second association relationship.

3. The test method according to claim 1 or 2, wherein, The second target test script includes N scripts, where N is a positive integer greater than 1; Based on the script name of the first target test script, the second target test script that has a clustering relationship with the first target test script is queried in the test script knowledge graph, including: Based on the script name of the first target test script, query the target execution failure information that caused the first target test script to fail to execute in the test script execution result of the initial test process, wherein the target execution failure information includes target test error information; Based on the script name of the first target test script and the target test error information, the first target test script entity and the target test error entity are determined in the test script knowledge graph; Based on the second association relationship of the target test error entity, the transaction information entity in the test script knowledge graph that has the second association relationship with the target test error entity is determined as the target transaction entity; Based on the first association relationship of the target transaction entity, the initial test script entity in the test script knowledge graph that has the first association relationship with the target transaction entity is determined as the target clustering test script entity, thereby obtaining the target clustering test script entity set, wherein the first target test script entity is included in the target clustering test script entity set; Using the first target test script entity, a second target test script entity is selected from the target clustering test script entity set; and The second target test script is determined based on the second target test script entity.

4. The test method according to claim 3 further includes: Extract data error entities from the sample test execution information, and the third association relationship between the data error entities and the initial test script entities; as well as Based on the data error entity and the third association, the test script knowledge graph is updated to obtain a new test script knowledge graph.

5. The testing method according to claim 4, wherein the clustering relationship further includes the third association relationship, and the target execution failure information further includes target data error information; in, Based on the script name of the first target test script, the search for a second target test script that has a clustering relationship with the first target test script in the test script knowledge graph also includes: Based on the target data error information, determine the target data error entity in the new test script knowledge graph; The initial test script entity in the new test script knowledge graph that has a third association with the target data error entity is identified as the new target clustering test script entity, thus obtaining a new target clustering test script entity set; Using the first target test script entity, a new second target test script entity is selected from the new target clustering test script entity set; and Based on the new second target test script entity, a new second target test script is determined.

6. The test method according to any one of claims 1 to 5, further comprising: Based on the test script execution results obtained from executing the initial test process, a third target test script is determined, wherein the third target test script is the first test script used to execute the initial test process, and the execution success rate is higher than a second preset threshold. Based on the script name of the third target test script, query the test script knowledge graph for a fourth target test script that has a clustering relationship with the third target test script; and Based on the script name of the third target test script and the script name of the fourth target test script, a target priority test process containing the third target test script and the fourth target test script is determined from the candidate test process set. The execution of other candidate test processes in the candidate test process set besides the target latency test process includes: The target priority test process in the candidate test process set is executed first.

7. The test method according to claim 2, wherein, The test error reporting entities include: log-type error reporting entities and interface-type error reporting entities. The log-type error reporting entities and the interface-type error reporting entities have an inclusion relationship, and the interface-type error reporting entities have the first association relationship with the transaction information entities.

8. A testing apparatus, comprising: The first determining module is used to determine a first target test script based on the test script execution result obtained from the initial test process, wherein the first target test script is a first test script among the first test scripts used to execute the initial test process, whose execution failure rate is higher than a first preset threshold; The query module is used to query a second target test script that has a clustering relationship with the first target test script in the test script knowledge graph based on the script name of the first target test script. The clustering relationship includes a first clustering relationship determined by a first association relationship between the initial test script entity and the transaction information entity in the test script knowledge graph, and a second association relationship between the transaction information entity and the test error entity. The second determining module is configured to determine, based on the script names of the first target test script and the second target test script, a target latency test process containing the first target test script and / or the second target test script from a set of candidate test processes; and The execution module is used to execute other candidate test processes in the candidate test process set besides the target delay test process.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for fast positioning change of test script of mobile terminal

    CN105740146A

  • Application testing method and device based on knowledge graph, electronic equipment and medium

    CN113535577A