A software function module analysis method and system for batch review

By extracting and analyzing the compatibility data in historical test data, calculating the similarity threshold and priority test similarity range, and adjusting the test sequence, the problem of the software system's test time becoming longer when reviewing functional modules in batches is solved, and the test efficiency is improved.

CN118939544BActive Publication Date: 2025-01-21上海市大数据中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410988433.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-01-21
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

When existing software systems review functional modules in batches, the functional modules may be incompatible with the system, resulting in longer testing time and seriously affecting the efficiency of the test platform.

Method used

By extracting the compatibility data of the functional modules whose test results are failed in the historical test data, the similarity is calculated, and the similarity threshold and priority test similarity range are obtained, and the test order is adjusted to reduce the test time.

Benefits of technology

It effectively reduces the test duration, improves test efficiency, and avoids inaccurate judgment results caused by artificially setting thresholds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939544B_ABST
    Figure CN118939544B_ABST
Patent Text Reader

Abstract

The present invention discloses a software function module analysis method and system for batch audit, and belongs to the field of data analysis technology. The present invention extracts compatibility data of function modules whose test results for realizing the same function in the same batch are not passed, and obtains a similarity threshold value for the test result being not passed; analyzes the similarity of function modules whose test results are passed, and obtains a priority test similarity range; collects the number of planned tests, calculates the average backlog rate, and obtains the average time spent on the test; calculates the number threshold of function modules whose test results are not passed, and when the number of function modules whose test results are not passed reaches the threshold, the function modules to be tested are audited, and the test sequence is adjusted according to the priority test similarity range, and it is judged whether the test sequence needs to be adjusted. Adjust the test sequence in time to improve the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis, and in particular to a method and system for analyzing software function modules for batch review. Background Art

[0002] With the popularization of big data, using software systems to process data has become a common method. The existing software systems may not have certain functional requirements at the time, resulting in missing functional modules and some functions cannot be used. However, if a software system is re-made to achieve a function, it would be unnecessary. Therefore, it would be more practical to make a functional module that can achieve this function.

[0003] According to the functions to be implemented, multiple function modules are made. In the test platform, multiple function modules are input into the system for disorderly testing. The newly added function modules may be incompatible with the system. In this case, the last function module will not match the system, resulting in a longer system downtime, which seriously affects the efficiency of the test platform. Therefore, a software function module analysis method and system for batch review are needed to extract features of function modules that fail the test, match and classify them according to compatibility data, adjust the test sequence, reduce the test time, and improve the test efficiency. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for analyzing software function modules for batch auditing, so as to solve the problems raised in the above-mentioned background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method and system for analyzing software function modules for batch review, the method comprising:

[0006] Step S100: extracting compatibility data of functional modules of the same batch that implement the same function and whose test results are failed based on historical test data, calculating similarity between the compatibility data and each functional module of the same batch, and analyzing the similarity of each functional module with the test results to obtain a similarity threshold for a failed test result;

[0007] Step S200: Analyze the similarity of the functional modules whose test results are passed to obtain a priority test similarity range;

[0008] Step S300: According to the historical data of the test platform, the planned test quantity is collected to calculate the average backlog rate, and the time spent on the function module input into the software system for compatibility testing is collected to calculate the average time spent on the test;

[0009] Step S400: Calculate the threshold value of the number of functional modules with failed test results based on the average backlog rate and the average time spent on testing. When the number of functional modules with failed test results reaches the threshold, suspend the test, review the functional modules to be tested, adjust the test sequence based on the priority test similarity range, compare the total time spent on testing the functional modules based on the predictions before and after the adjustment, and determine whether the test sequence needs to be adjusted.

[0010] Furthermore, step S100 includes:

[0011] Step S101: according to the historical test data, the function modules implementing the same function in the same batch are collected, the function modules are input into the software system for compatibility testing, the compatibility data of the function modules with test results failing are extracted, and the compatibility data of the function modules with test results failing are obtained, the time spent on compatibility data extraction for the function modules with test results failing is collected, and the average time spent on compatibility data extraction is calculated to be t1;

[0012] Step S102: Calculate the similarity between the compatibility data of the function module with a failed test result and each function module in the same batch to obtain the similarity of each function module; summarize the similarities of the function modules with a passed test result and a failed test result according to the test results of the function modules, and obtain a similarity set of the passed test result and the failed test result; input the similarity set of the passed test result and the failed test result into the sklearn function, calculate the ROC curve, and obtain the similarity threshold N of the failed test result according to the ROC curve;

[0013] Step S103: The time spent on similarity calculation between the compatibility data of each functional module and the compatibility data of the functional module with a failed test result is collected, and the average time spent on the similarity calculation is calculated to be t2. The average time t spent on the similarity threshold of a functional module with a failed test result is calculated, according to the formula: t=t1+t2.

[0014] The compatibility data of the functional modules that failed the test results are extracted. The compatibility data includes interfaces, frameworks, etc., because these are the basis for the module to realize its functions. Therefore, if an error occurs, the modules with similar compatibility data will also fail with a high probability. If the classification is not performed and the test is continued, it is possible that the functional modules of the same type that meet the similarity of compatibility data will be tested all the time, which will seriously affect the efficiency of the test;

[0015] Because it takes time to extract compatibility data for failed functional modules and calculate the similarity between the compatibility data and other functional modules, the average time spent on both should be calculated to provide data support for the subsequent judgment of whether to change the test sequence;

[0016] In order to classify the functional modules according to their similarity, we need to calculate the similarity between the functional modules that pass and fail the test, find the similarity threshold, and draw the ROC curve through the sklearn function. Based on the true positive rate and false positive rate obtained from the ROC curve, we can calculate the optimal threshold. The optimal threshold is the similarity threshold for the test result of failure. This makes the threshold more accurate and avoids manual setting, which may cause the threshold deviation rate to be too large, resulting in inaccurate test results and affecting subsequent analysis.

[0017] Further, step S200 includes:

[0018] Step S201: retrieve a similarity set with a passing test result, calculate the average value of the similarity as H based on the similarities in the set, group the similarities, calculate the number of similarity groups as K, and use the formula: Among them, L is the maximum value in the similarity set whose test result is passed;

[0019] Step S202: using a clustering algorithm to divide the similarity set with a passed test result into K groups, obtaining an optimal similarity range with a passed test result, and using the optimal similarity range as a priority test similarity range.

[0020] By classifying the similarity sets with passed test results, because the probabilities of passing different similarity test results are also different, a priority test similarity range should be calculated. Testing according to this range can increase the probability of passing the test, avoid constantly testing functional modules with low test pass rates, and reduce the time spent on testing.

[0021] Furthermore, step S300 includes:

[0022] Step S301: According to the historical data of the test platform, at the beginning of each cycle, the historical number of the planned test function modules in the test platform is collected, and the historical average number of the planned test function modules is obtained as a. At the end of the cycle, the historical number of the uncompleted planned test function modules in the test platform is collected, and the historical average number of the uncompleted planned test function modules is obtained as b. According to the formula: Where U represents the average backlog rate of the test platform;

[0023] Step S302: Based on the historical data of testing the functional modules, the time spent by the staff on the functional module testing is collected, and the average time spent by the staff on the functional module testing is obtained by calculation.

[0024] During the testing process, there may be too many failures in the functional modules, resulting in the last functional module being tested and passed, which may lead to a test backlog on the test platform. Therefore, based on the average backlog rate of the test platform, it is used to analyze the threshold value of the number of functional modules with failed test results, calculate the time spent on the test, and provide data support for whether the test sequence should be changed later.

[0025] Furthermore, step S400 includes:

[0026] Step S401: According to the real-time data in the test platform, the number of functional modules to be tested is collected, and the number of functional modules to be tested is obtained as B. According to the formula: C = A × B, where C represents the total time spent on testing the functional modules before the input sequence of the functional modules to be tested is adjusted, and the threshold value of the number of functional modules with failed test results is calculated as D. According to the formula:

[0027] Step S402: In the test platform, the functional modules to be tested are randomly sorted, and the tests are performed in sequence according to the sorting. When the number of functional modules with failed test results reaches D, the test is suspended, and the functional modules that have not been tested are reviewed. The compatibility data of the i-th functional module with failed test results is extracted, and the compatibility data of the i-th functional module is obtained as X. i , X i Calculate the similarity between the jth functional module and the untested functional module, and compare the calculated jth functional module with X i The similarity is P ij , when P ij ≥N, the test result of the jth functional module is considered as failed, and all functional modules with failed test results are grouped together to obtain a set of functional modules with failed test results, which is P;

[0028] Step S403: The number of ungrouped function modules is collected as S, and the function modules that meet the priority test similarity range are grouped to obtain a priority test set Y, and the input order of the function modules to be tested is adjusted, and the function modules in the Y set are tested first, and the function modules in the P set are adjusted to be tested last;

[0029] Step S404: Retrieve the number of unassembled functional modules, and calculate the total time T required to test the functional modules after adjusting the input order of the functional modules to be tested. According to the formula: T=S×A+D×t, when T≤C, test the modules according to the test order after adjusting the input order of the functional modules to be tested.

[0030] By calculating the threshold of the number of functional modules with failed test results, it is determined whether to suspend the test, so as to avoid the situation where a small number of modules remain to be tested and the test is still suspended, which affects the test efficiency.

[0031] Audit the untested functional modules, classify the untested functional modules, adjust the input order of the functional modules to be tested, calculate the input order of the functional modules to be tested, and predict the total time spent on testing the functional modules. Because there may not be many untested functional modules, if they are tested after classification, the time spent on classification may be longer than the time spent without classification. Without the above steps, the efficiency of the test platform may not be improved, but the test efficiency may be affected.

[0032] In order to better implement the above method, a software function module analysis system for batch review is also proposed, which includes a similarity threshold module, a priority test module, a platform backlog rate module and a judgment adjustment module;

[0033] Similarity threshold module: Based on historical test data, the compatibility data of the functional modules in the same batch that have failed the test results for implementing the same function are extracted, and the similarity between the compatibility data and each functional module in the same batch is calculated. Based on the similarity of each functional module and the test results, the similarity threshold for failing the test results is obtained;

[0034] Priority test modules: Analyze the similarity of functional modules that have passed the test results to obtain the priority test similarity range;

[0035] Platform backlog rate module: Based on the historical data of the test platform, the planned test quantity is collected to calculate the average backlog rate. The time spent on the functional modules being input into the software system for compatibility testing is collected to calculate the average time spent on the test.

[0036] Determine and adjust modules: Calculate the threshold number of functional modules with failed test results based on the average backlog rate and the average time spent on testing. When the number of functional modules with failed test results reaches the threshold, suspend the test, review the functional modules to be tested, adjust the test sequence based on the priority test similarity range, compare the total time spent on testing the functional modules before and after the adjustment, and determine whether the test sequence needs to be adjusted.

[0037] Further, the similarity threshold module includes a similarity matching unit and a similarity threshold calculation unit;

[0038] Similarity matching unit: based on the historical test data, the compatibility data of the functional modules with failed test results are extracted to obtain a number of compatibility data. Based on the extracted compatibility data, the similarity between each functional module of the same batch and the compatibility data is calculated to obtain the similarity of each functional module of the same batch. The time spent on compatibility data extraction and the average time spent on similarity calculation are collected to calculate the average time spent on the similarity threshold of a functional module with failed test results.

[0039] Similarity threshold calculation unit: According to the test results of the functional modules, the functional modules are classified, the ROC curve is calculated by the sklearn function, and the similarity threshold for the test result to fail is obtained by analysis.

[0040] Further, the priority test module includes a similarity group number calculation unit and a priority test range calculation unit;

[0041] Similarity group number calculation unit: according to the similarity set with the passed test result, the number of similarity groupings is calculated;

[0042] Calculate the priority test range unit: use the clustering algorithm according to the number of groups to obtain the priority test similarity range.

[0043] Further, the platform backlog rate module includes a platform backlog rate calculation unit and a test duration calculation unit;

[0044] Calculation platform backlog rate unit: Based on the historical data of the test platform, the historical number of test function modules planned and unfinished on the test platform is collected to calculate the average backlog rate of the test platform;

[0045] Calculate test time unit: Based on the historical data of testing the functional modules, calculate the average time spent by the staff on testing the functional modules.

[0046] Further, the judgment and adjustment module includes a suspension test unit and a review and adjustment unit;

[0047] Pause test unit: according to the number of functional modules to be tested in the test platform in real time, calculate the threshold of the number of functional modules with failed test results, randomly sort the functional modules to be tested, and test them in sequence according to the sorting. When the number of functional modules with failed test results reaches the threshold, the test platform is suspended.

[0048] Audit and adjustment unit: When the test is paused, the functional modules that have not been tested are audited, the compatibility data of the functional modules with failed test results are extracted, and the similarity is calculated with the functional modules that have not been tested. The functional modules that exceed the similarity threshold with failed test results are classified and grouped together, and the input sequence of the functional modules to be tested is calculated based on the number of functional modules that have not been grouped. Then, the total time spent on testing the functional modules is predicted after adjustment. When the adjusted total time is shorter than the total time before adjustment, the test is performed according to the test sequence after the input sequence of the functional modules to be tested is adjusted.

[0049] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention discloses a software function module analysis method and system for batch audit, which belongs to the field of data analysis technology. The present invention extracts the compatibility data of the function modules whose test results for realizing the same function in the same batch are not passed, and obtains the similarity threshold value of the test result being not passed. The similarity threshold value is obtained by this method, and the threshold value is avoided to be set artificially, resulting in inaccurate judgment results; the similarity of the function modules whose test results are passed is analyzed, and the priority test similarity range is obtained, and the similarities that meet this range are collected, which greatly improves the pass rate of the test and reduces the time spent on the test; the planned test number is collected, and the average backlog rate is calculated to obtain the average time spent on the test; the threshold value of the number of function modules whose test results are not passed is calculated, and when the number of function modules whose test results are not passed reaches the threshold value, the function modules to be tested are audited, and the test sequence is adjusted according to the priority test similarity range, and it is judged whether the test sequence needs to be adjusted, and the time spent after the adjustment is avoided to be longer than that before the adjustment by this method. The test sequence is adjusted in time to improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0051] Figure 1 It is a flow chart of a method for analyzing software function modules for batch review of the present invention;

[0052] Figure 2It is a structural schematic diagram of a software function module analysis system for batch auditing of the present invention; DETAILED DESCRIPTION

[0053] See also Figure 1-Figure 2 The present invention provides a technical solution: a method for analyzing software function modules for batch review, the method comprising:

[0054] Step S100: extracting compatibility data of functional modules of the same batch that implement the same function and whose test results are failed based on historical test data, calculating similarity between the compatibility data and each functional module of the same batch, and analyzing the similarity of each functional module with the test results to obtain a similarity threshold for a failed test result;

[0055] Wherein, step S100 includes:

[0056] Step S101: according to the historical test data, the function modules implementing the same function in the same batch are collected, the function modules are input into the software system for compatibility testing, the compatibility data of the function modules with test results failing are extracted, and the compatibility data of the function modules with test results failing are obtained, the time spent on compatibility data extraction for the function modules with test results failing is collected, and the average time spent on compatibility data extraction is calculated to be t1;

[0057] Step S102: Calculate the similarity between the compatibility data of the function module with a failed test result and each function module in the same batch to obtain the similarity of each function module; summarize the similarities of the function modules with a passed test result and a failed test result according to the test results of the function modules, and obtain a similarity set of the passed test result and the failed test result; input the similarity set of the passed test result and the failed test result into the sklearn function, calculate the ROC curve, and obtain the similarity threshold N of the failed test result according to the ROC curve;

[0058] Step S103: The time spent on similarity calculation between the compatibility data of each functional module and the compatibility data of the functional module with a failed test result is collected, and the average time spent on the similarity calculation is calculated to be t2. The average time t spent on the similarity threshold of a functional module with a failed test result is calculated, according to the formula: t=t1+t2.

[0059] For example, the average time spent on compatibility data extraction is 3 minutes, the average time spent on similarity calculation is 4 minutes, and the average time spent on similarity threshold of a functional module with a failed test result is 7 minutes.

[0060] Step S200: Analyze the similarity of the functional modules whose test results are passed to obtain a priority test similarity range;

[0061] Wherein, step S200 includes:

[0062] Step S201: retrieve a similarity set with a passing test result, calculate the average value of the similarity as H based on the similarities in the set, group the similarities, calculate the number of similarity groups as K, and use the formula: Among them, L is the maximum value in the similarity set whose test result is passed;

[0063] Step S202: using a clustering algorithm to divide the similarity set with a passed test result into K groups, obtaining an optimal similarity range with a passed test result, and using the optimal similarity range as a priority test similarity range.

[0064] Step S300: According to the historical data of the test platform, the planned test quantity is collected to calculate the average backlog rate, and the time spent on the function module input into the software system for compatibility testing is collected to calculate the average time spent on the test;

[0065] Wherein, step S300 includes:

[0066] Step S301: According to the historical data of the test platform, at the beginning of each cycle, the historical number of the planned test function modules in the test platform is collected, and the historical average number of the planned test function modules is obtained as a. At the end of the cycle, the historical number of the uncompleted planned test function modules in the test platform is collected, and the historical average number of the uncompleted planned test function modules is obtained as b. According to the formula: Where U represents the average backlog rate of the test platform;

[0067] Step S302: Based on the historical data of testing the functional modules, the time spent by the staff on the functional module testing is collected, and the average time spent by the staff on the functional module testing is obtained by calculation.

[0068] For example, the historical average number of function modules that were planned to be tested is 20, and the historical average number of function modules that were not completed is 5. The backlog rate is calculated to be 25%, and the average backlog rate of the test platform is 20%;

[0069] It is calculated that the average time spent by staff on functional module testing is 5 minutes.

[0070] Step S400: Calculate the threshold of the number of function modules with failed test results according to the average backlog rate and the average time spent on the test. When the number of function modules with failed test results reaches the threshold, suspend the test, review the function modules to be tested, adjust the test sequence according to the priority test similarity range, compare the total time spent on testing the function modules before and after the adjustment, and determine whether the test sequence needs to be adjusted.

[0071] Wherein, step S400 includes:

[0072] Step S401: According to the real-time data in the test platform, the number of functional modules to be tested is collected, and the number of functional modules to be tested is obtained as B. According to the formula: C = A × B, where C represents the total time spent on testing the functional modules before the input sequence of the functional modules to be tested is adjusted, and the threshold value of the number of functional modules with failed test results is calculated as D. According to the formula:

[0073] For example, the number of function modules to be tested is 10. Before the input order of the function modules to be tested is adjusted, the total time spent on testing the function modules is predicted to be 50 minutes. The threshold value of the number of function modules with failed test results is calculated to be 2.

[0074] Step S402: In the test platform, the functional modules to be tested are randomly sorted, and the tests are performed in sequence according to the sorting. When the number of functional modules with failed test results reaches D, the test is suspended, and the functional modules that have not been tested are reviewed. The compatibility data of the i-th functional module with failed test results is extracted, and the compatibility data of the i-th functional module is obtained as X. i , X i Calculate the similarity between the jth functional module and the untested functional module, and compare the calculated jth functional module with X i The similarity is P ij , when P ij ≥N, the test result of the jth functional module is considered as failed, and all functional modules with failed test results are grouped together to obtain a set of functional modules with failed test results, which is P;

[0075] Step S403: The number of ungrouped function modules is collected as S, and the function modules that meet the priority test similarity range are grouped to obtain a priority test set Y, and the input order of the function modules to be tested is adjusted, and the function modules in the Y set are tested first, and the function modules in the P set are adjusted to be tested last;

[0076] Step S404: Retrieve the number of unassembled functional modules, and calculate the total time T required to test the functional modules after adjusting the input order of the functional modules to be tested. According to the formula: T=S×A+D×t, when T≤C, test the modules according to the test order after adjusting the input order of the functional modules to be tested.

[0077] For example, the number of unassembled functional modules is 3. After adjusting the input order of the functional modules to be tested, the total time spent on testing the functional modules is predicted to be 29 minutes, 29<50, then the test is performed according to the test order after the input order of the functional modules to be tested is adjusted.

[0078] In order to better implement the above method, a software function module analysis system for batch review is also proposed, which includes a similarity threshold module, a priority test module, a platform backlog rate module and a judgment adjustment module;

[0079] Similarity threshold module: Based on historical test data, the compatibility data of the functional modules in the same batch that have failed the test results for implementing the same function are extracted, and the similarity between the compatibility data and each functional module in the same batch is calculated. Based on the similarity of each functional module and the test results, the similarity threshold for failing the test results is obtained;

[0080] Wherein, the similarity threshold module includes a similarity matching unit and a similarity threshold calculation unit;

[0081] Similarity matching unit: based on the historical test data, the compatibility data of the functional modules with failed test results are extracted to obtain a number of compatibility data. Based on the extracted compatibility data, the similarity between each functional module of the same batch and the compatibility data is calculated to obtain the similarity of each functional module of the same batch. The time spent on compatibility data extraction and the average time spent on similarity calculation are collected to calculate the average time spent on the similarity threshold of a functional module with failed test results.

[0082] Similarity threshold calculation unit: According to the test results of the functional modules, the functional modules are classified, the ROC curve is calculated by the sklearn function, and the similarity threshold for the test result to fail is obtained by analysis.

[0083] Priority test modules: Analyze the similarity of functional modules that have passed the test results to obtain the priority test similarity range;

[0084] Among them, the priority test module includes a similarity group number calculation unit and a priority test range calculation unit;

[0085] Similarity group number calculation unit: according to the similarity set with the passed test result, the number of similarity groupings is calculated;

[0086] Calculate the priority test range unit: use the clustering algorithm according to the number of groups to obtain the priority test similarity range.

[0087] Platform backlog rate module: Based on the historical data of the test platform, the planned test quantity is collected to calculate the average backlog rate. The time spent on the functional modules being input into the software system for compatibility testing is collected to calculate the average time spent on the test.

[0088] Among them, the platform backlog rate module includes a platform backlog rate calculation unit and a test duration calculation unit;

[0089] Calculation platform backlog rate unit: Based on the historical data of the test platform, the historical number of test function modules planned and unfinished on the test platform is collected to calculate the average backlog rate of the test platform;

[0090] Calculate test time unit: Based on the historical data of testing the functional modules, calculate the average time spent by the staff on testing the functional modules.

[0091] Determine and adjust modules: Calculate the threshold of the number of function modules with failed test results based on the average backlog rate and the average time spent on testing. When the number of function modules with failed test results reaches the threshold, suspend the test, review the function modules to be tested, adjust the test sequence based on the priority test similarity range, and compare the total time spent on testing the function modules before and after the adjustment to determine whether the test sequence needs to be adjusted.

[0092] Among them, the judgment and adjustment module includes a suspension test unit and an audit adjustment unit;

[0093] Pause test unit: according to the number of functional modules to be tested in the test platform in real time, calculate the threshold of the number of functional modules with failed test results, randomly sort the functional modules to be tested, and test them in sequence according to the sorting. When the number of functional modules with failed test results reaches the threshold, the test platform is suspended.

[0094] Audit and adjustment unit: When the test is paused, the functional modules that have not been tested are audited, the compatibility data of the functional modules with failed test results are extracted, and the similarity is calculated with the functional modules that have not been tested. The functional modules that exceed the similarity threshold with failed test results are classified and grouped together, and the input sequence of the functional modules to be tested is calculated based on the number of functional modules that have not been grouped. Then, the total time spent on testing the functional modules is predicted after adjustment. When the adjusted total time is shorter than the total time before adjustment, the test is performed according to the test sequence after the input sequence of the functional modules to be tested is adjusted.

[0095] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0096] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for analyzing software function modules for batch audit, characterized in that: Methods include: Step S100: extracting compatibility data of functional modules of the same batch that implement the same function and whose test results are failed based on historical test data, calculating similarity between the compatibility data and each functional module of the same batch, analyzing the similarity of each functional module and the test results to obtain a similarity threshold for a failed test result; The step S100 includes: Step S101: according to the historical test data, the function modules implementing the same function in the same batch are collected, the function modules are input into the software system for compatibility testing, the compatibility data of the function modules with test results failing are extracted, and the compatibility data of the function modules with test results failing are obtained, the time spent on compatibility data extraction for the function modules with test results failing is collected, and the average time spent on compatibility data extraction is calculated to be t1; Step S102: Calculate the similarity between the compatibility data of the function module with a failed test result and each function module in the same batch to obtain the similarity of each function module; summarize the similarities of the function modules with a passed test result and a failed test result according to the test results of the function modules, and obtain a similarity set of the passed test result and the failed test result; input the similarity set of the passed test result and the failed test result into the sklearn function, calculate the ROC curve, and obtain the similarity threshold N of the failed test result according to the ROC curve; Step S103: The time spent on similarity calculation between the compatibility data of each functional module and the compatibility data of the functional module with a failed test result is collected, and the average time spent on similarity calculation is calculated as t2, and the average time spent on the similarity threshold of a functional module with a failed test result is calculated as t, according to the formula: ; Step S200: Analyze the similarity of the functional modules whose test results are passed to obtain a priority test similarity range; Step S300: According to the historical data of the test platform, the planned test quantity is collected to calculate the average backlog rate, and the time spent on the function module input into the software system for compatibility testing is collected to calculate the average time spent on the test; Step S400: Calculate the threshold value of the number of functional modules with failed test results based on the average backlog rate and the average time spent on testing. When the number of functional modules with failed test results reaches the threshold, suspend the test, review the functional modules to be tested, adjust the test sequence based on the priority test similarity range, compare the total time spent on testing the functional modules based on the predictions before and after the adjustment, and determine whether the test sequence needs to be adjusted.

2. A method for analyzing software function modules for batch auditing according to claim 1, characterized in that: The process of calculating the priority test similarity range in step S200 includes the following steps: Step S201: retrieve a similarity set with a passing test result, calculate the average value of the similarity as H based on the similarities in the set, group the similarities, calculate the number of similarity groups as K, and use the formula: , where L is the maximum value in the similarity set whose test result is passed; Step S202: using a clustering algorithm to divide the similarity set with a passed test result into K groups, obtaining an optimal similarity range with a passed test result, and using the optimal similarity range as a priority test similarity range.

3. A method for analyzing software function modules for batch auditing according to claim 2, characterized in that: The process of calculating the average backlog rate of the test platform in step S300 includes the following steps: Step S301: According to the historical data of the test platform, at the beginning of each cycle, the historical number of the planned test function modules in the test platform is collected, and the historical average number of the planned test function modules is obtained as a. At the end of the cycle, the historical number of the uncompleted planned test function modules in the test platform is collected, and the historical average number of the uncompleted planned test function modules is obtained as b. According to the formula: , where U represents the average backlog rate of the test platform; Step S302: Based on the historical data of testing the functional modules, the time spent by the staff on the functional module testing is collected, and the average time spent by the staff on the functional module testing is obtained by calculation.

4. A method for analyzing software function modules for batch auditing according to claim 3, characterized in that: The judgment process of adjusting the test sequence in step S400 includes the following steps: Step S401: According to the real-time data in the test platform, the number of functional modules to be tested is collected, and the number of functional modules to be tested is obtained as B. According to the formula: , where C represents the total time it takes to test the functional modules before the input order of the functional modules to be tested is adjusted. The threshold value of the number of functional modules that fail the test result is D, according to the formula: ; Step S402: In the test platform, the functional modules to be tested are randomly sorted, and the tests are performed in sequence according to the sorting. When the number of functional modules with failed test results reaches D, the test is suspended, and the functional modules that have not been tested are reviewed. The compatibility data of the i-th functional module with failed test results is extracted, and the compatibility data of the i-th functional module is obtained as X. i , X i Calculate the similarity between the jth functional module and the untested functional module, and compare the calculated jth functional module with X i The similarity is P ij , when P ij ≥N, the test result of the jth functional module is considered as failed, and all functional modules with failed test results are grouped together to obtain a set of functional modules with failed test results, which is P; Step S403: The number of ungrouped function modules is collected as S, and the function modules that meet the priority test similarity range are grouped to obtain a priority test set Y, and the input order of the function modules to be tested is adjusted, and the function modules in the Y set are tested first, and the function modules in the P set are adjusted to be tested last; Step S404: retrieve the number of unassembled functional modules, calculate and adjust the input order of the functional modules to be tested, and predict the total time T spent on testing the functional modules, according to the formula: , when T≤C, the test is performed according to the test sequence adjusted according to the input sequence of the functional modules to be tested.

5. A software function module analysis system for batch review, used to implement a software function module analysis method for batch review as described in any one of claims 1 to 4, characterized in that: Similarity threshold module, priority test module, platform backlog rate module and judgment adjustment module; The similarity threshold module: extracts compatibility data of functional modules of the same batch that implement the same function and whose test results are failed based on historical test data, calculates similarity between the compatibility data and each functional module of the same batch, and analyzes the similarity of each functional module with the test results to obtain a similarity threshold for the failed test results; The priority test module: analyzes the similarity of the functional modules with passed test results to obtain a priority test similarity range; The platform backlog rate module: collects the planned test quantity according to the historical data of the test platform, calculates the average backlog rate, collects the time spent on the function module input into the software system for compatibility testing, and calculates the average time spent on the test; The judgment and adjustment module calculates a threshold value for the number of functional modules with failed test results based on the average backlog rate and the average time spent on testing; when the number of functional modules with failed test results reaches the threshold, the test is suspended, the functional modules to be tested are reviewed, the test sequence is adjusted based on the priority test similarity range, and the total time spent on testing the functional modules is compared based on the predictions before and after the adjustment to determine whether the test sequence needs to be adjusted.

6. A software function module analysis system for batch auditing according to claim 5, characterized in that: The similarity threshold module includes a similarity matching unit and a similarity threshold calculation unit; The similarity matching unit: extracts compatibility data for the functional modules with failed test results according to the historical test data to obtain a number of compatibility data, calculates similarity between each functional module of the same batch and the compatibility data according to the extracted compatibility data, calculates the similarity of each functional module of the same batch, collects the time spent on compatibility data extraction and the average time spent on similarity calculation, and calculates the average time spent on a similarity threshold for a functional module with failed test results; The similarity threshold calculation unit: classifies the functional modules according to the test results of the functional modules, calculates the ROC curve through the sklearn function, and analyzes to obtain the similarity threshold for the test result to fail.

7. A software function module analysis system for batch auditing according to claim 5, characterized in that: The priority test module includes a similarity group number calculation unit and a priority test range calculation unit; The similarity group number calculation unit: calculates the number of similarity groupings according to the similarity set with a passed test result; The unit for calculating the priority test range uses a clustering algorithm to obtain a priority test similarity range according to the number of groups.

8. A software function module analysis system for batch auditing according to claim 5, characterized in that: The platform backlog rate module includes a platform backlog rate calculation unit and a test duration calculation unit; The platform backlog rate calculation unit collects the historical number of test function modules planned and unfinished on the test platform according to the historical data of the test platform, and calculates the average backlog rate of the test platform; The test duration calculation unit calculates the average duration spent by the staff on the function module test based on the historical data of the function module test.

9. A software function module analysis system for batch auditing according to claim 5, characterized in that: The judgment and adjustment module includes a pause test unit and an audit adjustment unit; The test suspension unit: calculates a threshold value of the number of functional modules with failed test results according to the number of functional modules to be tested in the test platform in real time, randomly sorts the functional modules to be tested, and tests them in sequence according to the sorting; when the number of functional modules with failed test results reaches the threshold value, the test platform is suspended; The audit adjustment unit: when the test is paused, audits the functional modules that have not been tested, extracts compatibility data of the functional modules with failed test results, calculates similarity with the functional modules that have not been tested, classifies and groups the functional modules that exceed the similarity threshold with failed test results, calculates the input sequence of the functional modules to be tested based on the number of functional modules that have not been grouped, predicts the total time spent on testing the functional modules, and when the adjusted total time is shorter than the total time before adjustment, tests are performed according to the test sequence after the input sequence of the functional modules to be tested is adjusted.

Citation Information

Patent Citations

  • Test case priority ranking method in regression test

    CN113590472A

  • Optimal test flow scheduling within automated test equipment for minimized mean time to detect failure

    US20110288808A1