Test case determination method and device, equipment and storage medium

By obtaining the target test requirements information of the target application software and combining the defect knowledge base, we can determine the target defects and production events, thereby determining more effective test cases, solving the problem of insufficient coverage of test cases in the existing technology and improving the application software Test efficiency and adequacy.

CN119473912APending Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411731156.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art is considerate in designing test cases, resulting in less coverage of test cases, which in turn reduces the testing efficiency of application software.

Method used

By obtaining the target test requirements information of the target application software, combining the defect knowledge base and target optimization functions, we can determine the target defects and target production events, so as to determine more effective test cases and improve the coverage of test cases.

Benefits of technology

Improve the coverage of test cases, enhance the testing adequacy and testing efficiency of the application software, and can more comprehensively cover target testing requirements and historical defects and production events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473912A_ABST
    Figure CN119473912A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a test case determination method and device, equipment and a storage medium. The method comprises the steps of obtaining target test demand information corresponding to target application software to be tested; determining a first test case covering the target test demand information according to the target test demand information; determining a to-be-tested target defect and a target production event according to a defect knowledge base and a target optimization function in the target application software; according to the target defect and the target production event, determining a second test case for testing whether the target defect is generated or not and a third test case for testing whether the target production event is generated or not from a test asset library; and determining a to-be-executed test case set of the target application software according to the first test case, the second test case and the third test case. Through the technical scheme of the embodiment of the invention, more effective test cases can be determined, and the coverage of the test cases is improved, so that the test sufficiency and the test efficiency of the application software are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to computer technology, and in particular to a test case determination method, apparatus, device and storage medium. Background Art

[0002] A test case is a description of a test task for application software, and its purpose is to determine whether a certain feature of the application software can work normally.

[0003] At present, test cases are usually designed according to the improved functions of the current development software version, and software testing is performed by executing the designed test cases. However, the existing method is relatively one-sided when determining test cases, resulting in less coverage of test cases, which leads to insufficient testing of application software and requires multiple repeated tests, reducing the testing efficiency of application software. Summary of the invention

[0004] The embodiments of the present invention provide a test case determination method, apparatus, device and storage medium to determine more effective test cases and improve the coverage of test cases, thereby improving the test adequacy and test efficiency of application software.

[0005] In a first aspect, an embodiment of the present invention provides a test case determination method, comprising:

[0006] Obtaining target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing functions based on the historical application software;

[0007] Determine, according to the target test requirement information, a first test case covering the target test requirement information;

[0008] Determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes the historical defect information generated by the historical application software during testing and the historical production event information generated after going online;

[0009] According to the target defect and the target production event, determining from a test asset library a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated;

[0010] A set of test cases to be executed by the target application software is determined according to the first test case, the second test case and the third test case.

[0011] In a second aspect, an embodiment of the present invention further provides a test case determination device, comprising:

[0012] A target test requirement information acquisition module is used to acquire target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing the functions of the historical application software;

[0013] A first test case determination module, used to determine a first test case covering the target test requirement information according to the target test requirement information;

[0014] A target defect determination module, used to determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes the historical defect information generated by the historical application software during testing and the historical production event information generated after going online;

[0015] A second test case determination module is used to determine, from a test asset library, a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated, according to the target defect and the target production event;

[0016] The test case set determination module is used to determine the test case set to be executed by the target application software according to the first test case, the second test case and the third test case.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0018] at least one processor; and

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test case determination method provided by any embodiment of the present invention.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test case determination method provided by any embodiment of the present invention when executed.

[0022] One embodiment of the above invention has the following advantages or beneficial effects:

[0023] By determining the first test case covering the target test requirement information according to the target test requirement information corresponding to the target application software to be tested; determining the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software; determining from the test asset library a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated according to the target defect and the target production event; determining a set of test cases to be executed for the target application software according to the first test case, the second test case and the third test case, thereby taking into account not only the target test requirement information of the target application software, but also the target defects generated during the historical application software testing and the target production events generated when the software is put online, thereby determining more effective test cases, improving the coverage of test cases, and also improving the testing adequacy and efficiency of the application software.

[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 is a flow chart of a test case determination method provided by an embodiment of the present invention;

[0027] Figure 2 is a flowchart of another test case determination method provided by an embodiment of the present invention;

[0028] Figure 3 It is a structural schematic diagram of a test case determination device provided by an embodiment of the present invention;

[0029] Figure 4 It is a structural schematic diagram of an electronic device for implementing the test case determination method of an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Figure 1 This is a flow chart of a test case determination method provided by an embodiment of the present invention. This embodiment can be applied to the case of determining the test cases required for application software testing. The method can be executed by a test case determination device, which can be implemented by software and / or hardware, and the test case determination device can be configured in an electronic device. Figure 1 As shown, the method specifically comprises the following steps:

[0033] S110 , obtaining target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing functions on the basis of historical application software.

[0034] Among them, the target application software refers to the new version of the application software currently being developed, that is, the application software that needs to be tested before the new version goes online. The historical application software refers to the historical version of the application software developed before the current moment. The target application software and the historical application software can be the same software belonging to different versions. For example, the target application software refers to the newly developed 5.0 version of software A, and the historical application software refers to software A before version 5.0, such as software A from version 1.0 to version 4.0. The target test requirement information can be detailed information used to describe the test requirements of the target application software. The target test requirement information can include all the test contents that need to be tested for the target application software, such as the requirements specification and product specification. Among them, the requirements specification describes in detail the functional requirements, performance requirements, and user interface requirements of the software system. The product specification mainly describes how to solve the user's pain points through specific solutions. The requirements specification and product specification are both used to clarify the functional and performance requirements of the software product.

[0035] Specifically, based on business needs, application software needs to be continuously updated and iterated. Based on historical application software, developers can optimize the functions of historical application software, such as improving existing functions or adding new functions, so as to obtain the latest version of target application software, and at the same time analyze the test requirements of the target application software to obtain complete target test requirement information.

[0036] S120. Determine, according to the target test requirement information, a first test case that covers the target test requirement information.

[0037] Specifically, the target test requirement information may include multiple test requirement item information of the target application software. The number of first test cases is multiple. According to each test requirement item information in the target test requirement information, determine the first test case that covers each test requirement item information, that is, each first test case can meet the corresponding test requirement item information. For example, for each test requirement item information, a test case design can be performed directly based on the test requirement item information to obtain a first test case that can cover the test requirement item information; or, based on the test function corresponding to the test requirement item information, determine the candidate test case for testing the function from the test asset library, and replace and modify the inconsistent test case content in the candidate test case based on the test requirement item information to obtain the first test case that can cover the test requirement item information, thereby improving the efficiency of determining the first test case.

[0038] S130. Determine target defects and target production events to be tested according to a defect knowledge base and a target optimization function in the target application software, wherein the defect knowledge base includes historical defect information generated during testing of the historical application software and historical production event information generated after going online.

[0039] Among them, the defect knowledge base is used to store all historical defect information generated by each historical application software during the historical testing process and all historical production event information generated after the launch. Defects refer to functional defects generated during the software testing process, that is, some problems, errors, or hidden functional defects in the software that destroy the normal operation capability, which causes the software to fail to meet the needs of users to some extent. Production events are abnormal production operation events caused by software functional failures. Target defects refer to defects that need to be tested for the target application software. Target defects refer to functional defects that may be generated during the testing of the target application software. Target production events refer to production events that need to be tested for the target application software. Target production events refer to production events that may be generated after the target application software is launched. The number of target defects can be multiple. The number of target production events can be multiple. The target optimization function can refer to the improved functions and new functions of the target application software based on the historical application software.

[0040] Specifically, according to the target optimization function in the target application software, target defects and target production events that may be generated by the target application software are determined from the defect knowledge base.

[0041] Exemplarily, step S130 may include: determining a target historical defect that is functionally associated with the target optimization function based on the historical functions corresponding to the historical defect information in the defect knowledge base and the target optimization function in the target application software, and determining the target historical defect as the target defect to be tested; determining a target historical production event that is functionally associated with the target optimization function based on the historical functions corresponding to the historical production event information in the defect knowledge base and the target optimization function in the target application software, and determining the target historical production event as the target production event to be tested.

[0042] Specifically, the correlation between the historical function that generates each historical defect in the defect knowledge base and the target optimization function in the target application software is detected, and the historical defects corresponding to the historical functions associated with the target optimization function are determined as the target historical defects. For example, the historical defects corresponding to the historical functions that are mutually related or dependent on the target optimization function are determined as the target historical defects. And, the historical defects generated by the target optimization function in the defect knowledge base are determined as the target historical defects. All target historical defects are determined as target defects that may be generated by the target application software during testing, so that other functions associated with the target optimization function can be tested to see whether defects will be generated, thereby improving the adequacy of the test. Similarly, the correlation between the historical functions corresponding to each historical production event generated in the defect knowledge base and the target optimization function in the target application software is detected, and the historical production events corresponding to the historical functions associated with the target optimization function are determined as the target historical production events. For example, the historical production events corresponding to the historical functions that are mutually related or dependent on the target optimization function are determined as the target historical production events. And, the historical production events generated by the target optimization function in the defect knowledge base are determined as the target historical production events. All target historical production events are identified as target production events that may be generated after the target application software goes online, so that it is possible to test whether other functions associated with the target optimization function will generate production events, thereby improving the adequacy of the test.

[0043] Exemplarily, step S130 may also include: obtaining the number of defect occurrences corresponding to each historical defect in the defect knowledge base, and determining the historical defects whose defect occurrences are greater than a preset number as target defects to be tested; obtaining the number of production event occurrences corresponding to each historical production event in the defect knowledge base, and determining the historical production events whose production event occurrences are greater than a preset number as target production events to be tested.

[0044] Specifically, statistics are collected for the same historical defects generated during the test of the historical application software to determine the number of defect generation corresponding to each historical defect. The number of defect generation corresponding to each historical defect in the defect knowledge base is compared with the preset number of times, so as to determine the common defects that are frequently generated. By also determining the historical defects with a defect generation number greater than the preset number as the target defects that may also be generated during the test of the target application software, it is also possible to test whether the target application software generates common defects. Similarly, statistics are collected for the same historical production events generated after the historical application software goes online to determine the number of production event generation corresponding to each historical production event. The number of production event generation corresponding to each historical production event in the defect knowledge base is compared with the preset number of times, so as to determine the common production events that are frequently generated. By also determining the historical production events with a production event generation number greater than the preset number as the target production events that may be generated after the target application software goes online, it is also possible to test whether the target application software generates common production events, thereby further improving the adequacy of the test.

[0045] S140 . Determine, from the test asset library, according to the target defect and the target production event, a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated.

[0046] Among them, the test asset library can be a system asset library established by analyzing the business rules of the application system and combining the test requirements and existing test cases. The test asset library can include all test cases used in historical application software testing. The resources in the test asset library can be used to guide testers to conduct tests to ensure that the performance of the software in various scenarios meets expectations. The second test case is a test case used to test whether the target application software produces a target defect. The second test case corresponds one-to-one with the target defect. The third test case is a test case used to test whether the target application software produces a target production event. The third test case corresponds one-to-one with the target production event.

[0047] Specifically, according to each target defect, a second test case is screened out from the test asset library to test whether the target defect is generated, that is, the test case that generates the target defect in the test asset library is determined as the second test case, so as to maximize the possible defects of the target application software. According to each target production event, a third test case is screened out from the test asset library to test whether the target production event is generated, that is, the test case that generates the target production event in the test asset library is determined as the third test case, so as to effectively avoid the risk of the launch of the target application software.

[0048] Exemplarily, step S140 may include: filtering out a second test case that historically generated the target defect from the test asset library according to the name information of the target defect; and filtering out a third test case that historically generated the target production event from the test asset library according to the name information of the target production event.

[0049] Specifically, based on the name information of the target defect, test cases whose defect name information generated by historical test cases is the target defect name information are screened out from the test asset library, and the screened out test cases are determined as the second test cases. Based on the name information of the target production event, test cases whose production event name information generated by historical test cases is the target production event name information are screened out from the test asset library, and the screened out test cases are determined as the third test cases. By utilizing the test asset library, the second test case and the third test case can be obtained more quickly, thereby improving the test efficiency.

[0050] It should be noted that if there is no second test case in the test asset library that has historically generated the target defect, a corresponding second test case can be generated based on the target defect, or test cases that generate similar defects can be screened out from the test asset library, and the test case can be adjusted and modified to obtain a second test case for testing whether the target defect has occurred. Similarly, if there is no third test case in the test asset library that has historically generated the target production event, a corresponding third test case can be generated based on the target production event, or test cases that generate similar production events can be screened out from the test asset library, and the test case can be adjusted and modified to obtain a third test case for testing whether the target production event has occurred.

[0051] S150: Determine a set of test cases to be executed by the target application software according to the first test case, the second test case and the third test case.

[0052] Specifically, all first test cases, second test cases, and third test cases are deduplicated, and all deduplicated test cases are combined to obtain a set of test cases to be executed when the target application software is tested for the first time. By considering the target test requirement information of the target application software, the target defects generated during the historical application software testing, and the target production events generated during the launch, more effective test cases can be determined, thereby improving the adequacy of the test, and being able to quickly discover hidden and common defects in the application software, and avoiding production events as much as possible, achieving rapid testing of the launch functions.

[0053] The technical solution of this embodiment determines a first test case covering the target test requirement information according to the target test requirement information corresponding to the target application software to be tested; determines the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software; determines from the test asset library a second test case for testing whether the target defects are generated and a third test case for testing whether the target production events are generated according to the target defects and target production events; determines a set of test cases to be executed for the target application software according to the first test case, the second test case and the third test case, thereby taking into account not only the target test requirement information of the target application software, but also the target defects generated during the historical application software testing and the target production events generated when going online, thereby determining more effective test cases, improving the coverage of test cases, and also improving the testing adequacy and testing efficiency of the application software.

[0054] Based on the above technical solutions, step S150 may include: performing case deduplication processing on the first test case, the second test case and the third test case to obtain a processed fourth test case; deriving and supplementing the test case according to the test asset library and the fourth test case to determine the target derived case and the target supplemented case; determining the test case set to be executed by the target application software according to the fourth test case, the target derived case and the target supplemented case.

[0055] Specifically, all the first test cases, the second test cases and the third test cases are deduplicated, and all the test cases obtained after deduplication are used as the fourth test cases. According to the test data in the test asset library, new test cases can be derived by modifying or extending the fourth test case, so as to obtain the target derived case, so as to further discover new defects through the target derived case. For example, according to different usage scenarios or user behaviors in the test asset library, new test scenarios and test cases are derived from the fourth test case. According to the test data in the test asset library, additional test cases can be added on the basis of the fourth test case to cover more test scenarios or functional points, so as to obtain the target supplementary case, so as to further improve the adequacy of the test through the target supplementary case, and ensure the quality and accuracy of the software. All the fourth test cases, target derived cases and target supplementary cases are combined to obtain a set of test cases to be executed when the target application software is tested for the first time. By adding the target derived case and the target supplementary case, the coverage and quality of the software test can be further improved, the potential defects can be reduced, and the adequacy of the test can be further improved.

[0056] Figure 2A flowchart of another test case determination method provided by an embodiment of the present invention is provided. Based on the above embodiments, this embodiment describes in detail the process of determining the test case to be executed by the target application software in the next test after determining the test case set to be executed by the target application software. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0057] See also Figure 2 Another test case determination method provided in this embodiment specifically includes the following steps:

[0058] S210 , obtaining target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing functions on the basis of historical application software.

[0059] S220: Determine, according to the target test requirement information, a first test case that covers the target test requirement information.

[0060] S230. Determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes historical defect information generated during the testing of the historical application software and historical production event information generated after going online.

[0061] S240 . Determine, from the test asset library, according to the target defect and the target production event, a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated.

[0062] S250: Determine a set of test cases to be executed by the target application software according to the first test case, the second test case and the third test case.

[0063] S260: Determine an impact factor corresponding to each test case in the test case set, wherein the impact factor corresponding to each test case is greater than or equal to a preset impact factor.

[0064] The impact factor corresponding to the test case can be used to characterize the impact of the test case on the application software. The higher the impact factor, the more important the test case is and the better it can test the performance of the software. The preset impact factor refers to the minimum impact factor corresponding to the test case that needs to be executed.

[0065] Specifically, when the target application software is tested for the first time, each test case in the test case set needs to be executed, so that the impact factor corresponding to each test case in the test case set should be greater than or equal to the preset impact factor. The impact factor corresponding to each test case in the test case set can be set to the same impact factor, or different impact factors can be set based on the different sources of the test cases, so as to distinguish the importance of test cases from different sources. For example, the impact factor corresponding to the third test case is greater than the impact factor corresponding to the second test case, and the impact factor corresponding to the second test case is greater than the impact factor corresponding to the first test case. For example, if the preset impact factor is 1, the impact factor corresponding to each test case in the test case set can be set to 2. Alternatively, the impact factor corresponding to the first test case in the test case set is set to 2, the impact factor corresponding to the second test case is set to 3, and the impact factor corresponding to the third test case is set to 4.

[0066] S270: Update the impact factor corresponding to each test case in the test case set according to the test result after each test case in the test case set is executed.

[0067] Specifically, by executing each test case in the test case set, the target application software is tested for the first time to obtain the test result of each test case. Based on the test result of each test case, the impact factor corresponding to each test case can be updated to dynamically adjust the importance of each test case.

[0068] Exemplarily, step S270 may include: determining the fifth test case that failed and the sixth test case that succeeded according to the test results after executing each test case in the test case set; increasing and updating the impact factor corresponding to the fifth test case, and decreasing and updating the impact factor corresponding to the sixth test case.

[0069] Specifically, based on the test results after each test case is executed, the fifth test case that failed and the sixth test case that succeeded are obtained, that is, the fifth test case that generated defects after the test and the sixth test case that did not generate defects. Since the fifth test case generated defects during this test, the fifth test case needs to be executed again during the next test, so it is necessary to increase the impact factor corresponding to the fifth test case, such as adding 1 to the impact factor corresponding to the fifth test case. Since the sixth test case did not generate defects during this test, it is not necessary to execute the sixth test case during the next test, so it is necessary to reduce the impact factor corresponding to the sixth test case, such as subtracting 1 from the impact factor corresponding to the sixth test case.

[0070] S280: Determine the test cases whose updated impact factors are greater than or equal to the preset impact factors as the test cases to be executed in the next test of the target application software.

[0071] Specifically, the test cases that need to be executed in the next test can be quickly and accurately determined based on the dynamically updated impact factor, and based on the test results after the next test, the impact factor can be updated again by executing the above step S270, thereby determining the test cases that need to be executed in the subsequent test. The cycle is repeated until there is no test case whose impact factor is greater than or equal to the preset impact factor, and the test of the target application software is determined to be finished.

[0072] It should be noted that if new defects or new test requirements arise during subsequent testing, new test cases can be generated based on the new defects or new test requirements, and the new test cases can be added to the test case collection. At the same time, it is determined that the impact factor corresponding to the new test case is greater than or equal to the preset impact factor, so that the new test case can be executed during the next test, further improving the adequacy of software testing.

[0073] The technical solution of this embodiment updates the impact factor corresponding to each test case in the test case set according to the test results after execution of each test case in the test case set, and determines the test case whose updated impact factor is greater than or equal to the preset impact factor as the test case to be executed in the next test of the target application software. Therefore, based on the dynamically updated impact factor, the test case that needs to be executed in the subsequent test can be quickly and accurately determined, thereby further improving the software testing efficiency.

[0074] The following is an embodiment of a test case determination device provided in an embodiment of the present invention. The device and the test case determination methods of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the test case determination device, please refer to the embodiment of the above-mentioned test case determination method.

[0075] Figure 3 This is a schematic diagram of the structure of a test case determination device provided by an embodiment of the present invention. This embodiment can be applied to the case of determining the test cases required for application software testing. Figure 3 As shown, the device specifically includes: a target test requirement information acquisition module 310, a first test case determination module 320, a target defect determination module 330, a second test case determination module 340 and a test case set determination module 350.

[0076] Among them, the target test requirement information acquisition module 310 is used to obtain the target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by functional optimization based on the historical application software; the first test case determination module 320 is used to determine the first test case covering the target test requirement information according to the target test requirement information; the target defect determination module 330 is used to determine the target defect and target production event to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes the historical defect information generated by the historical application software during testing and the historical production event information generated after going online; the second test case determination module 340 is used to determine, from the test asset library, a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated according to the target defect and the target production event; the test case set determination module 350 is used to determine the test case set to be executed for the target application software according to the first test case, the second test case and the third test case.

[0077] The technical solution of this embodiment is to determine a first test case covering the target test requirement information according to the target test requirement information corresponding to the target application software to be tested; determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software; determine from the test asset library a second test case for testing whether the target defects are generated and a third test case for testing whether the target production events are generated according to the target defects and target production events; determine a set of test cases to be executed for the target application software according to the first test case, the second test case and the third test case, thereby taking into account not only the target test requirement information of the target application software, but also the target defects generated during the historical application software testing and the target production events generated when going online, thereby determining more effective test cases, improving the coverage of test cases, and also improving the testing adequacy and testing efficiency of the application software.

[0078] Optionally, the target defect determination module 330 is specifically configured to:

[0079] According to the historical functions corresponding to the historical defect information in the defect knowledge base and the target optimization function in the target application software, determine the target historical defect that is functionally associated with the target optimization function, and determine the target historical defect as the target defect to be tested;

[0080] According to the historical functions corresponding to the historical production event information in the defect knowledge base and the target optimization function in the target application software, the target historical production event that is functionally associated with the target optimization function is determined, and the target historical production event is determined as the target production event to be tested.

[0081] Optionally, the target defect determination module 330 is further specifically configured to:

[0082] Obtaining the defect generation times corresponding to each historical defect in the defect knowledge base, and determining the historical defects whose defect generation times are greater than a preset number as target defects to be tested;

[0083] The number of production event generation corresponding to each historical production event in the defect knowledge base is obtained, and the historical production event whose number of production event generation is greater than a preset number is determined as a target production event to be tested.

[0084] Optionally, the second test case determination module 340 is specifically configured to:

[0085] According to the name information of the target defect, a second test case that has historically generated the target defect is selected from a test asset library;

[0086] According to the name information of the target production event, a third test case that historically generated the target production event is screened out from a test asset library.

[0087] Optionally, the test case set determination module 350 is specifically configured to:

[0088] Perform case deduplication processing on the first test case, the second test case and the third test case to obtain a processed fourth test case;

[0089] Derivation and supplementation of test cases according to the test asset library and the fourth test case, and determination of target derived test cases and target supplementary test cases;

[0090] A set of test cases to be executed by the target application software is determined according to the fourth test case, the target derived case and the target supplementary case.

[0091] Optionally, the device further comprises:

[0092] An impact factor determination module, used to determine an impact factor corresponding to each test case in the test case set, wherein the impact factor corresponding to each test case is greater than or equal to a preset impact factor;

[0093] An impact factor updating module, used to update the impact factor corresponding to each test case in the test case set according to the test result after each test case in the test case set is executed;

[0094] The subsequent test case determination module is used to determine the test case whose updated impact factor is greater than or equal to the preset impact factor as the test case to be executed in the next test of the target application software.

[0095] Optionally, the impact factor updating module is specifically used to:

[0096] Determine, according to the test results of each test case in the test case set after execution, a fifth test case that fails the test and a sixth test case that succeeds the test;

[0097] The impact factor corresponding to the fifth test case is increased and updated, and the impact factor corresponding to the sixth test case is decreased and updated.

[0098] The test case determination device provided in the embodiment of the present invention can execute the test case determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the test case determination method.

[0099] It is worth noting that in the embodiment of the above-mentioned test case determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0100] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0101] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0102] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various test case determination methods and processes described above.

[0104] In some embodiments, the test case determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the test case determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the test case determination method in any other appropriate manner (e.g., by means of firmware).

[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] The computer program for implementing the test case determination method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A test case determination method, characterized in that: include: Obtaining target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing functions based on the historical application software; Determine, according to the target test requirement information, a first test case covering the target test requirement information; Determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes the historical defect information generated by the historical application software during testing and the historical production event information generated after going online; According to the target defect and the target production event, determining from a test asset library a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated; A set of test cases to be executed by the target application software is determined according to the first test case, the second test case and the third test case.

2. The method according to claim 1, characterized in that Determine target defects and target production events to be tested based on the defect knowledge base and the target optimization function in the target application software, including: According to the historical functions corresponding to the historical defect information in the defect knowledge base and the target optimization function in the target application software, determine the target historical defect that is functionally associated with the target optimization function, and determine the target historical defect as the target defect to be tested; According to the historical functions corresponding to the historical production event information in the defect knowledge base and the target optimization function in the target application software, the target historical production event that is functionally associated with the target optimization function is determined, and the target historical production event is determined as the target production event to be tested.

3. The method according to claim 2, characterized in that Determining target defects and target production events to be tested based on the defect knowledge base and the target optimization function in the target application software, further comprising: Obtaining the defect generation times corresponding to each historical defect in the defect knowledge base, and determining the historical defects whose defect generation times are greater than a preset number as target defects to be tested; The number of production event generation corresponding to each historical production event in the defect knowledge base is obtained, and the historical production event whose number of production event generation is greater than a preset number is determined as a target production event to be tested.

4. The method according to claim 1, characterized in that: According to the target defect and the target production event, determining from a test asset library a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated, comprising: According to the name information of the target defect, a second test case that has historically generated the target defect is selected from a test asset library; According to the name information of the target production event, a third test case that historically generated the target production event is screened out from a test asset library.

5. The method according to claim 1, characterized in that Determining a set of test cases to be executed by the target application software according to the first test case, the second test case, and the third test case, includes: Perform case deduplication processing on the first test case, the second test case and the third test case to obtain a processed fourth test case; Derivation and supplementation of test cases according to the test asset library and the fourth test case, and determination of target derived test cases and target supplementary test cases; A set of test cases to be executed by the target application software is determined according to the fourth test case, the target derived case and the target supplementary case.

6. The method according to claim 1, characterized in that After determining the test case set to be executed by the target application software, the method further includes: Determine an impact factor corresponding to each test case in the test case set, wherein the impact factor corresponding to each test case is greater than or equal to a preset impact factor; According to the test result after executing each test case in the test case set, the impact factor corresponding to each test case in the test case set is updated; The test cases whose updated impact factors are greater than or equal to the preset impact factors are determined as the test cases to be executed in the next test of the target application software.

7. The method according to claim 6, characterized in that According to the test result after each test case in the test case set is executed, the impact factor corresponding to each test case in the test case set is updated, including: Determine, according to the test results of each test case in the test case set after execution, a fifth test case that fails the test and a sixth test case that succeeds the test; The impact factor corresponding to the fifth test case is increased and updated, and the impact factor corresponding to the sixth test case is decreased and updated.

8. A test case determination device, characterized in that: include: A target test requirement information acquisition module is used to acquire target test requirement information corresponding to the target application software to be tested, wherein the target application software is obtained by optimizing the functions of the historical application software; A first test case determination module, used to determine a first test case covering the target test requirement information according to the target test requirement information; A target defect determination module, used to determine the target defects and target production events to be tested according to the defect knowledge base and the target optimization function in the target application software, wherein the defect knowledge base includes the historical defect information generated by the historical application software during testing and the historical production event information generated after going online; A second test case determination module is used to determine, from a test asset library, a second test case for testing whether the target defect is generated and a third test case for testing whether the target production event is generated, according to the target defect and the target production event; The test case set determination module is used to determine the test case set to be executed by the target application software according to the first test case, the second test case and the third test case.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the test case determination method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test case determination method according to any one of claims 1 to 7 when executed.