Test method and device, equipment and storage medium

By scoring historical test data of software functional modules from multiple dimensions, and selecting modules to be tested for regression testing, the problems of repeated testing and neglect of key modules in regression testing are solved, thereby improving testing efficiency and coverage.

CN120849286APending Publication Date: 2025-10-28CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510996219.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In software regression testing, the lack of a systematic selection method leads to repeated testing of certain functions while neglecting other important modules, thus affecting testing efficiency.

Method used

By obtaining historical test data of functional modules, combining case design data, test batch data and defect data to perform multi-dimensional comprehensive scoring, the target scoring results of functional modules are determined, and the functional modules to be tested are selected for regression testing based on the scoring results.

Benefits of technology

Improve the efficiency of regression testing, ensure that the test covers key modules, reduce invalid testing, and improve the comprehensiveness and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849286A_ABST
    Figure CN120849286A_ABST
Patent Text Reader

Abstract

The invention discloses a test method and device, equipment and a storage medium, and relates to the technical field of computers, the method comprises the steps that historical test data of each function module is acquired, and the historical test data comprises case design data, test batch data and defect data associated with at least one test case; for any function module, performing comprehensive scoring on one or more of case design data, test batch data and defect data corresponding to the function module to obtain a target scoring result of the function module; and according to the target scoring result of each functional module, selecting a to-be-tested functional module from each functional module so as to carry out regression testing on the to-be-tested functional module. According to the method and the device, the target scoring result of each functional module is obtained by performing multi-dimensional comprehensive scoring on each functional module, and the to-be-tested functional module is accurately selected according to the target scoring result of the functional module for performing the regression test, so that the test efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a testing method, apparatus, device, and storage medium. Background Art

[0002] With the rapid development of technology, software has permeated all industries, and its iteration and update speed is becoming increasingly faster. At the same time, people's requirements for software quality are also rising. Software testing, as a key link in ensuring software quality, plays a vital role in the entire development process. Among them, regression testing, as an important component of software testing, plays an irreplaceable role in ensuring software stability and reliability. Especially today, with the adoption of agile development and continuous delivery models, frequent version updates have significantly increased the number of regression tests performed. However, when conducting regression testing, testers often need to rely on personal experience or random selection to determine the functional modules to be tested. This lack of a systematic selection method may lead to the repeated testing of certain functions while neglecting other important modules, ultimately affecting the overall testing efficiency. Summary of the Invention

[0003] The main objective of this application is to provide a testing method, apparatus, device, and storage medium, which aims to improve testing efficiency.

[0004] To achieve the above objectives, this application proposes a testing method, comprising:

[0005] Obtain historical test data for each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data, and defect data;

[0006] For any of the aforementioned functional modules, one or more of the case design data, test batch data, and defect data corresponding to the functional module are comprehensively scored to obtain the target score result of the functional module.

[0007] Based on the target score results of each functional module, a functional module to be tested is selected from each functional module to conduct regression testing on the functional module to be tested.

[0008] In one embodiment, the step of comprehensively scoring one or more of the case design data, test batch data, and defect data corresponding to the functional module to obtain the target score result of the functional module includes:

[0009] A weighted score is applied to one or more of the case design data, the test batch data, and the defect data to obtain one or more of the following: a first score result corresponding to the case design data, a second score result corresponding to the test batch data, and a third score result corresponding to the defect data.

[0010] The target score of the functional module is determined based on one or more of the first score result, the second score result, and the third score result.

[0011] In one embodiment, the case design data is weighted and scored to obtain a first scoring result corresponding to the case design data, including:

[0012] Determine the case priority and case type corresponding to the case design data;

[0013] Based on the weight coefficients associated with the case priority and the case type, the first scoring result corresponding to the case design data is determined.

[0014] In one embodiment, the test batch data is weighted and scored to obtain a second scoring result corresponding to the test batch data, including:

[0015] Based on the test batch data, determine the number of times the test case will be rerun and the execution status during the rerun process;

[0016] The target weight coefficient is determined based on the number of reruns and the execution status during the reruns.

[0017] Based on the target weight coefficient, determine the second score result corresponding to the test batch data.

[0018] In one embodiment, the defect data is weighted and scored to obtain a third scoring result corresponding to the defect data, including:

[0019] Determine the severity of the defect, the priority of defect repair, and the number of days for defect repair corresponding to the defect data;

[0020] The third scoring result corresponding to the defect data is determined based on the weighting coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair.

[0021] In one embodiment, after selecting a functional module to be tested from among the functional modules based on the target score results of each functional module, and performing regression testing on the functional module to be tested, the method further includes:

[0022] Determine the regression test results corresponding to the functional module to be tested;

[0023] If the regression test result is passed, the target score result of the functional module to be tested is corrected according to the preset first correction coefficient.

[0024] If the regression test result is unsuccessful, then the defect data generated by the functional module under test after the regression test is determined; a weighted score is applied to the defect data generated by the functional module under test after the regression test to obtain a weighted score result;

[0025] The target score of the functional module to be tested is corrected based on the preset second correction coefficient and the weighted score result.

[0026] In one embodiment, the step of selecting a functional module to be tested from among the functional modules based on the target score results of each functional module, and performing regression testing on the functional module to be tested, includes:

[0027] The target score results of each functional module are sorted to obtain the score ranking result;

[0028] Based on the scoring and sorting results, a preset number of target functional modules are selected from each of the functional modules;

[0029] Each of the target functional modules and its associated test cases are pushed to the testers so that the testers can select the functional modules to be tested and the test cases.

[0030] Based on the case design data corresponding to the selected test cases, regression testing is performed on the functional modules to be tested.

[0031] Furthermore, to achieve the above objectives, this application also proposes a testing apparatus, which includes:

[0032] The acquisition module is used to acquire historical test data of each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data, and defect data;

[0033] The scoring module is used to comprehensively score one or more of the case design data, test batch data and defect data corresponding to any of the functional modules, and obtain the target scoring result of the functional module.

[0034] The testing module is used to select a functional module to be tested from among the functional modules based on the target score results of each functional module, so as to perform regression testing on the functional module to be tested.

[0035] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the test method as described above.

[0036] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the test method described above.

[0037] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the test method described above.

[0038] This application provides a testing method, apparatus, device, and storage medium. The testing method includes: acquiring historical test data for each functional module, wherein the historical test data includes at least one test case-related case design data, test batch data, and defect data; for any functional module, comprehensively scoring one or more of the case design data, test batch data, and defect data corresponding to the functional module to obtain a target score result for the functional module; and selecting a functional module to be tested from among the functional modules based on the target score results for regression testing of the functional module to be tested. This application combines the case design data, test batch data, and defect data of the functional module during the testing process to perform multi-dimensional comprehensive scoring on each functional module, obtaining a target score result for each functional module. Therefore, based on the target score results of the functional modules, the functional modules to be tested are accurately selected for regression testing, effectively improving testing efficiency. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating the test method of this application in Embodiment 1;

[0042] Figure 2This is a flowchart illustrating the second embodiment of the test method of this application.

[0043] Figure 3 This is a flowchart illustrating the testing method of Embodiment 3 of this application;

[0044] Figure 4 This is a schematic diagram of the weight coefficient distribution provided in an embodiment of this application;

[0045] Figure 5 This is a flowchart illustrating the test method of embodiment four of this application;

[0046] Figure 6 This is a flowchart illustrating the fifth embodiment of the test method of this application.

[0047] Figure 7 This is a flowchart illustrating the sixth embodiment of the test method of this application;

[0048] Figure 8 This is a flowchart illustrating the seventh embodiment of the test method of this application.

[0049] Figure 9 This is a schematic diagram of the module structure of the test device in an embodiment of this application;

[0050] Figure 10 This is a schematic diagram of the device structure of the hardware operating environment involved in the test method in the embodiments of this application.

[0051] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0052] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0053] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0054] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, big data service platform, or testing system capable of performing the above functions. The following description uses a testing system as an example to illustrate this embodiment and the subsequent embodiments.

[0055] Accordingly, this application provides a testing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the testing method of this application. In this embodiment, the testing method includes the following steps:

[0056] Step S11: Obtain historical test data for each functional module;

[0057] It should be noted that the software has multiple functional modules, and each functional module corresponds to at least one test case to test whether the functional module functions properly. However, one test case can only correspond to one functional module. Therefore, there is a one-to-many relationship between a functional module and test cases. The historical test data includes test case design data, test batch data, and defect data associated with at least one test case.

[0058] The test case design data refers to a complete set of test case data (used to test whether the system functions properly). The test case design data includes information such as the case name, preconditions, test steps, expected results, and actual results. As a specific example, to test a login function, the test case design can be found in Table 1.

[0059]

[0060] The test batch data refers to the execution results of test cases after they are made into automated scripts and executed at preset time periods. Test batch data usually includes information such as case name, execution status (pass or fail), and specific failure information.

[0061] Furthermore, it should be noted that if the actual results differ from the expected results when executing test cases, it indicates a problem with the system, and defect data needs to be recorded. The format for recording defect data can be found in Table 2.

[0062]

[0063] Specifically, in order to comprehensively assess the quality and risks of functional modules, it is necessary to systematically collect historical test data of each functional module during the testing process. For example, collect case design data (test design related to requirement changes), test batch data (daily automated test execution results), and defect data (defects found in past production or testing).

[0064] Step S12: For any of the functional modules, a comprehensive score is given to one or more of the case design data, test batch data and defect data corresponding to the functional module to obtain the target score result of the functional module.

[0065] In this embodiment, the following steps are performed for any of the functional modules: In one embodiment, factors for scoring the functional module are selected from the case design data, test batch data, and defect data corresponding to the functional module. One or more of the case design data, test batch data, and defect data are scored according to pre-configured multi-dimensional scoring indicators and the weight coefficients associated with the scoring indicators. Specifically, the case design data is weighted and scored according to the various scoring indicators associated with the case design data and the weight coefficients associated with the scoring indicators to obtain a first scoring result corresponding to the case design data; the test batch data is weighted and scored according to the various scoring indicators associated with the test batch data and the weight coefficients associated with the scoring indicators to obtain a second scoring result corresponding to the test batch data; the defect data is weighted and scored according to the various scoring indicators associated with the defect data and the weight coefficients associated with the scoring indicators to obtain a third scoring result corresponding to the defect data. It should be noted that the weight coefficients associated with each scoring indicator can be set according to actual conditions. The multi-dimensional scoring indicators include indicators such as case priority, case type, number of reruns, execution status of reruns, defect severity, defect repair priority, and defect repair days. Optionally, the case priority can be determined based on the importance of the business involved in the functional module, with the priority of the core business of the system set to high. The severity of the defect can be determined based on the degree of impact of the functional module on the system operation. Further, the target score result of the functional module is determined based on one or more of the first score result, the second score result, and the third score result. If only one score factor is included, the score result is directly used as the target score result of the functional module. If multiple score factors are included, the score results of the multiple score factors are superimposed, and the superimposed result is used as the target score result of the functional module.

[0066] In addition, in other embodiments, the functional module is associated with multiple test cases. Each test case is grouped according to its functional module. During the scoring process, the case design data corresponding to each test case of the functional module is weighted and scored. Then, the weighted scores are averaged to obtain the first score result. The processing of test batch data and defect data is similar to the scoring process of case design data, and will not be described in detail here.

[0067] Step S13: Based on the target score results of each functional module, select the functional module to be tested from among the functional modules to perform regression testing on the functional module to be tested.

[0068] In this embodiment, the target score results of each functional module are sorted to obtain a score ranking result; then, based on the score ranking result, a preset number of target functional modules are selected from each functional module; for example, the 10 functional modules with the highest score results are selected. Then, regression testing is performed on each target functional module in conjunction with the test cases associated with each target functional module. In other embodiments, each target functional module and its associated test cases are pushed to testers for the testers to select the functional modules and test cases to be tested; further, regression testing is performed on the functional modules to be tested based on the case design data corresponding to the selected test cases. Additionally, in other embodiments, multiple test cases with high first score results can be recommended to testers for selection based on the first score result of the case design data.

[0069] This embodiment combines case design data, test batch data, and defect data of functional modules during the testing process to perform a multi-dimensional comprehensive score for each functional module, obtaining the target score result for each functional module. Based on the target score result of the functional module, the functional module to be tested is accurately selected for regression testing, effectively improving the efficiency of testing.

[0070] Reference Figure 2 , Figure 2 This is a flowchart illustrating the testing method of Embodiment 2 of this application. In one feasible implementation, one or more of the case design data, test batch data, and defect data corresponding to the functional module are comprehensively scored to obtain the target score result of the functional module, including:

[0071] Step S21: Weighted scoring is performed on one or more of the case design data, the test batch data, and the defect data to obtain one or more of the first scoring result corresponding to the case design data, the second scoring result corresponding to the test batch data, and the third scoring result corresponding to the defect data.

[0072] Step S22: Determine the target score result of the functional module based on one or more of the first score result, the second score result, and the third score result.

[0073] It should be noted that the scoring results can assess the quality of testing, such as whether the test case design is reasonable and whether the test execution is sufficient, as well as measure the stability of the system, such as the success rate of batch testing and the efficiency of defect repair.

[0074] In this embodiment, one or more of the case design data, test batch data, and defect data can be selected as scoring factors for the evaluation function module. Preferably, to improve the comprehensiveness and accuracy of the evaluation, the three major scoring dimensions of case design data, test batch data, and defect data are considered comprehensively. Furthermore, each dimension includes several scoring indicators and is assigned corresponding weight coefficients. In this embodiment, one or more of the case design data, test batch data, and defect data are weighted and scored. Specifically, the case design data is weighted and scored according to the various scoring indicators associated with it and the weight coefficients associated with those indicators; the test batch data is weighted and scored according to the various scoring indicators associated with it and the weight coefficients associated with those indicators; the defect data is weighted and scored according to the various scoring indicators associated with it and the weight coefficients associated with those indicators, resulting in one or more of the following: a first scoring result corresponding to the case design data, a second scoring result corresponding to the test batch data, and a third scoring result corresponding to the defect data. Furthermore, it should be noted that for case design data, the scoring indicators include, but are not limited to, case priority and case type. For test batch data, the scoring metrics include, but are not limited to, the number of retries and the execution status associated with those retries. For defect data, the scoring metrics include, but are not limited to, defect severity, defect repair priority, and defect repair days. Based on the weighting coefficients associated with each scoring metric, the scoring results corresponding to the case design data, test batch data, and defect data are calculated respectively. Further, based on one or more of the first, second, and third scoring results, the target scoring result for the functional module is determined. Optionally, when only one scoring result is included, that result is directly used as the target scoring result for the functional module. When multiple scoring results are included, they are superimposed to obtain the target scoring result for the functional module. In this embodiment, to improve the accuracy of the scoring, the scoring of the case design data, test batch data, and defect data are comprehensively considered, and the first, second, and third scoring results are superimposed to obtain the target scoring result for the functional module.

[0075] This embodiment combines multiple scoring indicators to weight and score the case design data, the test batch data, and the defect data, thereby achieving a comprehensive multi-dimensional score for each functional module. Based on the scoring results, the functional modules to be tested can be accurately selected, improving the overall efficiency of the test.

[0076] Reference Figure 3 , Figure 3This is a flowchart illustrating the testing method of embodiment three of this application; in one feasible implementation, the case design data is weighted and scored to obtain a first score result corresponding to the case design data, including:

[0077] Step S31: Determine the case priority and case type corresponding to the case design data;

[0078] Step S32: Determine the first scoring result corresponding to the case design data based on the weight coefficients associated with the case priority and the case type.

[0079] It should be noted that, referring to Figure 4 , Figure 4 This diagram illustrates the weighting coefficient distribution in one embodiment of the present application. In one embodiment, case design data is analyzed based on two scoring indicators: case priority and case type. Case priority is determined according to the importance of the business corresponding to the functional module, and includes high, medium, and low priorities. Case types include processes, functional points, report statistics, algorithms, data security, etc. In other embodiments, information such as code change frequency and test resource consumption can also be used as scoring indicators.

[0080] Specifically, the case priority and case type corresponding to the case design data are determined, and then the weight coefficients associated with the case priority and the case type are determined. Further, based on the preset initial score, the weight coefficients associated with the case priority and the weight coefficients associated with the case type, the first score result corresponding to the case design data is calculated. The calculation formula for the first score result is as follows: First score result = Initial score * (1 + Weight coefficient of case priority) * (1 + Weight coefficient of case type).

[0081] This embodiment calculates the first score result corresponding to the case design data based on the weight coefficients associated with case priority and case type, ensuring that high-priority test cases occupy a more important position in the scoring. By using case design data as a factor in recommending functional modules to be tested, the allocation of test resources is more reasonable, and the comprehensiveness of testing can be improved.

[0082] Reference Figure 5 , Figure 5 This is a flowchart illustrating the test method of embodiment four of this application; in one feasible implementation, the test batch data is weighted and scored to obtain a second scoring result corresponding to the test batch data, including:

[0083] Step S41: Based on the test batch data, determine the number of times the test case will be rerun and the execution status during the rerun test.

[0084] Step S42: Determine the target weight coefficient based on the number of reruns and the execution status during the reruns.

[0085] Step S43: Determine the second score result corresponding to the test batch data based on the target weight coefficient.

[0086] It should be noted that the preset number of test reruns should be set according to actual conditions, for example, once and / or twice. Execution status includes test pass and test failure. Test batch data refers to the data obtained after test cases are made into automated scripts and executed periodically according to preset time cycles.

[0087] Specifically, based on the test batch data, the number of times the test cases are rerun is determined, and the execution status during the rerun is determined. Further, based on the number of reruns and the execution status, a target weight coefficient is determined, for example, referring to... Figure 4 The test run is repeated once, and the execution status is passed, with a target weight coefficient of 0.0125. Further, based on the preset initial score and target weight coefficient, a second score result corresponding to the test batch data is calculated. The calculation formula for the second score result is as follows: Second score result = Initial score * (1 + Weight coefficient associated with execution status). In this embodiment, the initial score is the same as the initial score used to calculate the first score result; in other embodiments, they can be set differently.

[0088] This embodiment determines the target weight coefficient based on the number of times the test case is rerun and the execution status during the rerun process. Then, based on the target weight coefficient, the second score result corresponding to the test batch data is calculated. By using the test batch data as a factor to recommend functional modules to be tested, the comprehensiveness and depth of test coverage are ensured, thereby avoiding the omission of key test points.

[0089] Reference Figure 6 , Figure 6 This is a flowchart illustrating the fifth embodiment of the testing method of this application; in one feasible implementation, the defect data is weighted and scored to obtain a third score result corresponding to the defect data, including:

[0090] Step S51: Determine the severity of the defect, the priority of defect repair, and the number of days for defect repair corresponding to the defect data;

[0091] Step S52: Determine the third score result corresponding to the defect data based on the weight coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair.

[0092] It should be noted that, referring to Figure 4In one embodiment, defect data is analyzed based on three scoring indicators: defect severity, defect repair priority, and defect repair days. Defect severity is determined by the impact of a functional module on system operation. For example, a critical defect severity level is defined as: module failure will directly lead to system crashes, core business interruptions, or major security incidents (e.g., the payment module cannot deduct funds). A severe defect severity level is defined as: module failure will significantly reduce the availability of core functions or cause critical data errors (e.g., order status synchronization failure). A moderate defect severity level is defined as: module defects only affect non-critical functions or user experience (e.g., page loading delays). A minor defect severity level is defined as: module problems are almost imperceptible, only involving abnormal prompt text or style (e.g., typos). Defect repair priority is determined based on defect severity. For example, defects with high severity are set to high repair priority. For instance, defects where module failure will directly lead to system crashes, core business interruptions, or major security incidents, or defects that will significantly reduce the availability of core functions or cause critical data errors, require immediate repair; therefore, their repair priority is set to high. In addition, the number of days for defect repair can be determined based on the difficulty of repairing different types of defects, or based on the severity of the defects. For example, defects that will directly lead to system crashes, core business interruptions or major security incidents due to module failures need to be repaired as soon as possible, and the number of days for defect repair is set to less than 1 day.

[0093] Specifically, the severity of the defect, the priority of defect repair, and the number of days for defect repair are determined for the defect data. Then, the weight coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair are determined. Further, based on the preset initial score, the weight coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair, a third score result corresponding to the defect data is calculated, wherein the third score result = initial score * (1 + weight coefficient of severity of defect) * (1 + weight coefficient of priority of defect repair) * (1 + weight coefficient of number of days for defect repair).

[0094] This embodiment calculates the third score result corresponding to the defect data by using the weight coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair. By using the defect data as a factor to recommend functional modules to be tested, it can ensure that high-impact defects are repaired first, thereby reducing the impact of critical defects on system stability.

[0095] Reference Figure 7 , Figure 7The flowchart provided for Embodiment Six of the testing method of this application; in a feasible implementation, based on the target score results of each functional module, a functional module to be tested is selected from each functional module to perform regression testing on the functional module to be tested, including:

[0096] Step S61: Sort the target score results of each functional module to obtain the score ranking result;

[0097] Step S62: Based on the scoring and sorting results, a preset number of target functional modules are selected from each of the functional modules;

[0098] Specifically, the target score results of each functional module are sorted in descending or ascending order to obtain a score ranking result; then, based on the score ranking result, a preset number of target functional modules with higher scores are selected from each functional module. The preset number can be set according to actual conditions, for example, 10.

[0099] Step S63: Push each of the target functional modules and their associated test cases to the testers so that the testers can select the functional modules to be tested and the test cases.

[0100] Step S64: Based on the case design data corresponding to the selected test cases, perform regression testing on the functional modules to be tested.

[0101] Specifically, each target functional module has a series of associated test cases. In this embodiment, the selected target functional modules and their associated test cases are pushed to testers. The push method can be through test management tools, system notifications, or email notifications. The push content should include information such as the functional module name, target score result, and associated test cases. Testers, based on the target score result and current requirement changes, independently decide to select the functional modules and test cases to be tested for regression testing. Furthermore, based on the case design data corresponding to the test cases selected by the testers, regression testing is performed on the functional modules to be tested, thereby ensuring the stability and reliability of the system.

[0102] In other embodiments, a predetermined number of target functional modules with higher scores can be selected from each functional module based on the scoring and ranking results. Then, regression testing can be performed on the target functional modules using the case design data of the test cases associated with the target functional modules.

[0103] This embodiment filters out a preset number of target functional modules based on the target score results of the functional modules. Testers can quickly identify the modules that need to be focused on, and then directly select the functional modules to be tested and test cases. Furthermore, based on the case design data corresponding to the selected test cases, regression testing is performed on the functional modules to be tested, reducing invalid tests and improving testing efficiency.

[0104] Reference Figure 8 , Figure 8 This is a flowchart illustrating the testing method of embodiment seven of this application; in one feasible implementation, after selecting a functional module to be tested from among the functional modules based on the target score results of each functional module, and performing regression testing on the functional module to be tested, the method further includes:

[0105] Step S71: Determine the regression test results corresponding to the functional module to be tested;

[0106] It should be noted that regression test results include both passing and failing tests. When the actual results of regression testing are inconsistent with the expected results, defect data will be recorded. When the actual results are consistent with the expected results, there is no need to record defect data.

[0107] Step S72: If the regression test result is passed, the target score result of the functional module to be tested is corrected according to the preset first correction coefficient.

[0108] It should be noted that the first correction coefficient can be set according to the actual situation. For example, the first correction coefficient can be set to 0.8. Specifically, if the regression test result is passed, it proves that no new defects have been generated. Then, the first correction coefficient can be directly used to correct the target score result of the functional module to be tested. That is, the target score result is multiplied by the first correction coefficient to obtain the final target score result.

[0109] Step S73: If the regression test result is unsuccessful, then determine the defect data generated by the functional module to be tested after the regression test; perform a weighted score on the defect data generated by the functional module to be tested after the regression test to obtain a weighted score result;

[0110] Step S74: Correct the target score result of the functional module to be tested according to the preset second correction coefficient and the weighted score result.

[0111] It should be noted that the second correction coefficient can be set according to the actual situation. Generally, the second correction coefficient is greater than the first correction coefficient. For example, the second correction coefficient is set to 1.2. Specifically, if the regression test result is unsuccessful, it proves that the functional module under test will generate new defect data after the regression test. Then, a weighted score is applied to the defect data generated by the functional module under test after the regression test. It should be noted that the weighted scoring process of the defect data in this embodiment is the same as the calculation process of steps S51-S52 above, and will not be repeated here, thus obtaining the weighted scoring result. Further, according to the preset second correction coefficient and the weighted scoring result, the target score result of the functional module under test is corrected. That is, the target score result of the functional module under test is multiplied by the second correction coefficient, and the result of the multiplication is superimposed with the weighted scoring result to obtain the final target score result.

[0112] This embodiment improves the accuracy of the evaluation by correcting the target score result based on the regression test results corresponding to the functional module to be tested after performing a new regression test.

[0113] It should be noted that the examples in the figure are only for understanding this application and do not constitute a limitation on the testing methods of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0114] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0115] This application also provides a testing apparatus, please refer to... Figure 9 , Figure 9 This is a schematic diagram of the module structure of the testing device according to an embodiment of this application; the testing device includes:

[0116] The acquisition module 91 is used to acquire historical test data of each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data and defect data;

[0117] The scoring module 92 is used to comprehensively score one or more of the case design data, test batch data and defect data corresponding to any of the functional modules, and obtain the target scoring result of the functional module.

[0118] The testing module 93 is used to select a functional module to be tested from among the functional modules based on the target score results of each functional module, so as to perform regression testing on the functional module to be tested.

[0119] The scoring module 92 is also used for:

[0120] A weighted score is applied to one or more of the case design data, the test batch data, and the defect data to obtain one or more of the following: a first score result corresponding to the case design data, a second score result corresponding to the test batch data, and a third score result corresponding to the defect data.

[0121] The target score of the functional module is determined based on one or more of the first score result, the second score result, and the third score result.

[0122] The scoring module 92 is also used for:

[0123] Determine the case priority and case type corresponding to the case design data;

[0124] Based on the weight coefficients associated with the case priority and the case type, the first scoring result corresponding to the case design data is determined.

[0125] The scoring module 92 is also used for:

[0126] Based on the test batch data, determine the number of times the test case will be rerun and the execution status during the rerun process;

[0127] The target weight coefficient is determined based on the number of reruns and the execution status during the reruns.

[0128] Based on the target weight coefficient, determine the second score result corresponding to the test batch data.

[0129] The scoring module 92 is also used for:

[0130] Determine the severity of the defect, the priority of defect repair, and the number of days for defect repair corresponding to the defect data;

[0131] The third scoring result corresponding to the defect data is determined based on the weighting coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair.

[0132] The testing device is also used for:

[0133] The first determining module is used to determine the regression test results corresponding to the functional module to be tested;

[0134] The first correction module is used to correct the target score result of the functional module to be tested according to a preset first correction coefficient if the regression test result is passed.

[0135] The weighted scoring module is used to determine the defect data generated by the functional module under test after the regression test if the regression test result is unsuccessful; and to perform a weighted scoring on the defect data generated by the functional module under test after the regression test to obtain a weighted scoring result.

[0136] The second correction module is used to correct the target score result of the functional module to be tested based on the preset second correction coefficient and the weighted score result.

[0137] The test module 93 is also used for:

[0138] The target score results of each functional module are sorted to obtain the score ranking result;

[0139] Based on the scoring and sorting results, a preset number of target functional modules are selected from each of the functional modules;

[0140] Each of the target functional modules and its associated test cases are pushed to the testers so that the testers can select the functional modules to be tested and the test cases.

[0141] Based on the case design data corresponding to the selected test cases, regression testing is performed on the functional modules to be tested.

[0142] The testing apparatus provided in this application, employing the testing method described in the above embodiments, can solve the technical problems mentioned in the background section. Compared with the prior art, the beneficial effects of the testing apparatus provided in this application are the same as those of the testing method provided in the above embodiments, and other technical features of the testing apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0143] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the test method in Embodiment 1 above.

[0144] The following is for reference. Figure 10The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0145] like Figure 10 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.

[0146] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0147] The electronic device provided in this application, employing the testing method described in the above embodiments, can solve the technical problems mentioned in the background section. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the testing method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0148] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0150] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the test methods in the above embodiments.

[0151] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0152] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0153] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to:

[0154] Obtain historical test data for each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data, and defect data;

[0155] For any of the aforementioned functional modules, one or more of the case design data, test batch data, and defect data corresponding to the functional module are comprehensively scored to obtain the target score result of the functional module.

[0156] Based on the target score results of each functional module, a functional module to be tested is selected from each functional module to conduct regression testing on the functional module to be tested.

[0157] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

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

[0159] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0160] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described test methods, and is capable of solving the technical problems described in the background section. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the test methods provided in the above embodiments, and will not be repeated here.

[0161] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the testing method described above.

[0162] The computer program product provided in this application can solve the technical problems described in the background section. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the testing methods provided in the above embodiments, and will not be repeated here.

[0163] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A testing method, characterized in that, include: Obtain historical test data for each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data, and defect data; For any of the aforementioned functional modules, one or more of the case design data, test batch data, and defect data corresponding to the functional module are comprehensively scored to obtain the target score result of the functional module. Based on the target score results of each functional module, a functional module to be tested is selected from each functional module to conduct regression testing on the functional module to be tested.

2. The test method as described in claim 1, characterized in that, The target score result of the functional module is obtained by comprehensively evaluating one or more of the case design data, test batch data, and defect data corresponding to the functional module, including: A weighted score is applied to one or more of the case design data, the test batch data, and the defect data to obtain one or more of the following: a first score result corresponding to the case design data, a second score result corresponding to the test batch data, and a third score result corresponding to the defect data. The target score of the functional module is determined based on one or more of the first score result, the second score result, and the third score result.

3. The test method as described in claim 2, characterized in that, The case design data is weighted and scored to obtain a first score result corresponding to the case design data, including: Determine the case priority and case type corresponding to the case design data; Based on the weight coefficients associated with the case priority and the case type, the first scoring result corresponding to the case design data is determined.

4. The test method as described in claim 2, characterized in that, The test batch data is weighted and scored to obtain a second score result corresponding to the test batch data, including: Based on the test batch data, determine the number of times the test case will be rerun and the execution status during the rerun process; The target weight coefficient is determined based on the number of reruns and the execution status during the reruns. Based on the target weight coefficient, determine the second score result corresponding to the test batch data.

5. The test method as described in claim 2, characterized in that, The defect data is weighted and scored to obtain a third score result corresponding to the defect data, including: Determine the severity of the defect, the priority of defect repair, and the number of days for defect repair corresponding to the defect data; The third scoring result corresponding to the defect data is determined based on the weighting coefficients associated with the severity of the defect, the priority of defect repair, and the number of days for defect repair.

6. The test method as described in claim 1, characterized in that, The step of selecting a functional module to be tested from among the functional modules based on the target score results of each functional module, and performing regression testing on the functional module to be tested, includes: The target score results of each functional module are sorted to obtain the score ranking result; Based on the scoring and sorting results, a preset number of target functional modules are selected from each of the functional modules; Each of the target functional modules and its associated test cases are pushed to the testers so that the testers can select the functional modules to be tested and the test cases. Based on the case design data corresponding to the selected test cases, regression testing is performed on the functional modules to be tested.

7. The test method as described in claim 1, characterized in that, After selecting a functional module to be tested from among the functional modules based on the target score results of each functional module, and performing regression testing on the functional module to be tested, the method further includes: Determine the regression test results corresponding to the functional module to be tested; If the regression test result is passed, the target score result of the functional module to be tested is corrected according to the preset first correction coefficient. If the regression test result is unsuccessful, then the defect data generated by the functional module under test after the regression test is determined; a weighted score is applied to the defect data generated by the functional module under test after the regression test to obtain a weighted score result; The target score of the functional module to be tested is corrected based on the preset second correction coefficient and the weighted score result.

8. A testing device, characterized in that, include: The acquisition module is used to acquire historical test data of each functional module, wherein the historical test data includes at least one test case associated with case design data, test batch data, and defect data; The scoring module is used to comprehensively score one or more of the case design data, test batch data and defect data corresponding to any of the functional modules, and obtain the target scoring result of the functional module. The testing module is used to select a functional module to be tested from among the functional modules based on the target score results of each functional module, so as to perform regression testing on the functional module to be tested.

9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the test method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the test method as described in any one of claims 1 to 7.