Case importance determination method and apparatus, electronic device, and medium

By identifying the impact factors of test cases and using the impact factor decision model to assess their importance, the problem of unstable test case importance assessment in existing technologies is solved, enabling rapid and accurate assessment under the agile development model and improving testing efficiency.

CN112988574BActive Publication Date: 2025-12-23CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110183419.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-08
Publication Date
2025-12-23
Estimated Expiration
2041-02-08

AI Technical Summary

Technical Problem

Existing methods for assessing the importance of test cases rely on human experience, leading to unstable assessment results and making it difficult to quickly and accurately determine the importance of test cases in an agile development model.

Method used

By identifying the influencing factors of test cases and using an influencing factor decision model to assess their importance, including initial case priority, module priority, number of executions, number of associated vulnerabilities, current status, and importance of associated requirements, an influencing factor decision model is established to quickly and accurately determine the importance level of test cases.

Benefits of technology

It enables the rapid and accurate determination of the importance level of test cases under the agile development model, improves the efficiency of determining the importance of test cases, and reduces the influence of human subjectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112988574B_ABST
    Figure CN112988574B_ABST
Patent Text Reader

Abstract

A case importance determination method and device, electronic equipment and medium are disclosed. The method comprises: determining an influence factor of test case importance; determining an evaluation value of the influence factor of test case importance; and determining an importance level of the test case according to the evaluation value of the influence factor of test case importance. The embodiment of the present application can quickly and accurately determine the importance level of the test case according to the evaluation value of the influence factor of test case importance, thereby effectively improving the determination efficiency of test case importance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of case testing, and particularly relate to a case importance determination method and device, electronic equipment and a medium. BACKGROUND

[0002] Now that the IT (Internet Technology) industry adopts the agile development mode, software and systems have entered rapid iteration, and the demand for production (test case update) is high, the online frequency is high, and the development cycle is shortened, which has become the biggest feature of the IT industry. Among them, the agile development mode is to update the test case according to the feedback of the user. In the test process, the timeliness of the test case is relatively important. A complete set of test cases has a large number of quantities and a long execution time. One iteration cycle may have a test time of only 2-3 days at most. The execution of all test cases takes much longer than the test time of the iteration (the interval time between two productions). It is extremely likely that the test case has not been tested before the case update is needed. Therefore, the importance evaluation of the test case becomes extremely important. The existing evaluation method mainly relies on human experience to determine the importance of the test case.

[0003] The defect of the above scheme is that the subjectivity of human evaluation is strong, which leads to unstable evaluation results of the importance of the test case. There may be a problem that the evaluation results of the same test case in different stages are not unified, which greatly reduces the accuracy of the evaluation of the importance of the test case. SUMMARY

[0004] Embodiments of the present application provide a case importance determination method, device, electronic equipment and medium, which can quickly and accurately determine the importance level of the test case according to the evaluation value of the influence factor of the test case importance, thereby effectively improving the determination efficiency of the test case importance.

[0005] In a first aspect, embodiments of the present application provide a case importance determination method, comprising:

[0006] determining an influence factor of the test case importance; and determining an evaluation value of the influence factor of the test case importance;

[0007] determining an importance level of the test case according to the evaluation value of the influence factor of the test case importance.

[0008] Optionally, the influence factor includes at least one of a case initial priority, a case belonging module priority, a case execution frequency, a case associated vulnerability quantity, a case current state, a case associated requirement importance degree, and a case execution complexity.

[0009] Optionally, determining the influence factor of the test case importance comprises:

[0010] obtaining case information of the test case; wherein the case information comprises at least one of case function, execution duration and case requirement;

[0011] inputting the case information of the test case into a pre-established influence factor decision model, and taking an output of the influence factor decision model as an influence factor of the importance of the test case.

[0012] Optionally, the establishment process of the influence factor decision model is as follows:

[0013] obtaining case information of historical test cases and influence factors of importance of the historical test cases;

[0014] training the influence factor decision model according to the case information of the historical test cases and the influence factors of importance of the historical test cases.

[0015] Optionally, if the influence factors comprise case initial priority and case belonging module priority, the evaluation value of the influence factors of the importance of the test case is determined as follows:

[0016] determining the evaluation value of the case initial priority according to case characteristics of the test case; wherein the case characteristics comprise at least one of core case, boundary case, reverse case and interface display case;

[0017] determining the evaluation value of the case belonging module priority according to a function module of the test case; wherein the function module comprises at least one of core business module, main function module, configuration module and auxiliary function module.

[0018] Optionally, if the influence factors comprise case execution times, case associated vulnerability quantity and case current state, the evaluation value of the influence factors of the importance of the test case is determined as follows:

[0019] determining the evaluation value of the case execution times according to current execution times of the test case and a preset times threshold;

[0020] determining the evaluation value of the case associated vulnerability quantity according to current vulnerability quantity of the test case and a preset quantity threshold;

[0021] determining the evaluation value of the case current state according to a current execution state of the test case and a preset state rule; wherein the preset state rule comprises an associated relationship between the current execution state and the evaluation value.

[0022] Optionally, the importance degree of the case associated requirement is determined according to at least one of user usage frequency, investment fund and purchase order.

[0023] Optionally, the importance level of the test case is determined based on the evaluation value of the influence factor of the test case's importance, including:

[0024] Based on the evaluation values ​​of the influence factors of the importance of the test cases, determine the set of factor level values ​​for the test cases;

[0025] The importance level of the test case is determined based on the set of factor level values.

[0026] Optionally, the importance level of the test case is determined based on the set of factor level values, including:

[0027] Count the number of each evaluation value in the set of factor rating values;

[0028] The importance level of the test case is determined based on the evaluation value with the largest number in the set of factor level values.

[0029] Optionally, the importance level of the test case is determined based on the largest number of evaluation values ​​in the set of factor level values, including:

[0030] If at least two evaluation values ​​are found to be the largest and the same in the sum of the factor level values, then the priority level of the at least two evaluation values ​​is determined.

[0031] The evaluation value with the highest priority among the at least two evaluation values ​​shall be used as the importance level of the test case.

[0032] Optional, also includes:

[0033] The execution time of the test case is determined based on its importance level.

[0034] If the execution time of the test case is detected to be lower than the first duration threshold, a regression test operation is performed to perform test operations on other test cases marked as requiring test execution.

[0035] Optional, also includes:

[0036] If the test completion time for all test cases marked as requiring testing within the same test cycle is less than the second time threshold, then test operations will be performed on the test cases marked as not requiring testing.

[0037] Secondly, embodiments of the present invention provide a device for determining the importance of a case, comprising:

[0038] The first determining module is used to determine the influencing factors of the importance of test cases; and to determine the evaluation value of the influencing factors of the importance of test cases.

[0039] The second determining module is configured to determine an importance level of the test case according to the evaluation value of the influence factor of the importance of the test case.

[0040] Optionally, the influence factor comprises at least one of an initial priority of the test case, a priority of a module to which the test case belongs, an execution frequency of the test case, a number of associated vulnerabilities of the test case, a current state of the test case, an importance degree of associated requirements of the test case, and an execution complexity of the test case.

[0041] Optionally, the first determining module comprises an information obtaining unit and an influence factor determining unit.

[0042] The information obtaining unit is configured to obtain case information of the test case, wherein the case information comprises at least one of a function of the test case, an execution duration of the test case, and a requirement of the test case.

[0043] The influence factor determining unit is configured to input the case information of the test case into a pre-established influence factor decision model, and take an output of the influence factor decision model as the influence factor of the importance of the test case.

[0044] Optionally, the method further comprises a model establishing module, and the model establishing module is specifically configured to:

[0045] obtain case information of historical test cases and influence factors of importance of the historical test cases;

[0046] train the influence factor decision model according to the case information of the historical test cases and the influence factors of importance of the historical test cases.

[0047] Optionally, the first determining module further comprises a first evaluation value determining unit and a second evaluation value determining unit.

[0048] The first evaluation value determining unit is configured to determine an evaluation value of the initial priority of the test case according to a case characteristic of the test case, wherein the case characteristic comprises at least one of a core case, a boundary case, a reverse case, and an interface display case.

[0049] The second evaluation value determining unit is configured to determine an evaluation value of the priority of the module to which the test case belongs according to a function module of the test case, wherein the function module comprises at least one of a core business module, a main function module, a configuration module, and an auxiliary function module.

[0050] Optionally, the first determining module further comprises a third evaluation value determining unit, a fourth evaluation value determining unit, and a fifth evaluation value determining unit.

[0051] The third evaluation value determining unit is configured to determine an evaluation value of the execution frequency of the test case according to a current execution frequency of the test case and a preset frequency threshold.

[0052] The fourth evaluation value determination unit is configured to determine an evaluation value of the case-associated vulnerability quantity according to a current vulnerability quantity of the test case and a preset quantity threshold.

[0053] The fifth evaluation value determination unit is configured to determine an evaluation value of the current state of the test case according to a current execution state of the test case and a preset state rule. The preset state rule includes an association between the current execution state and the evaluation value.

[0054] Optionally, the importance degree of the case-associated requirement is determined according to at least one of a user usage frequency, an investment fund, and a purchase order.

[0055] Optionally, the second determination module includes a set determination unit and a level determination unit.

[0056] The set determination unit is configured to determine a factor level value set of the test case according to the evaluation value of the influence factor of the importance of the test case.

[0057] The level determination unit is configured to determine an importance level of the test case according to the factor level value set.

[0058] Optionally, the level determination unit includes a quantity statistical subunit and a level determination subunit.

[0059] The quantity statistical subunit is configured to count the quantity of each evaluation value in the factor level value set.

[0060] The level determination subunit is configured to determine the importance level of the test case according to the evaluation value with the maximum quantity in the factor level value set.

[0061] Optionally, the level determination subunit is specifically configured to:

[0062] If it is detected that there are at least two evaluation values with the maximum quantity and the same in the sum of the factor level values, the priority level of the at least two evaluation values is determined.

[0063] The evaluation value with the highest priority level in the at least two evaluation values is taken as the importance level of the test case.

[0064] Optionally, the method further includes a time length determination module and a first operation execution module.

[0065] The time length determination module is configured to determine an execution time length of the test case according to the importance level of the test case.

[0066] The first operation execution module is configured to perform a regression test operation to perform a test operation on other test cases with a marked state of needing to perform a test, if it is detected that the execution time length of the test case is lower than a first time length threshold.

[0067] Optionally, further comprising:

[0068] The second operation execution module is configured to perform a test operation on the test case with the marked state of not needing to perform the test if a time length of test completion of all test cases with the marked state of needing to perform the test in the same test cycle is less than a second time length threshold.

[0069] In a third aspect, an electronic device is provided, and the electronic device includes:

[0070] one or more processors;

[0071] a memory device storing one or more programs,

[0072] When the one or more programs are executed by the one or more processors, the one or more processors implement the case importance determination method in any of the embodiments of the present application.

[0073] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the case importance determination method in any of the embodiments of the present application.

[0074] The embodiments of the present application determine an influence factor of test case importance, determine an evaluation value of the influence factor of test case importance, and determine an importance level of the test case according to the evaluation value of the influence factor of test case importance. The embodiments of the present application can quickly and accurately determine the importance level of the test case according to the evaluation value of the influence factor of test case importance, thereby effectively improving the determination efficiency of test case importance. BRIEF DESCRIPTION OF DRAWINGS

[0075] Figure 1 is a flowchart of the case importance determination method in the first embodiment of the present application;

[0076] Figure 2 is a flowchart of the case importance determination method in the second embodiment of the present application;

[0077] Figure 3 is a structural diagram of the case importance determination device in the third embodiment of the present application;

[0078] Figure 4 is a structural diagram of the electronic device in the fourth embodiment of the present application. DETAILED DESCRIPTION

[0079] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not to be used to limit the scope of the application. In addition, it should be noted that, for the sake of brevity, only the portions of the drawings that are needed to understand the application have been shown in the drawings.

[0080] Embodiment One

[0081] Figure 1 is a flowchart of a method for determining case importance in the embodiment one of the application. The embodiment can be applicable to the case where the importance of a test case is determined. The method of the embodiment can be performed by a device for determining case importance, which can be implemented in hardware and / or software and can be configured in an electronic device. The method for determining case importance described in any embodiment of the application can be implemented. As shown in the figure, the method specifically includes the following: Figure 1

[0082] S110, determining an impact factor of the importance of the test case; and determining an evaluation value of the impact factor of the importance of the test case.

[0083] In the embodiment, the test case can be a test application written for the system or software to run, so that the system or software can be periodically optimized and improved. The importance of the test case will have a great impact on a system or software in different application scenarios. For example, in the IT industry, the agile development mode is usually adopted, so that the software and system enter a rapid iteration, and have the industry characteristics of multiple production requirements, frequent online, and shortened development cycle. In the agile development mode, a complete software or system is developed, the test case is executed, and then the software or system is put into use by the user to improve the online efficiency of the product. Compared with the agile development mode, the traditional development mode needs to interact with the user in real time to improve the performance of the product according to the user's needs, and the online speed is slow.

[0084] The impact factor of the importance of the test case can be summarized and analyzed according to the characteristics of a plurality of historical processed test cases, to obtain the impact factor of the importance of the test case, which is used as the impact factor of the importance of the test case in subsequent processing. In the embodiment, the impact factor of the importance of the test case can also be dynamically adjusted based on the test requirements to adapt to the demand characteristics of more test cases.

[0085] In the embodiment, the impact factor can include at least one of the initial priority of the case, the priority of the module to which the case belongs, the number of times the case is executed, the number of associated vulnerabilities of the case, the current state of the case, the importance of the associated requirements of the case, and the execution complexity of the case.

[0086] ​The initial priority of the case is an initial human priority determination of the test case based on experience of a tester; and the initial value of each influence factor in the embodiment can be divided into four levels, i.e., 1, 2, 3 and 4; the initial value of the case execution times and the number of associated vulnerabilities of the case can be divided into four levels according to the number and a preset number threshold; the initial value of the case current state can include execution failure, execution success and non-execution, and the non-execution can be regarded as level 1, the execution success can be regarded as level 2 / 3, and the execution failure can be regarded as level 4; the influence factors of the importance of the test case in the embodiment are divided according to the report content, so as to realize complete fitting of the test case and effectively represent the influence factors of the test case.

[0087] Specifically, the embodiment also provides a reference table of the initial value of the influence factor, which can be seen from Table 1 below.

[0088] Table 1 Reference table of initial value of influence factor

[0089]

[0090]

[0091] The number in the parentheses is the level of the initial value; the larger the level is, the higher the priority is.

[0092] S120, determining the importance level of the test case according to the evaluation value of the influence factor of the importance of the test case.

[0093] In the embodiment, the evaluation value of the influence factor of the importance of the test case is at least one, and the number of the evaluation value is related to the number of the influence factors selected by the test case; for example, if the number of the influence factors of the importance of the test case is 7, the evaluation value of the influence factor of the importance of the test case is 7; wherein each influence factor of the importance of the test case corresponds to an initial value. Since the size of the evaluation value in the embodiment can reflect the level of an influence factor, the importance level of the test case determined according to the evaluation value of each influence factor corresponds to the level of the influence factor, i.e., can also be divided into level 1, level 2, level 3 and level 4.

[0094] The embodiment of the application determines the influence factor of the importance of the test case, determines the evaluation value of the influence factor of the importance of the test case, and determines the importance level of the test case according to the evaluation value of the influence factor of the importance of the test case. The embodiment of the application can quickly and accurately determine the importance level of the test case according to the evaluation value of the influence factor of the importance of the test case, thereby effectively improving the determination efficiency of the importance of the test case.

[0095] Embodiment two

[0096] Figure 2 is a flowchart of a case importance determination method in embodiment two of the present application. This embodiment is further extended and optimized on the basis of the above-mentioned embodiments, and can be combined with any optional scheme in the above-mentioned technical solutions. As shown in the figure, the method comprises: Figure 2

[0097] S210, determining an influence factor of the test case importance; and determining an evaluation value of the influence factor of the test case importance.

[0098] In this embodiment, optionally, the influence factor of the test case importance comprises:

[0099] obtaining case information of the test case; wherein the case information comprises at least one of case function, execution duration and case requirement;

[0100] inputting the case information of the test case into a pre-established influence factor decision model, and taking the output of the influence factor decision model as the influence factor of the test case importance.

[0101] Among the influence factor decision model, a plurality of influence factors of the test case importance are embedded, so as to determine the influence factor of the test case importance according to the matching value of the input case information of the test case and each influence factor.

[0102] Specifically, inputting the case information of the test case into the pre-established influence factor decision model, and taking the output of the influence factor decision model as the influence factor of the test case importance can comprise: inputting the case information of the test case into the pre-established influence factor decision model, and calculating the matching value of each influence factor and the test information of the test case, if it is detected that there is a matching value greater than a preset matching threshold, then the influence factor associated with the matching value is taken as an influence factor of the test case importance. This embodiment inputs the test information of the test case into the influence factor decision model, so as to conveniently and quickly determine the influence factor of the test case importance, thereby avoiding the problem that the judgment result is inaccurate due to human experience.

[0103] In this embodiment, optionally, the establishment process of the influence factor decision model is as follows:

[0104] obtaining case information of historical test cases and influence factors of historical test case importance;

[0105] training the influence factor decision model according to the case information of the historical test cases and the influence factors of the historical test case importance.

[0106] ​The influence factor of the historical test case importance can be determined according to the test experience of the tester, and after the execution of each historical test case is completed, the case information of the historical test case and the influence factor of the historical test case importance are stored in the database, so that the test information of the historical test case is effectively stored, thereby facilitating the information tracing of the tester on the historical test case.

[0107] According to the case information of the historical test case and the influence factor of the historical test case importance, the influence factor decision model is trained, which can include: storing the case information of the historical test case and the influence factor of the historical test case importance in association to obtain a case set, and dividing the case set into a training set and a verification set; wherein the number of the verification set can be less than the data of the training set; training the initial network model by using the training set, and performing qualified verification on the initial network model obtained by training by using the verification set, if the qualified rate of the initial network model is greater than the qualified rate threshold, the initial network model is used as the influence factor decision module. In this embodiment, the case information of the historical test case and the influence factor of the historical test case importance are used to train the influence factor decision model, so as to obtain a decision model capable of quickly determining the influence factor of the test case, thereby effectively improving the determination efficiency of the influence factor of the test case importance.

[0108] In this embodiment, optionally, if the influence factor includes the case initial priority and the case module priority, the evaluation value of the influence factor of the test case importance is determined, including:

[0109] According to the case characteristics of the test case, the evaluation value of the case initial priority is determined; wherein the case characteristics include at least one of the core case, the boundary case, the reverse case and the interface display case;

[0110] According to the function module of the test case, the evaluation value of the case module priority is determined; wherein the function module includes at least one of the core business module, the main function module, the configuration module and the auxiliary function module.

[0111] According to the case characteristics of the test case, the evaluation value of the case initial priority is determined, which can specifically include: the case characteristics of the test case are semantically divided with the content of the influence factor being the case initial priority in Table 1, and the initial value of the test characteristics of the test case can be obtained; according to the function module of the test case, the evaluation value of the case module priority is determined, which can be semantically divided according to the function module of the test case and the content of the influence factor being the case module priority in Table 1, that is, the evaluation value of the test case is quickly found. In this embodiment, the corresponding evaluation value determination strategy can be formulated according to different influence factors, so that each influence factor in different dimensions can be independently classified, thereby improving the accuracy of the test case influence factor.

[0112] In the embodiment, if the influencing factors include the case execution times, the case associated vulnerability quantity and the case current state, the evaluation value of the influencing factor of the test case importance is determined, including:

[0113] The evaluation value of the case execution times is determined according to the current execution times of the test case and the preset times threshold value;

[0114] The evaluation value of the case associated vulnerability quantity is determined according to the current vulnerability quantity of the test case and the preset quantity threshold value;

[0115] The evaluation value of the case current state is determined according to the current execution state of the test case and the preset state rule; wherein, the preset state rule includes the association relationship between the current execution state and the evaluation value.

[0116] The evaluation value of the case execution times is determined according to the current execution times of the test case and the preset times threshold value, which can include: if the current execution times of the test case is less than the first times threshold value, the evaluation value is determined as 4; if the current execution times of the test case is greater than the first times threshold value and less than the second times threshold value, the evaluation value is determined as 3; if the current execution times of the test case is greater than the second times threshold value and less than the third times threshold value, the evaluation value is determined as 2; if the current execution times of the test case is greater than the third times threshold value, the evaluation value is determined as 1; wherein, the first times threshold value < the second times threshold value < the third times threshold value. The determination principle of the evaluation value of the case associated vulnerability quantity is the same as that of the evaluation value of the case execution times.

[0117] The evaluation value of the case current state is determined according to the current execution state of the test case and the preset state rule, which can include: if the current execution state of the test case is execution failure, the evaluation value of the case current state is determined as 4; if the current execution state of the test case is execution success, the evaluation value of the case current state is determined as 3 / 2; if the current execution state of the test case is not executed, the evaluation value of the case current state is determined as 1.

[0118] In the embodiment, the preset rule determination is performed on the case that the evaluation value of the influencing factor is too much or too little, so that the evaluation value of each influencing factor is standardized in the same interval, thereby facilitating the unified calibration of the evaluation value of each influencing factor.

[0119] In the embodiment, the case associated demand importance degree is determined according to at least one of the user frequency, the investment fund and the purchase order. The use degree and the attention degree of the user to the product can directly reflect the applicability of the product in the user group, therefore, the case associated demand importance degree can be effectively determined through the information feedback of the user or the tracking of the user use record.

[0120] S220, determining a factor grade value set of the test case according to the evaluation value of the influence factor of the test case importance.

[0121] In this embodiment, each influence factor of a test case corresponds to a unique evaluation value, by which the importance grade of the test case is determined. For example, if the influence factor of the test case importance is 7, and the evaluation value of each influence factor ranges from 1 to 4, the factor grade value set of the test case corresponding to the evaluation value can be {2, 4, 4, 3, 1, 3, 2}.

[0122] S230, determining the importance grade of the test case according to the factor grade value set.

[0123] In this embodiment, the importance grade of the test case can be determined according to the mode of the evaluation value in the factor grade value set. For example, taking the factor grade value set {2, 4, 4, 4, 1, 3, 2} as an example, the number of evaluation value 4 is three, the number of evaluation value 3 is one, the number of evaluation value 2 is two, and the number of evaluation value 1 is one. Therefore, the grade value of the test case is determined as 4, and the importance grade of the test case is the highest grade. In this embodiment, the factor grade value set is determined according to the evaluation value of each test case, and the evaluation value of each test case is stored in the set to quickly compare the importance grade of the test case.

[0124] The importance grade evaluation result of the test case in this embodiment can be seen from Table 2 below.

[0125] Table 2 Importance grade evaluation result of test case

[0126] Results Meaning Execution order recommendation 4 Highest rank; case is very important, must be executed and must be returned Execute and return with priority 3 Second rank; case is important, must be returned Secondary priority execution and return 2 Third rank; case is of general importance, depending on test time Lower priority 1 Lowest rank; can not be executed Lowest priority

[0127] In this embodiment, the importance grade of the test case can be determined according to the factor grade value set, including:

[0128] counting the number of each evaluation value in the factor grade value set;

[0129] determining the importance grade of the test case according to the evaluation value with the largest number in the factor grade value set.

[0130] In this embodiment, the evaluation value with the largest number is used as the evaluation rule of the importance grade of the test case, which can effectively search for the evaluation value with the highest priority grade, so as to accurately determine the importance grade of the test case.

[0131] In this embodiment, the importance grade of the test case can be determined according to the evaluation value with the largest number in the factor grade value set, including:

[0132] If it is detected that there are at least two evaluation values with the maximum number of identical evaluation values in the sum of the factor level values, the priority levels of the at least two evaluation values are determined.

[0133] The evaluation value with the highest priority level among the at least two evaluation values is taken as the importance level of the test case.

[0134] In the embodiment, the priority levels of the evaluation values with the same number and the maximum number are determined, and the evaluation value with the highest priority level is selected as the importance level of the test case, so that the tester can quickly select important test cases from a large number of test cases for execution and regression, thereby saving test time and improving test efficiency and quality.

[0135] For example, if the set of factor level values is {2, 4, 4, 3, 1, 3, 2}, the evaluation values with the number of two are 4 and 3, and the priority of 4 is higher than that of 3, so 4 is taken as the importance level of the test case.

[0136] Based on the above-mentioned embodiment, the embodiment further includes the following steps:

[0137] The execution duration of the test case is determined according to the importance level of the test case.

[0138] If it is detected that the execution duration of the test case is lower than the first duration threshold, a regression test operation is performed to execute a test operation on other test cases with the marked state of needing to perform a test.

[0139] In the embodiment, the execution duration of the test case is the execution time of the test case with a high importance level (for example, 3 and / or 4); the first duration threshold is lower than the execution duration of all test cases, and the size of the first duration threshold can be set as the difference between the execution duration of all test cases and the execution duration of other test cases with the marked state of needing to perform a test. The embodiment can test other test cases with the marked state of needing to perform a test on the basis of the test of important test cases, thereby improving the optimization efficiency of the system.

[0140] Based on the above-mentioned embodiment, the embodiment further includes the following steps:

[0141] If it is detected that the execution duration of all test cases with the marked state of needing to perform a test in the same test cycle is lower than the second duration threshold, a test operation is performed on test cases with the marked state of not needing to perform a test.

[0142] The second duration threshold is less than the execution duration of all test cases. The second duration threshold can be set as the difference between the execution duration of all test cases and the third duration. The third duration is the execution time of the test case that does not need to be executed. After the test case with the marked state of needing to be executed is executed, the test case with the marked state of not needing to be executed is also executed, so that all test cases can be executed within the effective time, and the system can be comprehensively optimized and improved.

[0143] Embodiment three

[0144] Figure 3 FIG. 1 is a structural schematic diagram of a case importance determination device in the embodiment three of the application. The device can be applied to the case of determining the importance level of a test case. The device is configured in an electronic device, and can implement the case importance determination method in any embodiment of the application. The device specifically includes the following:

[0145] The first determination module 310 is configured to determine the influence factor of the importance of the test case, and determine the evaluation value of the influence factor of the importance of the test case.

[0146] The second determination module 320 is configured to determine the importance level of the test case according to the evaluation value of the influence factor of the importance of the test case.

[0147] On the basis of the above-mentioned embodiments, optionally, the influence factor includes at least one of the initial priority of the case, the priority of the module to which the case belongs, the execution times of the case, the number of associated vulnerabilities of the case, the current state of the case, the importance degree of the associated requirement of the case, and the execution complexity of the case.

[0148] On the basis of the above-mentioned embodiments, optionally, the first determination module 310 includes an information acquisition unit and an influence factor determination unit.

[0149] The information acquisition unit is configured to acquire the case information of the test case. The case information includes at least one of the case function, the execution duration, and the case requirement.

[0150] The influence factor determination unit is configured to input the case information of the test case into a pre-established influence factor decision model, and take the output of the influence factor decision model as the influence factor of the importance of the test case.

[0151] On the basis of the above-mentioned embodiments, optionally, the device further includes a model establishment module. The model establishment module is specifically configured to:

[0152] acquire the case information of the historical test case and the influence factor of the importance of the historical test case;

[0153] According to the case information of the historical test case and the influence factor of the historical test case importance, an influence factor decision model is trained.

[0154] On the basis of the above-mentioned embodiments, optionally, the first determination module 310 further comprises a first evaluation value determination unit and a second evaluation value determination unit.

[0155] The first evaluation value determination unit is configured to determine an evaluation value of the initial priority of the case according to a case characteristic of the test case; wherein the case characteristic comprises at least one of a core case, a boundary case, a reverse case and an interface display case.

[0156] The second evaluation value determination unit is configured to determine an evaluation value of the module priority to which the test case belongs according to a function module of the test case; wherein the function module comprises at least one of a core business module, a main function module, a configuration module and an auxiliary function module.

[0157] On the basis of the above-mentioned embodiments, optionally, the first determination module 310 further comprises a third evaluation value determination unit, a fourth evaluation value determination unit and a fifth evaluation value determination unit.

[0158] The third evaluation value determination unit is configured to determine an evaluation value of the execution frequency of the test case according to a current execution frequency of the test case and a preset frequency threshold.

[0159] The fourth evaluation value determination unit is configured to determine an evaluation value of the associated vulnerability quantity of the test case according to a current vulnerability quantity of the test case and a preset quantity threshold.

[0160] The fifth evaluation value determination unit is configured to determine an evaluation value of the current state of the test case according to a current execution state of the test case and a preset state rule; wherein the preset state rule comprises an associated relationship between the current execution state and the evaluation value.

[0161] On the basis of the above-mentioned embodiments, optionally, the importance degree of the case associated requirement is determined according to at least one of a user usage frequency, an investment fund and a purchase order.

[0162] On the basis of the above-mentioned embodiments, optionally, the second determination module 320 comprises a set determination unit and a level determination unit.

[0163] The set determination unit is configured to determine a factor level value set of the test case according to the evaluation value of the influence factor of the test case importance.

[0164] The level determination unit is configured to determine an importance level of the test case according to the factor level value set.

[0165] On the basis of the above-mentioned embodiments, the grade determining unit comprises: a quantity counting subunit and a grade determining subunit.

[0166] The quantity counting subunit is configured to count the number of each evaluation value in the factor grade value set.

[0167] The grade determining subunit is configured to determine the importance grade of the test case according to the evaluation value with the largest number in the factor grade value set.

[0168] On the basis of the above-mentioned embodiments, the grade determining subunit is specifically configured to:

[0169] If it is detected that there are at least two evaluation values with the largest number and same in the sum of the factor grade values, the priority level of the at least two evaluation values is determined.

[0170] The evaluation value with the highest priority level in the at least two evaluation values is taken as the importance grade of the test case.

[0171] On the basis of the above-mentioned embodiments, the device further comprises: a time length determining module and a first operation executing module.

[0172] The time length determining module is configured to determine the execution time length of the test case according to the importance grade of the test case.

[0173] The first operation executing module is configured to, if it is detected that the execution time length of the test case is lower than a first time length threshold, execute a regression test operation to perform a test operation on other test cases with the marked state of needing to perform a test.

[0174] On the basis of the above-mentioned embodiments, the device further comprises:

[0175] The second operation executing module is configured to, if it is detected that the time length of the test completion of all test cases with the marked state of needing to perform a test in the same test period is lower than a second time length threshold, perform a test operation on test cases with the marked state of not needing to perform a test.

[0176] The case importance determining device of the third embodiment of the present application can quickly and accurately determine the importance grade of the test case according to the evaluation value of the influence factor of the importance of the test case, thereby effectively improving the determination efficiency of the importance of the test case.

[0177] The case importance determining device provided in the embodiments of the present application can execute the case importance determining method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0178] Embodiment Four

[0179] Figure 4 is a structural schematic diagram of the electronic device in embodiment four of the present application, as shown in the figure, the electronic device comprises a processor 410, a memory 420, an input device 430 and an output device 440; the number of processors 410 in the electronic device can be one or more, Figure 4 one processor 410 is taken as an example in the figure; the processor 410, the memory 420, the input device 430 and the output device 440 in the electronic device can be connected through a bus or other means, Figure 4 the connection through the bus is taken as an example in the figure. Figure 4

[0180] The memory 420, as a kind of computer readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the case importance determination method in the embodiment of the present application. The processor 410 performs various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 420, that is, realizes the case importance determination method provided by the embodiment of the present application.

[0181] The memory 420 can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system and at least one application program required by a function; the storage data area can store data created according to the use of the terminal and the like. In addition, the memory 420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 420 can further include a memory remotely arranged with respect to the processor 410, which can be connected to the electronic device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0182] The input device 430 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device, which can include a keyboard, a mouse and the like. The output device 440 can include a display device such as a display screen.

[0183] Embodiment five

[0184] The embodiment provides a storage medium containing computer executable instructions, which are used to realize the case importance determination method provided by the embodiment of the present application when executed by a computer processor.

[0185] Of course, the computer executable instructions of the storage medium containing computer executable instructions provided by the embodiment of the present application are not limited to the method operations as described above, but can also perform related operations in the case importance determination method provided by any embodiment of the present application.​

[0186] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0187] It is worth noting that in the above embodiments of the search device, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual differentiation, and do not limit the protection scope of the present application.

[0188] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method of determining the significance of a case, characterized in that, The method comprises: determining an influence factor of test case importance; and determining an evaluation value of the influence factor of test case importance; the number of evaluation values of the influence factor of test case importance is the same as the number of influence factors of test case importance; determining an importance level of the test case according to the evaluation value of the influence factor of test case importance; wherein the determination of the influence factor of test case importance comprises: obtaining case information of the test case; wherein the case information comprises at least one of case function, execution duration and case requirement; inputting the case information of the test case into a pre-established influence factor decision model, and taking the output of the influence factor decision model as the influence factor of test case importance; wherein a plurality of influence factors of test case importance are embedded in the influence factor decision model, so as to determine the influence factor of test case importance according to the matching value of the input case information of the test case and each influence factor; wherein if the influence factor comprises case execution times, case associated vulnerability quantity and case current state, the determination of the evaluation value of the influence factor of test case importance comprises: determining the evaluation value of the case execution times according to the comparison result of the current execution times of the test case and a preset number threshold; determining the evaluation value of the case associated vulnerability quantity according to the comparison result of the current vulnerability quantity of the test case and a preset number threshold; determining the evaluation value of the case current state according to the current execution state of the test case and a preset state rule; wherein the preset state rule comprises the association between the current execution state and the evaluation value.

2. The method of claim 1, wherein, The influence factor comprises at least one of case initial priority, case belonging module priority, case execution times, case associated vulnerability quantity, case current state, case associated requirement importance degree and case execution complexity.

3. The method of claim 1, wherein, The establishment process of the influence factor decision model is as follows: obtaining case information of historical test cases and influence factors of historical test case importance; training to obtain the influence factor decision model according to the case information of the historical test cases and the influence factors of the historical test case importance.

4. The method of claim 2, wherein, If the influence factor comprises case initial priority and case belonging module priority, the determination of the evaluation value of the influence factor of test case importance comprises: determining the evaluation value of the case initial priority according to the case characteristics of the test case; wherein the case characteristics comprise at least one of core case, boundary case, reverse case and interface display case; determining the evaluation value of the case belonging module priority according to the function module of the test case; wherein the function module comprises at least one of core business module, main function module, configuration module and auxiliary function module.

5. The method of claim 2, wherein, The case associated requirement importance degree is determined according to at least one of user usage frequency, investment and purchase order.

6. The method of claim 1, wherein, determining the importance level of the test case according to the evaluation value of the influence factor of test case importance comprises: determining a factor grade value set of the test case according to the evaluation value of the influence factor of the test case importance; determining the importance grade of the test case according to the factor grade value set.

7. The method of claim 6, wherein, determining the importance grade of the test case according to the factor grade value set, comprising: counting the number of each evaluation value in the factor grade value set; determining the importance grade of the test case according to the evaluation value with the largest number in the factor grade value set.

8. The method of claim 7, wherein, determining the importance grade of the test case according to the evaluation value with the largest number in the factor grade value set, comprising: if it is detected that there are at least two evaluation values with the largest number and same in the sum of the factor grade values, judging the priority level of the at least two evaluation values; taking the evaluation value with the highest priority level in the at least two evaluation values as the importance grade of the test case.

9. The method of claim 1, wherein, further comprising: determining the execution duration of the test case according to the importance grade of the test case; if it is detected that the execution duration of the test case is lower than a first duration threshold, performing a regression test operation to perform a test operation on other test cases with a marked state of needing to perform a test.

10. The method of claim 1, wherein, further comprising: if it is detected that the duration of test completion of all test cases with a marked state of needing to perform a test in the same test cycle is lower than a second duration threshold, performing a test operation on test cases with a marked state of not needing to perform a test.

11. A case importance determination apparatus characterized by comprising: the device comprises: a first determining module, configured to determine an influence factor of test case importance, and determine an evaluation value of the influence factor of the test case importance; the number of the evaluation value of the influence factor of the test case importance is the same as the number of the influence factor of the test case importance; a second determining module, configured to determine an importance grade of the test case according to the evaluation value of the influence factor of the test case importance; wherein the first determining module comprises an information obtaining unit and an influence factor determining unit; the information obtaining unit is configured to obtain case information of a test case; wherein the case information comprises at least one of case function, execution duration and case requirement; the influence factor determining unit is configured to input the case information of the test case into a pre-established influence factor decision model, and take the output of the influence factor decision model as the influence factor of the test case importance; wherein a plurality of influence factors of test case importance are embedded in the influence factor decision model, so as to determine the influence factor of the test case importance according to the matching value of the input case information of the test case and each influence factor; If the influence factors include the case execution times, the case associated vulnerability quantity and the case current state, the first determining module further includes a third evaluation value determining unit, a fourth evaluation value determining unit and a fifth evaluation value determining unit; the third evaluation value determining unit is configured to determine the evaluation value of the case execution times according to the comparison result of the current execution times of the test case and a preset number threshold; the fourth evaluation value determining unit is configured to determine the evaluation value of the case associated vulnerability quantity according to the comparison result of the current vulnerability quantity of the test case and a preset quantity threshold; the fifth evaluation value determining unit is configured to determine the evaluation value of the case current state according to the current execution state of the test case and a preset state rule; and the preset state rule includes the associated relationship between the current execution state and the evaluation value.

12. An electronic device, comprising: The method comprises: one or more processors; a memory device for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processors implement the case importance determination method as claimed in any one of claims 1-10.

13. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the case importance determination method as claimed in any one of claims 1-10.

Citation Information

Patent Citations

  • Regression test case determination method and device

    CN110633222A

  • Defect-based regression test case processing method and device, and computing equipment

    CN110941545A