Test case regression method and device, equipment and storage medium
By dividing SoC test cases into multiple regression lists according to priority and resource attributes, and sorting them by time and resource constraints, the problems of resource waste and low efficiency in SoC testing are solved, and a more efficient testing process is achieved.
Patent Information
- Application Number
- CN202510685233.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-16
AI Technical Summary
The existing SoC testing suffers from resource waste and low testing efficiency due to unbalanced resource allocation, especially due to limited license resources and the inability to flexibly adjust the urgency and importance of test cases.
Based on the priority and resource attributes of test cases, test cases are divided into multiple regression lists and sorted by time information in each list. Combined with the priority of the regression list and the preset resource constraints, the target regression list is determined to prioritize the execution of higher priority test cases.
By rationally allocating resources, testing efficiency is improved, resource waste and extended testing cycles are avoided, and the rapid execution requirements of urgent and important use cases are met.
Smart Images

Figure CN120653553A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of system testing, and in particular to a test case regression method, apparatus, device and storage medium. Background Art
[0002] Currently, SoC (System on Chip) testing primarily relies on traditional automated testing tools and manual testing processes. While these methods can guarantee test coverage and accuracy to a certain extent, they fail to rationally prioritize test cases based on actual resource usage and allocation, leading to significant resource waste and a significant impact on test efficiency. Summary of the Invention
[0003] The present invention provides a test case regression method, apparatus, device and storage medium to at least solve the problems of serious resource waste and low test efficiency in the test process in related technologies.
[0004] The present invention provides a test case regression method, comprising:
[0005] Based on the priorities and resource attributes of the test cases, the test cases included in the test case set are divided into multiple regression lists, where the multiple regression lists correspond to different priorities and resource attributes respectively;
[0006] In each regression list, sort the test cases based on their time information;
[0007] Based on the priority of the regression list and the preset resource constraints, the target regression list is determined and the test cases in the target regression list are executed.
[0008] The present invention also provides a test case regression device, comprising:
[0009] A test case partitioning module is used to partition the test cases contained in the test case set into multiple regression lists based on the priorities and resource attributes of the test cases, wherein the multiple regression lists correspond to different priorities and resource attributes respectively;
[0010] The test case sorting module is used to sort the test cases in each regression list based on their time information;
[0011] The test case execution module is used to determine the target regression list based on the priority of the regression list and the preset resource limit, and execute the test cases in the target regression list.
[0012] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned test case regression methods when executing the computer program.
[0013] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned test case regression methods are implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned test case regression methods when executed by a processor.
[0015] Through the present invention, based on the priority and resource attributes of the test cases, the test cases are divided into different regression lists, and the test cases are sorted in the regression lists, so that the test cases can be executed in the order of time information when the regression lists are executed; at the same time, based on the priority and preset resource constraints of the regression lists, the target regression list to be executed is determined, so that according to the use and allocation of resources, the test cases in the regression lists with higher priorities can be executed first, thereby improving the testing efficiency while making full use of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 1 is a flow chart of a test case regression method according to an embodiment of the present invention;
[0018] Figure 2 1 is a flow chart of another test case regression method according to an embodiment of the present invention;
[0019] Figure 3 This is a flow chart of a specific embodiment of the test case regression method according to an embodiment of the present invention;
[0020] Figure 4 is a structural block diagram of a test case regression device according to an embodiment of the present invention;
[0021] Figure 5 FIG. 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0025] Currently, SoC (System on Chip) testing primarily relies on traditional automated testing tools and manual testing processes. While these methods can ensure test coverage and accuracy to a certain extent, they suffer from inadequate resource allocation, leading to significant resource waste and significantly impacting test efficiency.
[0026] Specifically, in the related art, due to the limited license resources, the regression of test cases that use these license resources will be blocked during the regression of test cases, resulting in uneven resource allocation, which in turn leads to reduced test efficiency. In addition, each time a regression test is performed, the test cases are executed in the order of the time when the test tasks are submitted; but the test time of some test cases is longer, which causes other test cases with shorter test times to have to wait for the test cases with longer test times to be completed before they can queue up to submit test tasks, which in turn leads to an extension of the test cycle. Furthermore, for users, some test cases with higher priority need to be executed first and the test results need to be quickly known after the execution is completed. However, these test cases are usually distributed in various positions in the regression list, and are also executed and the test results are fed back in the order in which the tasks are submitted. This makes it impossible to flexibly adjust the priority of the test cases according to their urgency and importance, affecting test efficiency.
[0027] Based on this, the present invention provides a test case regression method, which divides the test cases contained in the test case set into multiple regression lists based on the priority and resource attributes of the test cases, wherein the multiple regression lists correspond to different priorities and resource attributes respectively; in each regression list, the test cases are sorted based on the time information of the test cases; based on the priority and preset resource limit of the regression list, the target regression list is determined, and the test cases in the target regression list are executed. Thus, based on the priority and resource attribute of the test cases, the test cases are divided into different regression lists, and the test cases are sorted in the regression list, so that the test cases can be executed in the order of time information when the regression list is executed; at the same time, based on the priority and preset resource limit of the regression list, the target regression list to be executed is determined, so that according to the use and allocation of resources, the test cases in the regression list with higher priority can be executed first, thereby improving the test efficiency while making full use of resources.
[0028] The test case regression method provided by the present invention can be applied to the test processes of various systems and devices. Specifically, it is not only applicable to the test regression of on-chip systems, but can also be applied to the test processes of other electronic systems and mobile network devices. For example, the test case regression method provided by the present invention can be introduced into fixed-line communication systems.
[0029] On the one hand, this embodiment provides a test case regression method that can be used in the testing process of various systems and devices. Figure 1 FIG. 1 is a flow chart of a test case regression method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0030] Step S101 : dividing the test cases included in the test case set into a plurality of regression lists based on the priorities and resource attributes of the test cases.
[0031] In an embodiment of the present invention, a plurality of regression lists correspond to different priorities and resource attributes, respectively, wherein the priority and resource attributes of the regression list are consistent with the priority and resource attributes of the test cases contained therein. The priority of a test case is used to characterize the execution priority of the test case during the test process, which can usually be determined according to the importance or urgency of the test case, or the user can set the corresponding test case according to the test requirements, and no specific restrictions are made here. The resource attributes of a test case are used to characterize the license resources used by the test case during the test execution process. By dividing according to priority and resource attributes, test cases with the same priority and resource attributes are divided into the same regression list, so that the test order is first determined for test cases with different priorities and resource attributes.
[0032] Step S102 : In each regression list, the test cases are sorted based on their time information.
[0033] In an embodiment of the present invention, in each regression list, the test cases are sorted based on the order of their time information, with test cases with earlier time information placed at the front of the regression list and test cases with later time information placed at the back of the regression list. The order of the test cases in the regression list is the order in which they are executed. The time information of a test case is used to characterize the time required to execute the test case. Thus, by sorting the test cases in the regression list based on the order of their time information, test cases with shorter test times are prioritized when executing test cases in a regression list. This prevents test cases with longer test times from blocking subsequent test cases waiting to be executed, thereby improving testing efficiency.
[0034] In an optional embodiment, historical regression time can be used to measure the time information of the test case, where the historical regression time is the time consumed by the test case for the last time the test is executed. If a test case has been executed multiple times, that is, there are multiple historical regression times, then the multiple historical regression times can be processed as data, such as taking the average value, to obtain a data-representative value as the historical regression time for the test case, which is used as the time information; if a test case has not been executed, that is, there is no historical regression time, then a preset time can be used as the time information of the test case.
[0035] Specifically, in each regression list, the historical regression time of each test case is obtained respectively; if the historical regression time of the test case is not obtained, the preset time is used as the time information of the test case; if the historical regression time of the test case is obtained, the historical regression time is used as the time information of the test case.
[0036] In an optional implementation, the preset time may be 0, so that test cases that have not been executed are placed at the front of the regression list.
[0037] Step S103 : determining a target regression list based on the priority of the regression list and the preset resource limit, and executing the test cases in the target regression list.
[0038] In this embodiment of the present invention, the priority of the regression list is consistent with the priority of the test cases contained therein. Preset resource limits are pre-set resource usage limits; they can be user-specific, i.e., different preset resource limits can be set for different users to prevent the test server's operating resources from being constantly preempted by a small number of users, thereby balancing test resources among different users.
[0039] In an embodiment of the present invention, based on the priority of the regression list, a regression list with a higher priority is used as a regression list to be executed; wherein, the regression list to be executed indicates that the regression list has entered a queue waiting for execution, and at this time, it is necessary to further evaluate whether the regression list can be executed. Specifically, the amount of resources required by the test cases in the regression list to be executed is compared with the preset resource limit. If the amount of resources required by the test cases in the regression list to be executed is less than the preset resource limit, the regression list to be executed is used as the target regression list, and the test cases therein are executed; if the amount of resources required by the test cases in the regression list to be executed is greater than the preset resource limit, the regression list to be executed is put back into the regression list set, and the regression list that is ranked after the regression list in the regression list set is selected as the regression list to be executed to evaluate whether it can be executed.
[0040] In an optional embodiment, after the test cases in the target regression list are executed, the target regression list is removed to avoid the situation where a regression list that has been tested is determined as the target regression list again in subsequent tests, resulting in repeated testing.
[0041] In an optional implementation, corresponding preset resource limits are set for different resources for each user, so as to allocate resources according to actual allocatable conditions of resources and user needs.
[0042] In an optional implementation, preset resource limits can be dynamically set for each user, allowing for real-time adjustments based on changes in the server's operating load, thereby preventing server overload while ensuring testing efficiency. Specifically, by compiling statistics on the server's resource usage and load over a historical period, preset resource limits can be set for different users in each time period based on the server's resource usage and load during each time period. Adjustments can also be made based on the preset resource limits based on the current server's resource usage, i.e., resource usage and load, combined with other users' requests for server resources.
[0043] In an optional embodiment, the target regression list can be determined by combining both the remaining resources and the preset resource limits. Specifically, the resource amounts required by the test cases in the regression list are compared with the remaining resources and the preset resource limits. If the resource amounts required by the test cases in the regression list are both less than the remaining resources and the preset resource limits, the test cases in the regression list are executed. This avoids a situation where the server is overloaded due to insufficient remaining resources on the server even if the preset resource limits are met, resulting in the execution of the test cases in the regression list.
[0044] The test case regression method provided by the embodiment of the present invention divides the test cases contained in the test case set into multiple regression lists based on the priority and resource attributes of the test cases, wherein the multiple regression lists correspond to different priorities and resource attributes respectively; in each regression list, the test cases are sorted based on the time information of the test cases; based on the priority and preset resource limit of the regression list, the target regression list is determined, and the test cases in the target regression list are executed. Thus, based on the priority and resource attribute of the test cases, the test cases are divided into different regression lists, and the test cases are sorted in the regression list, so that the test cases can be executed in the order of time information when the regression list is executed; at the same time, based on the priority and preset resource limit of the regression list, the target regression list to be executed is determined, so that according to the use and allocation of resources, the test cases in the regression list with higher priority can be executed first, thereby improving the test efficiency while making full use of resources.
[0045] This embodiment provides a test case regression method that can be used in the testing process of various systems and devices. Figure 2 FIG. 1 is a flow chart of another test case regression method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0046] Step S201 : dividing the test cases included in the test case set into a plurality of regression lists based on the priorities and resource attributes of the test cases.
[0047] Specifically, step S201 includes:
[0048] Step S2011: Determine the priority of the test case based on the mapping relationship between the importance of the test case and the priority.
[0049] In an embodiment of the present invention, the priority of a test case can be divided into multiple preset levels. Accordingly, a mapping relationship is established between the importance of the test case and the priority level obtained by the classification. Based on this mapping relationship, the priority of the test case is determined according to the importance of the test case. The importance of the test case is used to represent the importance of the test case in the testing process and the importance of the function tested by the test case.
[0050] For example, the priorities of test cases can be divided into three levels, namely the highest priority P0, general priority P1, and low priority P2. Among them, the highest priority P0 test cases are the most important and urgent test cases, which can include basic path test cases and important function test cases; most test cases, which do not have important function tests, belong to the general priority P1 test cases; low priority P2 test cases are test cases that meet coverage requirements or test cases that do not affect the main functions.
[0051] Step S2012: Test cases corresponding to the same priority are divided into the same regression list set.
[0052] In the embodiment of the present invention, test cases corresponding to the same priority are grouped into the same regression list set, so as to divide the test cases according to the priority.
[0053] Step S2013: In each regression list set, test cases corresponding to the same resource attribute are grouped into the same regression list.
[0054] In the embodiment of the present invention, a resource identifier is used to uniquely identify a resource attribute, so the resource identifier can be used to group test cases corresponding to the same resource attribute into the same regression list.
[0055] Specifically, in each regression list set, the resource identifier corresponding to the test case is obtained, and the resource identifier is used to identify the resource attribute of the preset resource; the test cases corresponding to the same resource identifier are divided into the same regression list; and the test cases without resource identifiers are divided into the same regression list.
[0056] In an optional implementation, resource identifiers are only set for resources with limited resources or that require resource monitoring to identify their corresponding resource attributes, while resources with abundant resources that generally do not exceed the resource limit are not identified, so that resources that require special attention are identified.
[0057] In an optional implementation, after the test cases are divided into regression lists according to priority and resource attributes, the regression lists are further sorted to determine the execution order of the regression lists. Among the regression list sets, the order between the regression list sets is already determined because the regression list sets have been divided according to priority. The order of the regression lists within the regression list sets is further determined. Specifically, the following steps may be included:
[0058] Step a1: In each regression list set, based on the resource demand and shortage degree corresponding to the resource attribute, determine the priority of the resource attributes involved in the regression list set.
[0059] In step a1, the resource demand and shortage degree corresponding to the resource attribute corresponds one to one with the priority of the resource attribute; specifically, in each regression list set, the resource attributes involved are sorted according to the corresponding resource demand and shortage degree to obtain the priority of the corresponding resource attribute in the regression list set; among them, the higher the resource demand and shortage degree, the higher the priority in the regression list set.
[0060] Step a2: sorting the regression list based on the number of resources involved in the regression list and the priority of the resource attributes.
[0061] In step a2, the number of resources involved in the regression list refers to the number of resources involved that have resource identifiers set.
[0062] In step a2, regression lists with the same number of resources in the regression list set are grouped into the same regression list sequence. The regression list sequence is sorted based on the number of resources involved. Within each regression list sequence, the regression lists are sorted based on the priority of the resource attributes. Thus, the regression lists are sorted first by the number of resources, and then, for regression lists with the same number of resources, they are sorted based on the priority of the resource attributes.
[0063] Step S202: In each regression list, sort the test cases based on their time information. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0064] Step S203: Based on the priority of the regression list and the preset resource limit, determine the target regression list and execute the test cases in the target regression list. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0065] The test case regression method provided by an embodiment of the present invention divides test cases into multiple regression lists according to their priorities and resource attributes. This divides test cases based on their priorities and the resources they use, allowing both priority and resource usage to be considered when executing test cases according to the regression lists, thereby ensuring testing efficiency. Furthermore, within a regression list set, after the regression lists are divided, they are further sorted based on the number of resources involved and the priority of the resource attributes, thereby further considering resource availability and improving testing efficiency.
[0066] As a specific implementation method, Figure 3 FIG. 1 is a flow chart of a specific embodiment of the test case regression method according to an embodiment of the present invention. Figure 3As shown, in this embodiment, the priority of regression testing for each test case is divided based on the importance and urgency of the test case. Specifically, the priority of the test case is divided into three levels, namely, the highest priority P0, the general priority P1, and the low priority P2. Among them, the test cases of the highest priority P0 are the test cases with the highest importance and urgency, which can include basic path test cases and important function test cases; most test cases, test cases without important function tests, belong to the test cases of the general priority P1; and the test cases of the low priority P2 are test cases that meet the coverage requirements or test cases that do not affect the main functions.
[0067] For license resources with limited resources or some license resources that require special attention, such as PCIE license and Nand-flash license, set resource identifiers to identify their corresponding resource attributes. For example, for resources with the resource attribute of PCIE license, set the resource identifier to type0, and for resources with the resource attribute of Nand-flash license, set the resource identifier to type1.
[0068] The test cases are divided according to their priorities to obtain three regression list sets, namely the P0 regression list set, the P1 regression list set, and the P2 regression list set. The P0 regression list set corresponds to the P0 priority, the P1 regression list set corresponds to the P1 priority, and the P2 regression list set corresponds to the P2 priority. The P0 regression list set, the P1 regression list set, and the P2 regression list set are further divided according to the resources used by the test cases to obtain regression lists that use different resources. For example, the P0 regression list set is divided into the P0_list0 regression list, the P0_list1 regression list, the P0_list2 regression list, and the P0_list3 regression list. The P0_list0 regression list contains test cases that use both type0 and type1 resources, the P0_list1 regression list contains test cases that only use type0 resources, the P0_list2 regression list contains test cases that only use type1 resources, and the P0_list3 regression list contains all test cases that do not use either type0 or type1 resources.
[0069] After the division is complete, the regression lists in the regression list set are sorted according to the number of resources used and the resource priority. For example, in the P0 regression list set, the regression list that uses the most resources is P0_list1, and P0_list1 has the highest priority. P0_list1 and P0_list2 both use the same regression list, so they are further sorted based on resource priority. For example, if type1 resources are more limited, then type1 resources have a higher priority, so P0_list2 has a higher priority than P0_list1. P0_list3 does not use resources with resource identifiers, so P0_list3 has the lowest priority. Therefore, in the P0 regression list set, the regression lists are sorted as follows: P0_list0, P0_list2, P0_list1, and P0_list3.
[0070] In each regression list, test cases are prioritized by time, using the historical regression time as the time information. Test cases with earlier time information are placed at the front of the list, while test cases with later time information are placed at the back of the list. For test cases without a historical regression time, the time information is fixed to 0 and placed at the front of the list.
[0071] Finally, according to the priority of the regression list and the preset resource limit, the regression list with the highest priority and within the preset resource limit is selected first, the target regression list currently being executed is determined, and the test cases in the regression list are executed in the order determined above.
[0072] The test case regression method provided by the embodiment of the present invention divides the test cases contained in the test case set into multiple regression lists based on the priority and resource attributes of the test cases, wherein the multiple regression lists correspond to different priorities and resource attributes respectively; in each regression list, the test cases are sorted based on the time information of the test cases; based on the priority and preset resource limit of the regression list, the target regression list is determined, and the test cases in the target regression list are executed. Thus, based on the priority and resource attribute of the test cases, the test cases are divided into different regression lists, and the test cases are sorted in the regression list, so that the test cases can be executed in the order of time information when the regression list is executed; at the same time, based on the priority and preset resource limit of the regression list, the target regression list to be executed is determined, so that according to the use and allocation of resources, the test cases in the regression list with higher priority can be executed first, thereby improving the test efficiency while making full use of resources.
[0073] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0074] On the other hand, the embodiment of the present invention also provides a test case regression device, such as Figure 4 As shown, the device includes:
[0075] A test case partitioning module 401 is configured to partition the test cases included in the test case set into a plurality of regression lists based on the priorities and resource attributes of the test cases, wherein the plurality of regression lists respectively correspond to different priorities and resource attributes;
[0076] A test case sorting module 402 is configured to sort the test cases in each regression list based on the time information of the test cases;
[0077] The test case execution module 403 is configured to determine a target regression list based on the priority of the regression list and preset resource constraints, and execute the test cases in the target regression list.
[0078] In an optional implementation, the test case division module 401 includes:
[0079] A test case priority determination unit, configured to determine the priority of a test case based on a mapping relationship between the importance of the test case and the priority;
[0080] A regression list set partitioning unit is used to partition test cases corresponding to the same priority into the same regression list set;
[0081] The regression list partitioning unit is used to partition the test cases corresponding to the same resource attribute into the same regression list in each regression list set.
[0082] In an optional implementation, the regression list partitioning unit includes:
[0083] The resource identifier acquisition subunit is used to obtain the resource identifier corresponding to the test case in each regression list set. The resource identifier is used to identify the resource attribute of the preset resource;
[0084] The first identification division subunit is used to divide the test cases corresponding to the same resource identification into the same regression list;
[0085] The second identification division subunit is used to divide the test cases without resource identification into the same regression list.
[0086] In an optional implementation, the test case division module 401 further includes:
[0087] A resource attribute priority determination unit, configured to determine, in each regression list set, the priority of the resource attributes involved in the regression list set based on the resource demand and shortage degree corresponding to the resource attributes;
[0088] The regression list sorting unit is used to sort the regression list based on the number of resources involved in the regression list and the priority of the resource attributes.
[0089] In an optional embodiment, the regression list sorting unit includes:
[0090] The regression list sequence division sub-unit is used to divide the regression lists involving the same number of resources in the regression list set into the same regression list sequence;
[0091] A regression list sequence sorting subunit, used for sorting the regression list sequence based on the number of resources involved;
[0092] The regression list sorting subunit is used to sort the regression lists based on the priority of resource attributes in each regression list sequence.
[0093] In an optional embodiment, the device further includes:
[0094] The historical regression time acquisition module is used to obtain the historical regression time of each test case in each regression list;
[0095] A first time information determination module is configured to use a preset time as the time information of the test case if the historical regression time of the test case is not obtained;
[0096] The second time information determination module is configured to use the historical regression time as the time information of the test case if the historical regression time of the test case is obtained.
[0097] In an optional embodiment, the device further includes:
[0098] The regression list removal module is used to remove the target regression list after the test cases in the target regression list are executed.
[0099] For the description of the features in the embodiment corresponding to the test case regression device, please refer to the relevant description of the embodiment corresponding to the test case regression method, which will not be repeated here.
[0100] On the other hand, an embodiment of the present invention further provides an electronic device, such as Figure 5As shown, one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0101] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0102] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0103] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via 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 combinations thereof.
[0104] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0105] The electronic device further includes a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0106] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned test case regression method embodiments when running.
[0107] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0108] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above test case regression method embodiments are implemented.
[0109] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned test case regression method embodiments are implemented.
[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0111] The above is a detailed introduction to a test case regression method provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core ideas of the present invention. It should be noted that, for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications may be made to the present invention, and such improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A test case regression method, characterized in that: include: Based on the priorities and resource attributes of the test cases, the test cases included in the test case set are divided into a plurality of regression lists, wherein the plurality of regression lists respectively correspond to different priorities and resource attributes; In each of the regression lists, the test cases are sorted based on time information of the test cases; Based on the priority of the regression list and the preset resource limit, a target regression list is determined, and the test cases in the target regression list are executed.
2. The test case regression method according to claim 1, characterized in that: The test cases included in the test case set are divided into multiple regression lists based on the priority and resource attributes of the test cases, including: Determine the priority of test cases based on the mapping relationship between the importance of test cases and their priority; Divide test cases corresponding to the same priority into the same regression list set; In each regression list set, test cases corresponding to the same resource attribute are divided into the same regression list.
3. The test case regression method according to claim 2, characterized in that: In each regression list set, test cases corresponding to the same resource attribute are divided into the same regression list, including: In each regression list set, obtaining a resource identifier corresponding to the test case, wherein the resource identifier is used to identify a resource attribute of a preset resource; Grouping the test cases corresponding to the same resource identifier into the same regression list; The test cases that do not have the resource identifier are grouped into the same regression list.
4. The test case regression method according to claim 2, characterized in that: The method of dividing the test cases included in the test case set into multiple regression lists based on the priorities and resource attributes of the test cases further includes: In each of the regression list sets, determining the priority of the resource attributes involved in the regression list set based on the resource demand and shortage degree corresponding to the resource attribute; The regression list is sorted based on the number of resources involved in the regression list and the priorities of the resource attributes.
5. The test case regression method according to claim 4, characterized in that: Sorting the regression list based on the number of resources involved in the regression list and the priority of the resource attributes includes: Grouping the regression lists involving the same number of resources in the regression list set into the same regression list sequence; sorting the regression list sequence based on the number of resources involved; In each of the regression list sequences, the regression lists are sorted based on the priorities of the resource attributes.
6. The test case regression method according to claim 1, characterized in that: The method further comprises: In each regression list, respectively obtain the historical regression time of each test case; If the historical regression time of the test case is not obtained, the preset time is used as the time information of the test case; If the historical regression time of the test case is obtained, the historical regression time is used as the time information of the test case.
7. The test case regression method according to claim 1, characterized in that: The method further comprises: After the test cases in the target regression list are executed, the target regression list is removed.
8. A test case regression device, characterized in that: include: A test case partitioning module is used to partition the test cases included in the test case set into a plurality of regression lists based on the priorities and resource attributes of the test cases, wherein the plurality of regression lists respectively correspond to different priorities and resource attributes; A test case sorting module, configured to sort the test cases in each regression list based on time information of the test cases; The test case execution module is used to determine a target regression list based on the priority of the regression list and preset resource constraints, and execute the test cases in the target regression list.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the test case regression method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the test case regression method according to any one of claims 1 to 7 are implemented.