Test case scheduling method, device and equipment and readable storage medium

By dynamically adjusting the weight value and scheduling threshold of test cases, the scheduling strategy of test cases is optimized, and the time increase caused by the increase in the number of test cases is solved, and the defect discovery efficiency and coverage rate are improved.

CN119226136APending Publication Date: 2024-12-31MEMBLAZE TECH BEIJING
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411074691.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

As the number of test cases increases, the total time required to execute the test cases increases linearly, resulting in a decrease in the number of test cases coverage per unit time, reducing the probability of finding defects in the target being tested.

Method used

By obtaining test cases and their weight values ​​for each execution round, filtering test case groups based on weight values ​​and scheduling thresholds, and adjusting weight values ​​and scheduling thresholds based on execution results, to optimize the scheduling strategy of test cases and ensure high-frequency scheduling Use cases with high failure frequency and use cases with low frequency scheduling failure frequency.

Benefits of technology

While detecting the defects of the tested target as soon as possible, it reduces overall time and repeated verification, ensuring that all test cases are scheduled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226136A_ABST
    Figure CN119226136A_ABST
Patent Text Reader

Abstract

The invention relates to a test case scheduling method and device, equipment and a readable storage medium. The method comprises the following steps: obtaining each test case and a weight value corresponding to each test case, and screening out a test case group of a current execution round based on the weight value corresponding to each test case and a scheduling threshold value; on one hand, an execution result of a test case group of a current execution round is obtained, and based on the execution result of each target test case in the test case group of the current execution round, a weight value corresponding to each target test case in the test case group is updated; and / or on the other hand, if all the test case groups of the current execution round are executed, adjusting the scheduling threshold value, and repeatedly executing the steps until all the test case groups of each execution round are executed. According to the embodiment of the invention, different weight values can be distributed for the test case, so that the defect of the tested target can be found as early as possible, the overall time cost is reduced, and the repeated verification strength is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a test case scheduling method, apparatus, device and readable storage medium. Background Art

[0002] Currently, when performing automated regression testing, multiple rounds of testing are usually performed according to a fixed set of test cases selected manually.

[0003] However, as the number of test cases increases, if all test cases are tested in each round of testing, the total time required to execute the test cases will also increase linearly. In this case, the number of times each test case is covered per unit time will be reduced, thereby reducing the probability of discovering defects in the target under test, resulting in the failure to discover defects in the target under test in a timely manner. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a test case scheduling method, device, equipment and readable storage medium, so that test cases with high failure frequency can be scheduled at a relatively high frequency, so as to discover the defects of the target under test as early as possible, and test cases with low failure frequency can be scheduled at a relatively low frequency, so as to reduce the overall time expenditure, reduce the intensity of repeated verification, and ensure that all test cases can be scheduled.

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

[0006] For each execution round, obtain each test case and the weight value corresponding to each test case;

[0007] Based on the weight values ​​corresponding to each test case and the scheduling threshold, the test case group of the current execution round is screened out, and the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirements of the current execution round;

[0008] Get the execution results of the test case group in the current execution round;

[0009] According to the execution results and execution completion status of the test case group, the scheduling strategy is adjusted in the following manner: Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or

[0010] Mode 2: In response to the completion of execution of each target test case in the test case group of the current execution round, adjusting the scheduling threshold;

[0011] Repeat the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups in each execution round are executed.

[0012] In some embodiments, the step of filtering out the test case group for the current execution round based on the weight value and the scheduling threshold corresponding to each test case includes:

[0013] For any test case in each test case, determine whether the weight value corresponding to the test case is greater than or equal to the scheduling threshold;

[0014] If the weight value corresponding to the test case is greater than or equal to the scheduling threshold, the test case is filtered into the test case group.

[0015] In some embodiments, the method further comprises:

[0016] If the weight value corresponding to the test case is less than the scheduling threshold, it is determined that the test case is not scheduled for the current execution round.

[0017] In some embodiments, after obtaining each test case and the weight value corresponding to each test case for each execution round, the method further includes:

[0018] According to the historical pass rate of each test case, the weight value corresponding to each test case is adjusted;

[0019] The step of adjusting the weight value corresponding to each test case according to the historical pass rate of each test case includes:

[0020] For any test case among the test cases, if the historical pass rate of the test case is greater than or equal to the preset pass rate threshold, the weight value corresponding to the test case is lowered;

[0021] If the historical pass rate of the test case is less than the preset pass rate threshold, the weight value corresponding to the test case is increased.

[0022] In some embodiments, obtaining the execution result of the test case group of the current execution round includes:

[0023] Call the automated testing framework to execute the test case group of the current execution round;

[0024] Obtain the execution result of each target test case in the test case group of the current execution round fed back by the automated testing framework.

[0025] In some embodiments, the updating of the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round includes:

[0026] If the execution result of the target test case is successful, the weight value is lowered based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation method is: calculate the product value of the weight value corresponding to the target test case and the first balancing factor, and subtract the product value from the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case;

[0027] If the execution result of the target test case is failure, the weight value is increased based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation formula is: calculate the difference between the preset weight value threshold and the weight value corresponding to the target test case, calculate the product value of the difference and the first balancing factor, and add the weight value corresponding to the target test case to the product value to obtain the target weight value corresponding to the target test case;

[0028] The weight value corresponding to the target test case is updated to the target weight value.

[0029] In some embodiments, updating the weight value corresponding to the target test case to a target weight value includes:

[0030] Determine whether the target weight value corresponding to the target test case is less than or equal to zero, or whether the target weight value is greater than or equal to the preset weight value threshold;

[0031] If the target weight value corresponding to the target test case is less than or equal to zero, updating the weight value corresponding to the target test case to an initial value;

[0032] If the target weight value corresponding to the target test case is greater than or equal to the preset weight value threshold, then the weight value corresponding to the target test case is updated to the preset weight value threshold;

[0033] If the target weight value corresponding to the target test case is greater than zero and less than the preset weight value threshold, the weight value corresponding to the target test case is updated to the target weight value.

[0034] In some embodiments, the updating of the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round includes:

[0035] If the execution result of the target test case is success, the calculated weight value is rounded down to obtain the target weight value corresponding to the target test case;

[0036] If the execution result of the target test case is failure, the calculated weight value is rounded up to obtain the target weight value corresponding to the target test case.

[0037] In some embodiments, the adjusting the scheduling threshold comprises:

[0038] The scheduling threshold is adjusted in combination with the second balancing factor;

[0039] The adjusting the scheduling threshold in combination with the second balancing factor includes:

[0040] Calculate the product value of the preset target threshold and the second balancing factor, and add the scheduling threshold to the product value to obtain the target scheduling threshold;

[0041] Determine whether the target scheduling threshold is greater than or equal to a preset target threshold;

[0042] If the target scheduling threshold is greater than or equal to the preset target threshold, adjusting the scheduling threshold to zero;

[0043] If the target scheduling threshold is less than the preset target threshold, the scheduling threshold is adjusted to the target scheduling threshold.

[0044] In a second aspect, an embodiment of the present disclosure provides a test case scheduling device, the device comprising:

[0045] A first acquisition module is used to acquire each test case and a weight value corresponding to each test case for each execution round;

[0046] A screening module is used to screen out the test case group of the current execution round based on the weight value corresponding to each test case and the scheduling threshold, wherein the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirement of the current execution round;

[0047] The second acquisition module is used to obtain the execution results of the test case group of the current execution round;

[0048] The adjustment module is used to adjust the scheduling strategy according to the execution results and execution completion status of the test case group in the following manner: Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or

[0049] Mode 2: In response to the completion of execution of each target test case in the test case group of the current execution round, adjusting the scheduling threshold;

[0050] The completion module is used to repeatedly execute the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups of each execution round are executed.

[0051] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0052] Memory;

[0053] Processor; and

[0054] Computer programs;

[0055] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0056] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method as described in the first aspect.

[0057] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in the first aspect is implemented.

[0058] The test case scheduling method, apparatus, device and readable storage medium provided by the embodiments of the present disclosure obtain each test case and the weight value corresponding to each test case for each execution round, and screen out the test case group of the current execution round based on the weight value corresponding to each test case and the scheduling threshold. On the one hand, the execution result of the test case group of the current execution round is obtained, and the weight value corresponding to each target test case in the test case group of the current execution round is updated based on the execution result of each target test case in the test case group of the current execution round; and / or, on the other hand, in response to the completion of the execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated until the test case group of each execution round is completed. The scheduling strategy of test cases is improved from at least one of the two perspectives of controlling the weight value of the scheduled test cases and / or adjusting the scheduling threshold. Compared with the prior art, the embodiment of the present disclosure screens out the test case group of the current execution round based on the weight value and the scheduling threshold corresponding to each test case, and updates the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round. Different weight values ​​can be assigned to the test cases, so that defects of the target under test can be discovered as early as possible, reducing the overall time expenditure and the intensity of repeated verification, while ensuring that all test cases can be scheduled. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0061] Figure 1 A flow chart of a test case scheduling method provided by an embodiment of the present disclosure;

[0062] Figure 2 A flow chart of a test case scheduling method provided by another embodiment of the present disclosure;

[0063] Figure 3 A flow chart of a test case scheduling method provided by another embodiment of the present disclosure;

[0064] Figure 4 A schematic diagram of a complete test case scheduling process provided by an embodiment of the present disclosure;

[0065] Figure 5 A schematic diagram of the structure of a test case scheduling device provided in an embodiment of the present disclosure;

[0066] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0067] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0068] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the method, device and / or system described herein. However, after understanding the disclosure of the application, various changes, modifications and equivalents of the method, device and / or system described herein will be clear. For example, the order of operations described herein is only an example, and is not limited to those orders set forth herein, but can be changed as it will be clear after understanding the disclosure of the application, except for the operations that must occur in a specific order. In addition, for increased clarity and conciseness, the description of features known after understanding the disclosure of the application can be omitted.

[0069] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein that will be clear after understanding the disclosure of the present application.

[0070] Throughout the specification, when a component is described as being "connected to" or "coupled to" another component, the component may be directly "connected to" or "coupled to" the other component, or there may be one or more other components between them. Conversely, when an element is described as being "directly connected to" or "directly coupled to" another element, there may be no other elements between them. Similarly, similar expressions (e.g., "between" versus "immediately between" and "adjacent to" versus "immediately adjacent to") should also be interpreted in the same manner. As used herein, the term "and / or" includes any one of the relevant listed items or any combination of any two or more of the relevant listed items.

[0071] Although terms such as "first", "second" and "third" may be used to describe various components, components, regions, layers or parts herein, these components, components, regions, layers or parts are not limited by these terms. Instead, these terms are only used to distinguish one component, component, region, layer or part from another component, component, region, layer or part. Therefore, without departing from the teachings of the examples described herein, the first component, first component, first region, first layer or first part referred to in the examples may also be referred to as the second component, second component, second region, second layer or second part.

[0072] The terms used herein are only used to describe various examples and will not be used to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the stated features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.

[0073] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0074] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art based on the understanding of the disclosure of the present application and the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in general dictionaries) should be interpreted as having a meaning consistent with their meaning in the context of the relevant field and the disclosure of the present application, and should not be interpreted in an idealized or overly formal way. The use of the term "may" with respect to an example or embodiment herein (e.g., with respect to what an example or embodiment may include or implement) indicates that there is at least one example or embodiment that includes or implements such a feature, and all examples are not limited thereto.

[0075] As the number of test cases increases, the total time required to execute the test cases will also increase linearly. In this case, the number of times each test case is covered per unit time will be reduced, thereby reducing the probability of discovering defects in the tested target, resulting in the failure to discover defects in the tested target in a timely manner. In response to this problem, the embodiment of the present disclosure provides a test case scheduling method, which is described below in conjunction with a specific embodiment.

[0076] Figure 1 A flow chart of a test case scheduling method provided in an embodiment of the present disclosure. The executor of the method is an electronic device. The electronic device may be a portable mobile device such as a smart phone, a tablet computer, a laptop computer, a car navigation device, an intelligent sports equipment, or a storage device; it may also be a fixed device such as a personal computer, a smart home appliance, a server, etc., wherein the server may be a single server, a server cluster, a server cluster may be a distributed cluster, or a centralized cluster. The method may be applied to a scenario where test cases are scheduled, or to a scenario where test cases with a high failure frequency are scheduled at a relatively high frequency, or to a scenario where test cases with a low failure frequency are scheduled at a relatively low frequency. It is understandable that the test case scheduling method provided in an embodiment of the present disclosure may also be applied in other scenarios.

[0077] Below Figure 1 The test case scheduling method shown in the figure is introduced, taking the test for storage devices as an example, and the specific steps of the method are as follows:

[0078] S101. For each execution round, obtain each test case and a weight value corresponding to each test case.

[0079] In this step, the electronic device will obtain each test case and the weight value corresponding to each test case. Figure 4As shown, the electronic device obtains all selected test cases, and each test case is bound to a corresponding weight value. Optionally, the weight value range is [0, 100]. The larger the weight value, the greater the probability that the test case is scheduled.

[0080] S102: Filter out a test case group for a current execution round based on a weight value corresponding to each test case and a scheduling threshold, wherein the scheduling threshold is a threshold for determining whether each test case meets a scheduling requirement for a current execution round.

[0081] In this step, after obtaining each test case and the weight value corresponding to each test case, the electronic device screens out the test case group for the current execution round according to the weight value corresponding to each test case and the scheduling threshold. In some embodiments, the electronic device compares the weight value corresponding to each test case and the size relationship of the scheduling threshold, and determines the test case with a weight value greater than or equal to the scheduling threshold as the test case group for the current execution round. Optionally, the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirements of the current execution round, and the value range is [0, 100).

[0082] S103: Obtain the execution result of the test case group of the current execution round.

[0083] In this step, the electronic device will obtain the execution result of the test case group of the current execution round. Specifically, the screened test case group of the current execution round is executed to obtain the execution result, that is, the test result.

[0084] S104: Adjust the scheduling strategy according to the execution results and execution completion status of the test case group. The scheduling strategy is adjusted in the following manner:

[0085] Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or

[0086] Method 2: In response to the completion of execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted.

[0087] In some optional embodiments, the scheduling strategy can be adjusted by method 1, specifically: according to the execution results of the test case group of the current execution round, the weight value corresponding to the target test case is updated. In some embodiments, after a test case fails once, the weight value of the test case will be increased according to the preset first formula, and the test cases with high failure frequency can be scheduled at a relatively high frequency, so that the defects of the target under test can be discovered as early as possible. In some embodiments, after a test case succeeds once, the weight value of the test case will be reduced according to the preset second formula, and the test cases with low failure frequency can be scheduled at a relatively low frequency, which can reduce the overall time spent.

[0088] In some optional embodiments, the scheduling strategy can be adjusted by using method 2. The electronic device determines whether all test case groups of the current execution round have been executed, that is, whether the execution results of all test case groups have been obtained, and if all test case groups of the current execution round have been executed, the scheduling threshold is adjusted.

[0089] S105, repeat the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups of each execution round are executed.

[0090] In this step, the electronic device will repeatedly execute the step of obtaining each test case and the weight value corresponding to each test case, that is, perform the next round of scheduling, until all test case groups in each execution round are executed.

[0091] The disclosed embodiment obtains each test case and the weight value corresponding to each test case for each execution round, and based on the weight value corresponding to each test case and the scheduling threshold, screens out the test case group of the current execution round. On the one hand, the execution result of the test case group of the current execution round is obtained, and based on the execution result of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or, on the other hand, in response to the completion of the execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated until the test case group of each execution round is completed. The scheduling strategy of test cases is improved from at least one of the two perspectives of controlling the weight value of the scheduled test cases and / or adjusting the scheduling threshold. Compared with the prior art, the embodiment of the present disclosure screens out the test case group of the current execution round based on the weight value and the scheduling threshold corresponding to each test case, and updates the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round. Different weight values ​​can be assigned to the test cases, so that defects of the target under test can be discovered as early as possible, reducing the overall time expenditure and the intensity of repeated verification, while ensuring that all test cases can be scheduled.

[0092] Figure 2 A flow chart of a test case scheduling method provided by another embodiment of the present disclosure, such as Figure 2 As shown, the method includes the following steps:

[0093] S201. For each execution round, obtain each test case and a weight value corresponding to each test case.

[0094] Specifically, the implementation process and principle of S201 and S101 are the same, and will not be repeated here.

[0095] S202: For any test case among the test cases, determine whether the weight value corresponding to the test case is greater than or equal to the scheduling threshold.

[0096] In this step, after obtaining each test case and the weight value corresponding to each test case, the electronic device determines whether the weight value corresponding to each test case is greater than or equal to the scheduling threshold.

[0097] S203: If the weight value corresponding to the test case is greater than or equal to the scheduling threshold, the test case is filtered into the test case group.

[0098] In this step, if the electronic device determines that the weight value corresponding to the test case is greater than or equal to the scheduling threshold, the test case is determined to be a test case group.

[0099] In some embodiments, the method further includes: if the weight value corresponding to the test case is less than the scheduling threshold, determining that the test case is not scheduled for the current execution round.

[0100] In this embodiment, if the electronic device determines that the weight value corresponding to the test case is less than the scheduling threshold, it determines that the test case is not scheduled in the current execution round, that is, the test case is skipped in the current round.

[0101] S204: Call the automated testing framework to perform testing on the test case group of the current execution round.

[0102] In this step, the electronic device can call the automated testing framework to perform tests on the test case group of the current execution round. Figure 4 As shown, the electronic device calls the automated testing framework to execute the screened test case group.

[0103] S205: Obtain the execution result of each target test case in the test case group of the current execution round fed back by the automated testing framework.

[0104] In this step, after the automated testing framework completes execution of the test case group, it will feed back the execution result to the electronic device, and the electronic device obtains the execution result of each target test case in the test case group of the current execution round fed back by the automated testing framework.

[0105] S206. If the execution result of the target test case is successful, the weight value is lowered based on the weight value corresponding to the target test case combined with the first balancing factor. The calculation method is: calculate the product value of the weight value corresponding to the target test case and the first balancing factor, and subtract the product value from the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case.

[0106] In this step, if the execution result of the target test case is successful, the electronic device lowers the weight value based on the weight value corresponding to the target test case combined with the first balancing factor. The calculation method is: calculate the product value of the weight value corresponding to the target test case and the first balancing factor, and subtract the product value from the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case.

[0107] In some embodiments, the adjusted weight value may be further updated. If the execution result of the target test case is successful, the calculated weight value is rounded down to obtain the target weight value corresponding to the target test case. Figure 4As shown, when successful, it can be calculated based on the preset second formula described above, and the preset second formula is: target weight = weight-weight*factor, the result of the target weight is rounded down, weight is the weight value, factor is the preset balance factor, and its value range is [0.1, 1.0). The smaller the value of the preset balance factor, the gentler the impact of the test case execution result on the subsequent scheduling; the larger the value of the preset balance factor, the more radical the impact of the test case execution result on the subsequent scheduling. The preset balance factor factor uses the same value in each round of testing and for multiple different test cases, which will obtain a relatively fair evaluation standard. The preset balance factor in this embodiment is 0.1, and it can also be other values ​​without specific limitation.

[0108] S207. If the execution result of the target test case is failure, the weight value is increased based on the weight value corresponding to the target test case combined with the first balancing factor. The calculation formula is: calculate the difference between the preset weight value threshold and the weight value corresponding to the target test case, calculate the product value of the difference and the first balancing factor, and add the weight value corresponding to the target test case to the product value to obtain the target weight value corresponding to the target test case.

[0109] In this step, if the execution result of the target test case is failure, the electronic device increases the weight value based on the weight value corresponding to the target test case combined with the first balancing factor. The calculation formula is: calculate the difference between the preset weight value threshold and the weight value corresponding to the target test case, calculate the product value of the difference and the first balancing factor, and add the weight value corresponding to the target test case to the product value to obtain the target weight value corresponding to the target test case.

[0110] In some embodiments, if the execution result of the target test case is failure, the calculated weight value is rounded up to obtain the target weight value corresponding to the target test case. Figure 4 As shown, when it fails, it can be calculated based on the preset first formula described above, the preset first formula is: target weight = weight + (100-weight) * factor, the result of the target weight is rounded up, the preset weight value threshold is 100, weight is the weight value, factor is the preset balance factor, and this embodiment is explained with the preset weight value threshold as 100 without specific limitation.

[0111] S208. Update the weight value corresponding to the target test case to the target weight value.

[0112] In this step, the electronic device updates the weight value corresponding to the target test case to the target weight value, that is, replaces the original weight value with the target weight value.

[0113] In some embodiments, S208 may include but is not limited to S2081, S2082, S2083, S2084:

[0114] S2081. Determine whether the target weight value corresponding to the target test case is less than or equal to zero, or whether the target weight value is greater than or equal to the preset weight value threshold.

[0115] Taking the preset weight value threshold as 100 as an example, in this step, the electronic device determines whether the target weight ≤ 0 or the target weight ≥ 100.

[0116] S2082. If the target weight value corresponding to the target test case is less than or equal to zero, the weight value corresponding to the target test case is updated to an initial value.

[0117] If the target weight value corresponding to the target test case is less than or equal to zero, the electronic device updates the weight value corresponding to the target test case to the initial value. Since the weight value range is [0, 100], the target weight value reaches the lower limit of the value range and needs to be reset to the initial value, which can make the overall coverage more reasonable and ensure that all test cases can be scheduled. The initial value can be any positive integer, but considering that it should not be too large or too small and the subsequent percentage rate calculation, the initial value of this embodiment is selected as 100 without limitation.

[0118] S2083. If the target weight value corresponding to the target test case is greater than or equal to the preset weight value threshold, the weight value corresponding to the target test case is updated to the preset weight value threshold.

[0119] If the target weight value corresponding to the target test case is greater than or equal to the preset weight value threshold, the weight value corresponding to the target test case is updated to the preset weight value threshold. At this time, the target weight value has reached the preset weight value threshold, that is, the upper limit value, and the weight value is updated to the weight value threshold.

[0120] S2084. If the target weight value corresponding to the target test case is greater than zero and less than the preset weight value threshold, the weight value corresponding to the target test case is updated to the target weight value.

[0121] If the target weight value corresponding to the target test case is greater than zero and less than the preset weight value threshold, and the target weight value is within the value range of the weight value, the weight value corresponding to the target test case is updated to the target weight value.

[0122] S209, repeat the step of obtaining each test case and the weight value corresponding to each test case until all test case groups in each execution round are executed.

[0123] In this step, the electronic device determines whether all the test case groups in the current execution round have been executed, that is, whether the execution results of all the test case groups have been obtained. If all the test case groups in the current execution round have been executed, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated, that is, the next round of scheduling is performed until all the test case groups in each execution round have been executed.

[0124] In some embodiments, adjusting the scheduling threshold includes: adjusting the scheduling threshold in combination with a second balancing factor. Optionally, the second balancing factor and the first balancing factor may have the same value or different values, which is not limited here.

[0125] The disclosed embodiment obtains each test case and the weight value corresponding to each test case for each execution round, and for any test case in each test case, determines whether the weight value corresponding to the test case is greater than or equal to the scheduling threshold, and if the weight value corresponding to the test case is greater than or equal to the scheduling threshold, the test case is filtered into the test case group. Further, the automated test framework is called to perform test execution on the test case group of the current execution round, and the execution results of each target test case in the test case group of the current execution round fed back by the automated test framework are obtained.

[0126] Next, if the execution result of the target test case is successful, the weight value is lowered based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation method is: calculate the product value of the weight value corresponding to the target test case and the first balancing factor, and subtract the product value from the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case; if the execution result of the target test case is failed, the weight value is increased based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation formula is: calculate the difference between the preset weight value threshold and the weight value corresponding to the target test case, calculate the product value of the difference and the first balancing factor, and add the product value to the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case. Then, the weight value corresponding to the target test case is updated to the target weight value, and the steps of obtaining each test case and the weight value corresponding to each test case are repeatedly executed until the test case group of each execution round is completed.

[0127] Compared with the prior art, the embodiment of the present disclosure can schedule test cases with high failure frequency at a relatively high frequency by adjusting the weight values ​​of test cases, so as to discover defects of the target under test as early as possible, and schedule test cases with low failure frequency at a relatively low frequency, so as to reduce the overall time expenditure and the intensity of repeated verification, while ensuring that all test cases can be scheduled.

[0128] Figure 3 A flow chart of a test case scheduling method provided by another embodiment of the present disclosure, such as Figure 3 As shown, the method includes the following steps:

[0129] S301. For each execution round, obtain each test case and the weight value corresponding to each test case.

[0130] Specifically, the implementation process and principle of S301 and S101 are the same, and will not be repeated here.

[0131] S302: Filter out the test case group of the current execution round based on the weight value corresponding to each test case and the scheduling threshold.

[0132] Specifically, the implementation process and principle of S302 and S102 are the same, and will not be repeated here.

[0133] S303: If all test case groups of the current execution round have been executed, calculate the product value of the preset target threshold and the second balance factor, and add the scheduling threshold to the product value to obtain the target scheduling threshold.

[0134] In this step, if the electronic device determines that all test case groups in the current execution round have been completed, it will adjust the scheduling threshold, such as Figure 4 As shown, after a round of test case execution is completed, the scheduling threshold is adjusted. The adjustment formula of the scheduling threshold is: threshold = threshold + 100 * factor, the preset target threshold is 100, threshold is the scheduling threshold, and factor is the preset balance factor. The electronic device calculates the product value of the preset target threshold and the second balance factor, and then adds the scheduling threshold to the product value to obtain the target scheduling threshold.

[0135] S304: Determine whether the target scheduling threshold is greater than or equal to a preset target threshold.

[0136] In this step, the electronic device determines whether the target scheduling threshold is greater than or equal to the preset target threshold. Figure 4As shown, the electronic device determines whether threshold≥100. Since the value range of the scheduling threshold is [0, 100), the preset target threshold is the upper limit value of the scheduling threshold. The essence of this step is to determine whether the target scheduling threshold reaches the upper limit value.

[0137] S305: If the target scheduling threshold is greater than or equal to a preset target threshold, adjust the scheduling threshold to zero.

[0138] If it is determined that the target scheduling threshold is greater than or equal to the preset target threshold, the scheduling threshold is adjusted to zero. When the upper limit is reached, Figure 4 As shown in the figure, when threshold ≥ 100, resetting the threshold to zero can make the overall coverage more reasonable and ensure that all test cases can be scheduled.

[0139] S306: If the target scheduling threshold is less than the preset target threshold, adjust the scheduling threshold to the target scheduling threshold.

[0140] In this step, if the electronic device determines that the target scheduling threshold is less than the preset target threshold and has not reached the upper limit value, the scheduling threshold is adjusted to the target scheduling threshold.

[0141] S307, repeat the step of obtaining each test case and the weight value corresponding to each test case until all test case groups in each execution round are executed.

[0142] In this step, after adjusting the scheduling threshold, such as Figure 4 As shown, the electronic device will repeatedly execute the steps of obtaining each test case and the weight value corresponding to each test case, that is, perform the next round of scheduling until all test case groups in each execution round are executed.

[0143] The disclosed embodiment obtains each test case and the weight value corresponding to each test case for each execution round, and based on the weight value corresponding to each test case and the scheduling threshold, screens out the test case group of the current execution round. Further, if the test case group of the current execution round has been completed, the product value of the preset target threshold and the second balance factor is calculated, and the scheduling threshold is added to the product value to obtain the target scheduling threshold, and it is determined whether the target scheduling threshold is greater than or equal to the preset target threshold. If the target scheduling threshold is greater than or equal to the preset target threshold, the scheduling threshold is adjusted to zero, and if the target scheduling threshold is less than the preset target threshold, the scheduling threshold is adjusted to the target scheduling threshold. Then, the steps of obtaining each test case and the weight value corresponding to each test case are repeated until the test case group of each execution round has been completed.

[0144] Compared with the prior art, the embodiments of the present disclosure can schedule test cases with high failure frequency at a relatively high frequency by adjusting the scheduling threshold, so as to discover defects of the target under test as early as possible, and schedule test cases with low failure frequency at a relatively low frequency, so as to reduce the overall time expenditure and the effort of repeated verification, while ensuring that all test cases can be scheduled.

[0145] In some embodiments, a simulation test is also performed using the test case scheduling method provided by the present disclosure, wherein the simulation test has a total of 20 test cases and is executed 100 rounds in total. It can be easily calculated that the conventional method will execute a total of 20×100=2000 times. After using the test case scheduling method provided by the present disclosure, only 1144 times were executed, and the efficiency was improved by 42.8%. At the same time, it can be seen that the lower the success probability (pass_rate) of the test case (i.e., the test case that is prone to failure), the higher the number of times the test case is selected for scheduling execution. The test case with a high failure frequency can be scheduled at a relatively high frequency, and the defects of the target under test can be discovered as early as possible. The test case with a low failure frequency can be scheduled at a relatively low frequency, which can reduce the overall time cost.

[0146] In some optional implementations, the test case scheduling method provided by the present disclosure may further include the following steps:

[0147] S401. For each execution round, obtain each test case and a weight value corresponding to each test case;

[0148] S402, based on the weight values ​​corresponding to each test case and the scheduling threshold, filter out the test case group of the current execution round, wherein the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirement of the current execution round;

[0149] S403, obtaining the execution result of the test case group of the current execution round;

[0150] S404, based on the execution results of each target test case in the test case group of the current execution round, updating the weight value corresponding to each target test case in the test case group;

[0151] S405. In response to the completion of execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated until each test case group of the execution round is completed.

[0152] In this step, the electronic device determines whether all the test case groups in the current execution round have been executed, that is, whether the execution results of all the test case groups have been obtained. If all the test case groups in the current execution round have been executed, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated, that is, the next round of scheduling is performed until all the test case groups in each execution round have been executed.

[0153] The disclosed embodiment improves the scheduling strategy of test cases from two perspectives: adjusting the weight value of the test cases and adjusting the scheduling threshold. Through this method, different weight values ​​can be assigned to test cases, so that defects of the tested targets can be discovered as early as possible, the overall time expenditure can be reduced, the effort of repeated verification can be reduced, and at the same time, all test cases can be scheduled.

[0154] In some optional implementations, the test case scheduling method provided by the present disclosure may further include the following steps:

[0155] S501. For each execution round, obtain each test case and a weight value corresponding to each test case;

[0156] S502: Adjust the weight value corresponding to each test case according to the historical pass rate of each test case.

[0157] In this step, the electronic device obtains the historical pass rate of each test case, and adjusts the weight value corresponding to each test case according to the historical pass rate of each test case. Specifically, for any test case among the test cases, if the historical pass rate of the test case is greater than or equal to the preset pass rate threshold, the weight value corresponding to the test case is lowered; if the historical pass rate of the test case is less than the preset pass rate threshold, the weight value corresponding to the test case is increased.

[0158] S503, based on the weight values ​​corresponding to the test cases and the scheduling threshold, filter out the test case group of the current execution round, wherein the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirement of the current execution round;

[0159] S504, obtaining the execution result of the test case group of the current execution round;

[0160] S505, based on the execution results of each target test case in the test case group of the current execution round, updating the weight value corresponding to each target test case in the test case group;

[0161] S506. In response to the completion of execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted, and the steps of obtaining each test case and the weight value corresponding to each test case are repeated until execution of each test case group of the execution round is completed.

[0162] The disclosed embodiments improve the scheduling strategy of test cases by adjusting the weight values ​​corresponding to each test case according to the historical pass rate of each test case, adjusting the weight values ​​of the test cases based on the execution results of each target test case, and adjusting the scheduling threshold. Through this method, different weight values ​​can be assigned to test cases, defects of the tested targets can be discovered as early as possible, the overall time expenditure can be reduced, the intensity of repeated verification can be reduced, and at the same time, all test cases can be scheduled.

[0163] Figure 5 The structure diagram of the test case scheduling device provided in the embodiment of the present disclosure. The test case scheduling device may be the electronic device as described in the above embodiment, or the test case scheduling device may be a component or assembly in the electronic device. The test case scheduling device provided in the embodiment of the present disclosure may execute the processing flow provided in the test case scheduling method embodiment, such as Figure 5 As shown, the test case scheduling device 50 includes: a first acquisition module 51, a screening module 52, a second acquisition module 53, an adjustment module 54, and a completion module 55; wherein the first acquisition module 51 is used to obtain each test case and the weight value corresponding to each test case for each execution round; the screening module 52 is used to screen out the test case group of the current execution round based on the weight value corresponding to each test case and the scheduling threshold, and the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirement of the current execution round; the second acquisition module 53 is used to obtain the execution result of the test case group of the current execution round; The adjustment module 54 is used to adjust the scheduling strategy according to the execution results and completion status of the test case group in the following manner: Method 1, based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or, Method 2, in response to the completion of the execution of each target test case in the test case group of the current execution round, the scheduling threshold is adjusted; the completion module 55 is used to repeatedly execute the steps of obtaining each test case and the weight value corresponding to each test case until the test case group of each execution round is executed.

[0164] Figure 5 The test case scheduling device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0165] Figure 6 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 6 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0166] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603 to implement the test case scheduling method of the embodiment described in the present disclosure. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0167] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0168] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the test case scheduling method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0169] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0170] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0171] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0172] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0173] For each execution round, obtain each test case and the weight value corresponding to each test case;

[0174] Based on the weight values ​​corresponding to each test case and the scheduling threshold, the test case group of the current execution round is screened out, and the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirements of the current execution round;

[0175] Get the execution results of the test case group in the current execution round;

[0176] According to the execution results and execution completion status of the test case group, the scheduling strategy is adjusted in the following manner: Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or

[0177] Mode 2: In response to the completion of execution of each target test case in the test case group of the current execution round, adjusting the scheduling threshold;

[0178] Repeat the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups in each execution round are executed.

[0179] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0180] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0181] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0182] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0183] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

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

[0185] An embodiment of the present application also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are executed by one or more processors. For example, the one or more processors can execute the test case scheduling method in any of the above method embodiments, for example, execute the test case scheduling method in any of the above method embodiments, for example, execute the various steps described above.

[0186] The above-described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute various embodiments or certain parts of the embodiments.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A test case scheduling method, characterized in that: The method comprises: For each execution round, obtain each test case and the weight value corresponding to each test case; Based on the weight values ​​corresponding to each test case and the scheduling threshold, the test case group of the current execution round is screened out, and the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirements of the current execution round; Get the execution results of the test case group in the current execution round; According to the execution results and execution completion status of the test case group, the scheduling strategy is adjusted in the following manner: Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or Mode 2: In response to the completion of execution of each target test case in the test case group of the current execution round, adjusting the scheduling threshold; Repeat the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups in each execution round are executed.

2. The method according to claim 1, characterized in that: The method of screening out the test case group for the current execution round based on the weight value corresponding to each test case and the scheduling threshold includes: For any test case in each test case, determine whether the weight value corresponding to the test case is greater than or equal to the scheduling threshold; If the weight value corresponding to the test case is greater than or equal to the scheduling threshold, the test case is filtered into the test case group.

3. The method according to claim 2, characterized in that The method further comprises: If the weight value corresponding to the test case is less than the scheduling threshold, it is determined that the test case is not scheduled for the current execution round.

4. The method according to any one of claims 1 to 3, characterized in that After obtaining each test case and the weight value corresponding to each test case for each execution round, the method further includes: According to the historical pass rate of each test case, the weight value corresponding to each test case is adjusted; The step of adjusting the weight value corresponding to each test case according to the historical pass rate of each test case includes: For any test case among the test cases, if the historical pass rate of the test case is greater than or equal to the preset pass rate threshold, the weight value corresponding to the test case is lowered; If the historical pass rate of the test case is less than the preset pass rate threshold, the weight value corresponding to the test case is increased.

5. The method according to claim 1, characterized in that: The obtaining of the execution result of the test case group of the current execution round includes: Call the automated testing framework to execute the test case group of the current execution round; Obtain the execution result of each target test case in the test case group of the current execution round fed back by the automated testing framework.

6. The method according to claim 1, characterized in that The updating of the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round includes: If the execution result of the target test case is successful, the weight value is lowered based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation method is: calculate the product value of the weight value corresponding to the target test case and the first balancing factor, and subtract the product value from the weight value corresponding to the target test case to obtain the target weight value corresponding to the target test case; If the execution result of the target test case is failure, the weight value is increased based on the weight value corresponding to the target test case combined with the first balancing factor, and the calculation formula is: calculate the difference between the preset weight value threshold and the weight value corresponding to the target test case, calculate the product value of the difference and the first balancing factor, and add the weight value corresponding to the target test case to the product value to obtain the target weight value corresponding to the target test case; The weight value corresponding to the target test case is updated to the target weight value.

7. The method according to claim 6, characterized in that The step of updating the weight value corresponding to the target test case to the target weight value includes: Determine whether the target weight value corresponding to the target test case is less than or equal to zero, or whether the target weight value is greater than or equal to the preset weight value threshold; If the target weight value corresponding to the target test case is less than or equal to zero, updating the weight value corresponding to the target test case to an initial value; If the target weight value corresponding to the target test case is greater than or equal to the preset weight value threshold, then the weight value corresponding to the target test case is updated to the preset weight value threshold; If the target weight value corresponding to the target test case is greater than zero and less than the preset weight value threshold, the weight value corresponding to the target test case is updated to the target weight value.

8. The method according to claim 6, characterized in that The updating of the weight value corresponding to each target test case in the test case group based on the execution result of each target test case in the test case group of the current execution round includes: If the execution result of the target test case is success, the calculated weight value is rounded down to obtain the target weight value corresponding to the target test case; If the execution result of the target test case is failure, the calculated weight value is rounded up to obtain the target weight value corresponding to the target test case.

9. The method according to any one of claims 1 to 3, characterized in that: The adjusting the scheduling threshold includes: The scheduling threshold is adjusted in combination with the second balancing factor; The adjusting the scheduling threshold in combination with the second balancing factor includes: Calculate the product value of the preset target threshold and the second balancing factor, and add the scheduling threshold to the product value to obtain the target scheduling threshold; Determine whether the target scheduling threshold is greater than or equal to a preset target threshold; If the target scheduling threshold is greater than or equal to the preset target threshold, adjusting the scheduling threshold to zero; If the target scheduling threshold is less than the preset target threshold, the scheduling threshold is adjusted to the target scheduling threshold.

10. A test case scheduling device, characterized in that: include: A first acquisition module is used to acquire each test case and a weight value corresponding to each test case for each execution round; A screening module is used to screen out the test case group of the current execution round based on the weight value corresponding to each test case and the scheduling threshold, wherein the scheduling threshold is a threshold for judging whether each test case meets the scheduling requirement of the current execution round; The second acquisition module is used to obtain the execution results of the test case group of the current execution round; The adjustment module is used to adjust the scheduling strategy according to the execution results and execution completion status of the test case group in the following manner: Method 1: based on the execution results of each target test case in the test case group of the current execution round, the weight value corresponding to each target test case in the test case group is updated; and / or Mode 2: In response to the completion of execution of each target test case in the test case group of the current execution round, adjusting the scheduling threshold; The completion module is used to repeatedly execute the steps of obtaining each test case and the weight value corresponding to each test case until all test case groups of each execution round are executed.

Citation Information

Cited By

  • Test case scheduling method and device for improving effectiveness of automatic test and storage equipment

    CN120631793A