Method, device, computer equipment and storage medium for automatic optimization of test activities

By converting test cases and defect problem sheets into each other in software testing, the problem of repetitive work in traditional tests is solved, the test efficiency and intelligent integration of libraries is improved, and the cost is reduced.

CN113608998BActive Publication Date: 2025-02-25NEW H3C SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110753355.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-02
Publication Date
2025-02-25
Estimated Expiration
2041-07-02

AI Technical Summary

Technical Problem

In traditional software testing, the use of test case libraries and defect libraries is separated, resulting in separate steps and details of different test stages that need to be executed separately, resulting in repetitive work, low efficiency and high cost problems.

Method used

By reading the number of the target test case, execute the command to search for matching defect problem sheets from the defect library, convert the test case into a new defect problem sheet or convert the defect problem sheet to a new test case based on the search results. And store the corresponding order number to realize the mutual conversion between test cases and defect problem orders.

Benefits of technology

It avoids duplicate work on the same or similar problems in different testing stages, improves software testing efficiency, reduces labor investment and testing costs, and realizes the intelligent convergence of defect libraries and use case libraries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113608998B_ABST
    Figure CN113608998B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, computer equipment and storage medium for automatic optimization of test activities, wherein the method may include the following steps. Read the number of the target test case, the execution result of the target test case is failure; use the number as a search condition, and execute a command to search for a defect problem ticket matching the target test case from the defect library; based on the failure to find a matching defect problem ticket, convert the target test case into a new defect problem ticket based on the element mapping relationship, and store the number of the new defect problem ticket in the execution result of the target test case; or based on finding a matching defect problem ticket, store the number of the defect problem ticket in the execution result of the target test case. The present invention avoids repetitive work in different test stages, improves the efficiency of software testing, and improves the timeliness of test case output and defect problem ticket generation, greatly saving testing costs and manpower investment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more specifically, the present invention can provide a method, an apparatus, a computer device and a storage medium for automatically optimizing a test activity. Background Art

[0002] At present, test case library and defect library are commonly used tools for software testing. Take the software engineering verification model (V model) as an example: the test case library is used in the test design phase before coding is completed, and the defect library is used in the test execution phase after coding is completed. Among them, the test design phase mainly includes user needs, demand analysis and system, outline design and detailed design, and the test execution phase mainly includes unit testing, integration testing, system testing and acceptance testing. It can be seen that the use of traditional test case libraries is separate from the use of defect libraries, which will cause the steps and details of different test phases to be executed separately, and repetitive work is often performed, resulting in low software testing efficiency and high costs. Problems need to be solved urgently. Summary of the invention

[0003] In order to solve the problems of low efficiency and high cost in conventional software testing technical solutions, the present invention can provide a method, device, computer equipment and storage medium for automatic optimization of testing activities, so as to achieve multiple technical purposes such as improving software testing efficiency and reducing or even avoiding repetitive labor.

[0004] To achieve the above technical objectives, the present invention provides a method for automatically optimizing a test activity, which may include but is not limited to one or more of the following steps.

[0005] The number of the target test case is read, and the execution result of the target test case is failure.

[0006] Using the number as a search condition, a command is executed to search for a defect ticket matching the target test case from the defect library.

[0007] According to the fact that no matching defect ticket is found, the target test case is converted into a new defect ticket based on the element mapping relationship, and the ticket number of the new defect ticket is stored in the execution result of the target test case.

[0008] Or, based on finding a matching defect ticket, the ticket number of the defect ticket is stored in the execution result of the target test case.

[0009] Furthermore, converting the target test case into a new defect ticket based on the element mapping relationship includes:

[0010] Obtain the first element information contained in the target test case.

[0011] The first element information is converted into the second element information accordingly.

[0012] The second element information is written into a preset blank problem sheet to form a new defect problem sheet.

[0013] Furthermore, converting the target test case into a new defect ticket also includes:

[0014] The additional element information is written into the preset blank problem sheet to form a new defect problem sheet.

[0015] Furthermore, before reading the target test case number, the method further includes:

[0016] Read the execution log information generated after executing multiple test cases.

[0017] The execution log information is parsed, and at least one test case with a failed execution result is used as a target test case according to the parsing result.

[0018] To achieve the above technical objectives, the present invention can also provide a method for automatic optimization of testing activities, which may include but is not limited to one or more of the following steps.

[0019] Read the target defect ticket number.

[0020] Using the order number as a search condition, a command is executed to search for a test case matching the target defect problem ticket from the use case library.

[0021] According to the fact that no matching test case is found, the target defect problem sheet is converted into a new test case based on the element mapping relationship, and the serial number of the new test case is stored in the target defect problem sheet.

[0022] Or according to finding a matching test case, the number of the test case is stored in the target defect problem sheet.

[0023] Furthermore, converting the target defect problem sheet into a new test case based on the element mapping relationship includes:

[0024] The second element information included in the target defect problem ticket is obtained.

[0025] The second element information is converted into the first element information accordingly.

[0026] The first element information is written into a preset blank test case to form a new test case.

[0027] Furthermore, converting the target defect problem sheet into a new test case based on the element mapping relationship includes:

[0028] The second element information included in the target defect problem ticket is obtained.

[0029] The first element information contained in the test case obtained through screening is modified according to the second element information.

[0030] The test case with the modified first element information is used as a new test case.

[0031] Furthermore, converting the target defect problem ticket into a new test case includes:

[0032] Obtain a recurrence probability value of the target defect problem ticket.

[0033] The target defect problem ticket is converted into a new test case according to the recurrence probability value being greater than or equal to a preset probability value.

[0034] To achieve the above technical objectives, the present invention can also provide a device for automatically optimizing test activities, which may include but is not limited to a number reading module, a defect search module, an intelligent mapping module and a single number storage module.

[0035] The number reading module is used to read the number of the target test case. The execution result of the target test case is failure.

[0036] The defect search module is used to execute a command to search for defect problem tickets matching the target test case from the defect library using the number as a search condition.

[0037] The intelligent mapping module is used to convert the target test case into a new defect ticket based on the element mapping relationship according to the fact that no matching defect ticket is found.

[0038] The ticket number storage module is used to store the ticket number of the new defect ticket in the execution result of the target test case if no matching defect ticket is found. Or, it is used to store the ticket number of the defect ticket in the execution result of the target test case if a matching defect ticket is found.

[0039] To achieve the above technical objectives, the present invention can also provide a device for automatic optimization of test activities, which may include but is not limited to a single number reading module, a use case search module, an intelligent mapping module and a number storage module.

[0040] The order number reading module is used to read the order number of the target defect problem ticket.

[0041] The use case search module is used to execute a command to search for a test case matching the target defect problem ticket from the use case library using the ticket number as a search condition.

[0042] The intelligent mapping module is used to convert the target defect problem ticket into a new test case based on the element mapping relationship according to the test case that no matching test case is found.

[0043] A number storage module is used to store the number of the new test case in the target defect problem sheet if no matching test case is found; or to store the number of the test case in the target defect problem sheet if a matching test case is found.

[0044] To achieve the above technical objectives, the present invention may also provide a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for automatic optimization of test activities described in any embodiment of the present invention.

[0045] In order to achieve the above technical objectives, the present invention can also provide a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to perform the steps of the method for automatic optimization of test activities described in any embodiment of the present invention.

[0046] The beneficial effects of the present invention are as follows: by converting test cases into defect tickets or converting defect tickets into test cases, the present invention realizes the mutual conversion between test cases and defect tickets. The present invention can avoid repetitive work on the same or similar problems in different testing stages, for example, avoiding the testers from repeatedly entering data of associated test cases and defect tickets twice, thereby improving the efficiency of software testing work, and improving the timeliness of test case output and defect ticket generation, greatly saving manpower investment and testing costs.

[0047] The present invention enriches the defect library with new defect problem tickets automatically generated by test cases, and enriches the use case library with new test cases automatically generated by defect problem tickets. It can be seen that the present invention effectively realizes the intelligent integration of the software testing defect library and the use case library. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic flow chart of a method for automatic optimization of testing activities in some embodiments of the present invention is shown.

[0049] Figure 2 A schematic diagram of the process of converting test cases into defect problem tickets in a method for automatic optimization of test activities in one or more embodiments of the present invention is shown.

[0050] Figure 3A schematic flow chart of a method for automatic optimization of testing activities in other embodiments of the present invention is shown.

[0051] Figure 4 A schematic diagram of the process of converting defect problem tickets into test cases in a method for automatic optimization of test activities in one or more embodiments of the present invention is shown.

[0052] Figure 5 A schematic diagram showing the composition of a device for automatic optimization of test activities in some embodiments of the present invention.

[0053] Figure 6 A schematic diagram showing the composition of a device for automatic optimization of testing activities in other embodiments of the present invention is shown.

[0054] Figure 7 A schematic diagram of the internal structure of a computer device in one or more embodiments of the present invention is shown. DETAILED DESCRIPTION

[0055] The following is a detailed explanation and description of a method, device, computer equipment and storage medium for automatic optimization of test activities specifically provided by the present invention in conjunction with the drawings in the specification.

[0056] The test case involved in the present invention refers to a file describing the test task for a specific software product, which is used to reflect the test plan, method, technology and strategy, etc. The test case (TestCase) of the present invention is stored in a case library (i.e., a test case library); the defect problem sheet involved in the present invention refers to a file used to describe the relevant defect content formed after a defect is found during test execution, and the defect (Bug) problem sheet of the present invention is stored in the defect library. Both the test case library and the defect library are tools for software testing. The present invention is committed to enriching the test case library and the defect library and improving their use efficiency, and provides multiple technical solutions for automatic optimization of software testing activities.

[0057] like Figure 1 As shown, and can be combined Figure 2 One or more embodiments of the present invention can provide a method for automatically optimizing test activities. Specifically, the method includes a process of converting test cases into defect problem tickets, which may specifically include but is not limited to one or more of the following steps.

[0058] First, the number of the target test case is read. The execution result of the target test case in this embodiment is failure. It is understandable that the execution results of the test case include success (pass) and failure. After the test task is issued, when the verification result is failure, the process of the present invention is triggered.

[0059] Optionally, in some embodiments of the present invention, before reading the number of the target test case, the method also includes: reading execution log information generated after executing multiple test cases, parsing the current execution log information, and taking at least one test case with a failed execution result as a target test case based on the parsing result.

[0060] Secondly, the number is used as a search condition (key) to execute a command to search for a defect ticket matching the target test case from the defect library. Specifically, when a test case fails to execute, the present invention uses the number of the failed test case to search for a bug ticket number related to the number in the defect library.

[0061] Finally, based on the fact that no matching defect ticket is found, the target test case is converted into a new defect ticket based on the element mapping relationship, and the ticket number of the new defect ticket is stored in the execution result of the target test case; or, based on the fact that a matching defect ticket is found (i.e., the associated bug ticket number is found), it indicates that the test case still has an unresolved issue - the case test is blocked, and the ticket number of the matching defect ticket is stored in the execution result of the target test case, and no new defect ticket is generated at this time.

[0062] Specifically, the embodiment of the present invention converts the target test case into a new defect problem ticket based on the element mapping relationship, including:

[0063] The first element information contained in the target test case is obtained. The first element information in this embodiment includes the case number, test module, case title, case priority, preconditions, test input, test steps and expected results, that is, Figure 2 The eight elements of a test case are shown in Figure 1.

[0064] The first element information is converted into the second element information accordingly. This step may include but is not limited to converting the test module into the problem attribution module of the defect ticket, converting the pre-conditions and test steps into the test steps of the defect ticket, converting the priority of the use case into the severity of the defect ticket, converting the expected result into the result impact of the defect ticket, converting the title of the use case into a brief description of the defect ticket, converting the test input of the use case into the trigger factor of the defect ticket, and converting the use case number into the number of the defect ticket (or determining the number by a separate generation method), and of course it is not limited to this. The second element information includes the problem attribution module, test steps, severity, result impact, brief description, trigger factor, number, etc.

[0065] The conversion between the first element information and the second element information of this embodiment adopts at least one of the following methods. (1) Direct conversion: direct mapping in content, for example, the use case number can be directly converted into the number of the defect ticket, the test module can be directly converted into the problem attribution module, etc. In actual testing, this embodiment can also directly convert the version information issued by the task, the test responsible person information, etc. (2) Regular matching: for example, the title of the test case can be converted into a brief description of the defect ticket through regular matching; (3) Weighted conversion: for example, the test case priority is converted into the severity of the defect ticket (or the result impact or whether it causes blocking), etc. It should be understood that on the basis of the technical solution of the present invention, it can also assist manual filling in of a small part of the details.

[0066] The second element information is automatically written into a preset blank problem sheet to form a new defect problem sheet. More specifically, converting the target test case into a new defect problem sheet also includes: automatically writing the second element information into the preset blank problem sheet, and then writing the additional element information into the preset blank problem sheet to form a new defect problem sheet. The additional element information in this embodiment includes but is not limited to the obtained version information, whether the problem recurs, trigger factor information, preliminary positioning information, etc. Among them, the preset blank problem sheet refers to a problem sheet with a standard problem sheet format but no specific content.

[0067] like Figure 3 As shown, and can be combined Figure 4 The present invention also has one or more embodiments that can provide a method for automatically optimizing test activities. Specifically, the method may include a process of converting a defect problem sheet into a test case, specifically including but not limited to one or more of the following steps.

[0068] First, the present invention uses the currently submitted defect ticket as the target defect ticket and reads the ticket number of the target defect ticket. The source of the target defect ticket in this embodiment includes but is not limited to the test case execution process, divergent testing, major problem ticket synchronization process and online problem handling process.

[0069] Secondly, the order number is used as the search condition to execute a command to search the test case matching the target defect ticket from the case library. The trigger condition of this process in this embodiment is that a new defect ticket is generated, and the order number of the defect ticket is used as the basis for determining whether there is a corresponding test case.

[0070] Finally, if no matching test case is found, the target defect ticket is converted into a new test case based on the element mapping relationship, and the number of the new test case is stored in the target defect ticket; or if a matching test case is found, the number of the test case is stored in the target defect ticket.

[0071] Optionally, converting the target defect problem sheet into a new test case includes: obtaining a recurrence probability value of the target defect problem sheet, and converting the target defect problem sheet into a new test case based on the recurrence probability value being greater than or equal to a preset probability value. The preset probability value may be, for example, 63%, but is of course not limited thereto. Specifically, in this embodiment, the target defect problem sheet is converted into a new test case when a conditional probability occurs, and the corresponding probability of the conditional probability occurrence may be equal to the preset probability value; and the target defect problem sheet is converted into a new test case when a conditional occurrence is inevitable, and the corresponding probability of the conditional occurrence is greater than the preset probability value. For cases where it is difficult to reproduce or occurs irregularly, it means that the current bug problem sheet is not suitable for generating test cases, and the conversion process is canceled. The corresponding probabilities of being difficult to reproduce and occurring irregularly are both less than the preset probability values.

[0072] Optionally, some embodiments of the present invention convert the target defect problem ticket into a new test case based on the element mapping relationship, including:

[0073] The second element information contained in the target defect problem sheet is obtained. The second element information of the present invention includes the problem attribution module, test steps, severity, result impact, brief description, triggering factor, sheet number, etc.

[0074] If there is no corresponding result when searching the use case library according to the second element information, the second element information is converted into the first element information accordingly. This step may include but is not limited to converting the problem attribution module of the defect ticket into a test module, converting the test steps of the defect ticket into preset conditions and test steps, converting the severity of the defect ticket into the priority of the use case, converting the result impact of the defect ticket into the expected result, converting the brief description of the defect ticket into the title of the use case, converting the triggering factors of the defect ticket into the test input of the use case, converting the ticket number of the defect ticket into the use case number (or determining the use case number by a separate generation method), of course not limited to this, wherein the first element information may include the use case number, test module, title of the use case, priority of the use case, preset conditions, test input, test steps and expected results.

[0075] The first element information is written into a preset blank test case to form a new test case, and the obtained new test case is stored in a test case library, wherein the preset blank test case refers to a test case with a standard test case format but no specific content.

[0076] Optionally, in some other embodiments of the present invention, converting a target defect problem ticket into a new test case based on an element mapping relationship includes: obtaining the second element information contained in the target defect problem ticket, searching the corresponding results in the use case library according to the second element information, screening out suitable test cases, modifying the first element information contained in the test case obtained by screening according to the second element information, and then using the test case with the modified first element information as a new test case. In this way, the amount of data written to form a new test case can be reduced, and it is only necessary to locate the content that needs to be modified according to content matching. Among them, the second element information includes the problem attribution module, test steps, severity, result impact, brief description, trigger factor, and order number, and the first element information includes the use case number, test module, use case title, use case priority, preset conditions, test input, test steps, and expected results.

[0077] It should be understood that the specific embodiments of the present invention can be implemented in combination with use case management tools and defect management tools. Among them, the use case management tools include HP ALM, Rational CQ, TestLink, ATQ, etc., and the defect management tools include Tracup, Bugtrags, Bugzilla, JIRA, etc.

[0078] like Figure 5 As shown, based on the same technical concept as the method for automatic optimization of test activities, one or more embodiments of the present invention can provide a device for automatic optimization of test activities. The device includes but is not limited to a serial number reading module, a defect search module, an intelligent mapping module, and a single number storage module.

[0079] The number reading module is used to read the number of the target test case; the execution result of the target test case is failure.

[0080] The serial number reading module in the present invention is specifically used to read the execution log information generated after the execution of multiple test cases, and to parse the execution log information, and to use at least one test case with a failed execution result as a target test case according to the parsing result.

[0081] The defect search module is used to execute commands to search for defect tickets that match the target test case from the defect library using the number as the search condition.

[0082] The intelligent mapping module is used to convert the target test case into a new defect ticket based on the element mapping relationship according to the fact that no matching defect ticket is found. The intelligent mapping module is specifically used to obtain the first element information contained in the target test case, and to convert the first element information into the second element information, and to write the second element information into a preset blank ticket to form a new defect ticket. In addition, the intelligent mapping module can also be used to write additional element information into a preset blank ticket to form a new defect ticket. The intelligent mapping module in some embodiments of the present invention can have the following working modes, that is, the conversion between the first element information and the second element information of this embodiment adopts at least one of the following modes. (1) Direct conversion: direct mapping in content, for example, the case number can be directly converted into the number of the defect ticket, the test module is directly converted into the problem attribution module, etc. In actual testing, this embodiment can also directly convert the version information issued by the task, the test responsible person information, etc. (2) Regular matching: For example, the title of a test case can be converted into a brief description of a defect ticket through regular matching; (3) Weighted conversion: For example, the priority of a test case can be converted into the severity of a defect ticket (or the impact of the result or whether it causes a blockage). It should be understood that based on the technical solution of the present invention, it is also possible to assist manual filling of a small part of the details.

[0083] The order number storage module is used to store the order number of a new defect ticket in the execution result of the target test case if no matching defect ticket is found; or to store the order number of the defect ticket in the execution result of the target test case if a matching defect ticket is found.

[0084] like Figure 6 As shown, based on the same technical concept as the method for automatic optimization of test activities, one or more embodiments of the present invention can provide a device for automatic optimization of test activities. The device includes but is not limited to a single number reading module, a use case search module, an intelligent mapping module, and a number storage module.

[0085] The order number reading module is used to read the order number of the target defect problem ticket.

[0086] The use case search module is used to execute commands to search for test cases that match the target defect ticket from the use case library using the ticket number as the search condition.

[0087] The intelligent mapping module is used to convert the target defect ticket into a new test case based on the element mapping relationship when no matching test case is found.

[0088] Specifically, the intelligent mapping module of the embodiment of the present invention is used to obtain the recurrence probability value of the target defect problem ticket, and to convert the target defect problem ticket into a new test case according to the recurrence probability value being greater than or equal to a preset probability value.

[0089] Optionally, the intelligent mapping module of the present invention can be specifically used to obtain the second element information contained in the target defect problem ticket, and to convert the second element information into the first element information, and to write the first element information into a preset blank test case to form a new test case.

[0090] Optionally, the intelligent mapping module of other embodiments of the present invention is specifically used to obtain the second element information contained in the target defect problem ticket, and to modify the first element information contained in the test case obtained by screening according to the second element information, and also to use the test case with the modified first element information as a new test case.

[0091] The number storage module is used to store the number of a new test case in the target defect issue sheet if no matching test case is found; or to store the number of a test case in the target defect issue sheet if a matching test case is found.

[0092] like Figure 7 As shown, based on the same technical concept as the method for automatic optimization of test activities in the present invention, one or more embodiments of the present invention can also provide a computer device, the computer device including a memory and a processor, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for automatic optimization of test activities in any embodiment of the present invention; wherein, the detailed steps of the method for automatic optimization of test activities have been described in detail in this specification and will not be repeated here.

[0093] Based on the same technical concept as the method for automatic optimization of test activities in the present invention, one or more embodiments of the present invention can also provide a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for automatic optimization of test activities in any embodiment of the present invention; wherein, the detailed steps of the method for automatic optimization of test activities have been described in detail in this specification and will not be repeated here.

[0094] In summary, the present invention can reduce duplication of work and improve work efficiency. When the bug is entered into the defect library, a supplementary test case is generated, which avoids the problem of repeated workload of entering the same information twice, and greatly improves the efficiency of software testing work. The present invention has a better timeliness effect, and the test case can be generated simultaneously with the bug problem sheet. Compared with the conventional method, the test case output speed is faster, and the problem of missing test cases is avoided. It can be seen that the present invention can intelligently integrate the test case library and the defect library, minimize the use case supplement after the pure human brain or manual tracking test design is missed, and also avoid the problem of repeated evaluation of data that does not pass the same test point. It can be seen that the present invention greatly facilitates the quality evaluation of software products, and the test coverage and efficiency are higher.

[0095] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus, or device and execute instructions), or in conjunction with such instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable storage medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device. More specific examples of computer-readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic devices), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory, or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM, Compact Disc Read-Only Memory). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0096] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA, Programmable Gate Array), a field programmable gate array (FPGA, Field Programmable Gate Array), etc.

[0097] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0098] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and simple improvements made to the essential contents of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for automatic optimization of test activities, characterized in that: include: Reading the number of a target test case, the execution result of the target test case being failure; Using the number as a search condition, executing a command to search for a defect ticket matching the target test case from a defect library; According to the fact that no matching defect ticket is found, the target test case is converted into a new defect ticket based on the element mapping relationship, and the ticket number of the new defect ticket is stored in the execution result of the target test case; or storing the number of the defect ticket in the execution result of the target test case according to the matched defect ticket found; The converting of the target test case into a new defect ticket based on the element mapping relationship includes: Acquire first element information contained in the target test case; convert the first element information into second element information; write the second element information into a preset blank problem sheet to form a new defect problem sheet; The first element information includes at least one of the following: use case number, test module, use case title, use case priority, preconditions, test input, test steps and expected results; The second element information includes at least one of the following: problem attribution module, test steps, severity, result impact, brief description, triggering factor, and order number.

2. The method for automatic optimization of test activities according to claim 1, characterized in that: The converting the target test case into a new defect ticket also includes: The additional element information is written into the preset blank problem sheet to form a new defect problem sheet.

3. The method for automatic optimization of test activities according to any one of claims 1 to 2, characterized in that: Before reading the number of the target test case, the following steps are also included: Read the execution log information generated after executing multiple test cases; The execution log information is parsed, and at least one test case with a failed execution result is used as a target test case according to the parsing result.

4. A method for automatic optimization of test activities, characterized in that: include: Read the number of the target defect ticket; Using the ticket number as a search condition, executing a command to search for a test case matching the target defect ticket from a case library; According to the failure to find a matching test case, converting the target defect problem sheet into a new test case based on the element mapping relationship, and storing the number of the new test case in the target defect problem sheet; or storing the number of the test case in the target defect problem sheet according to the matched test case found; The converting of the target defect problem sheet into a new test case based on the element mapping relationship includes: Acquire the second element information contained in the target defect problem ticket; convert the second element information into the first element information; write the first element information into a preset blank test case to form a new test case; The first element information includes at least one of the following: use case number, test module, use case title, use case priority, preconditions, test input, test steps and expected results; The second element information includes at least one of the following: problem attribution module, test steps, severity, result impact, brief description, triggering factor, and order number.

5. The method for automatic optimization of test activities according to claim 4, characterized in that: The converting the target defect problem ticket into a new test case based on the element mapping relationship includes: Obtaining second element information contained in the target defect problem sheet; Modify the first element information contained in the test case obtained through screening according to the second element information; The test case with the modified first element information is used as a new test case.

6. The method for automatic optimization of test activities according to any one of claims 4 to 5, characterized in that: The converting the target defect ticket into a new test case comprises: Obtaining a recurrence probability value of the target defect problem ticket; The target defect problem ticket is converted into a new test case according to the recurrence probability value being greater than or equal to a preset probability value.

7. A device for automatic optimization of test activities, characterized in that: include: The number reading module is used to read the number of the target test case; The execution result of the target test case is failure; A defect search module, used to execute a command to search for defect problem tickets matching the target test case from the defect library using the number as a search condition; An intelligent mapping module, for converting the target test case into a new defect ticket based on the element mapping relationship according to the fact that no matching defect ticket is found; A ticket number storage module, used to store the ticket number of the new defect ticket in the execution result of the target test case according to the failure to find a matching defect ticket; or used to store the ticket number of the defect ticket in the execution result of the target test case according to the finding of a matching defect ticket; The intelligent mapping module is further used to convert the target test case into a new defect ticket based on the element mapping relationship in the following manner: Acquire first element information contained in the target test case; convert the first element information into second element information; write the second element information into a preset blank problem sheet to form a new defect problem sheet; The first element information includes at least one of the following: use case number, test module, use case title, use case priority, preconditions, test input, test steps and expected results; The second element information includes at least one of the following: problem attribution module, test steps, severity, result impact, brief description, triggering factor, and order number.

8. A device for automatic optimization of test activities, characterized in that: The order number reading module is used to read the order number of the target defect problem order; A use case search module, used to execute a command to search for a test case matching the target defect problem ticket from a use case library using the ticket number as a search condition; An intelligent mapping module, for converting the target defect problem ticket into a new test case based on the element mapping relationship according to the test case that no matching test case is found; A number storage module, used for storing the number of the new test case in the target defect problem sheet according to the test case that does not find a matching one; Or used to store the number of the test case in the target defect problem sheet according to the matched test case found; The intelligent mapping module is further used to convert the target test case into a new defect ticket based on the element mapping relationship in the following manner: Acquire first element information contained in the target test case; convert the first element information into second element information; write the second element information into a preset blank problem sheet to form a new defect problem sheet; The first element information includes at least one of the following: use case number, test module, use case title, use case priority, preconditions, test input, test steps and expected results; The second element information includes at least one of the following: problem attribution module, test steps, severity, result impact, brief description, triggering factor, and order number.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for automatic optimization of test activities as claimed in any one of claims 1 to 3 or 4 to 6.

10. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the method for automatic optimization of testing activities according to any one of claims 1 to 3 or 4 to 6.

Citation Information

Patent Citations

  • Test method and system

    CN107547299A

  • Software project testing method and system, storage medium and terminal device

    CN109446076A