Test method and device, equipment, storage medium and program product
By updating the priority value of the test class and determining the execution order, the existing automated test case sorting method is solved, and the test class with high test efficiency is implemented in automated tests, which improves the testing efficiency and quality.
Patent Information
- Application Number
- CN202510264746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-03
AI Technical Summary
Under the influence of resource limitations and time limitations, existing automated test case sorting methods cannot execute test cases in a targeted manner, resulting in difficult time discovering software failures, and require manual and frequent adjustment of use cases or execution order.
By obtaining the test information of the test case collection, including the test indicators and priority values of each test class, the priority values are positively correlated with the test quality of the test class, the priority values of the test class are updated, and the test class and execution order are determined based on the updated priority values, and the test class with high test efficiency is preferred.
In the case of resource limitations, time constraints and use case blockage, software failures can be detected in a timely manner, improve the efficiency and quality of automated testing, and reduce manual intervention.
Smart Images

Figure CN120086145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated testing technologies, and particularly to a testing method, device, equipment, storage medium, and program product. Background Art
[0002] Automated testing is an essential part of the modern software development process. Through automated testing, the efficiency and quality of the software testing process can be improved. With the increasing complexity and requirements of automated testing, designing a reasonable and efficient execution order for automated test cases has become one of the key issues in the current field of automated testing.
[0003] In the prior art, the methods for sorting automated test cases are as follows: one is to use the default sorting method of the automated framework, such as sorting and executing in sequence according to the ASCII code of the case name; the other is to use a test suite and execute the test cases according to the pre-configured execution order in the test suite. The above two sorting methods are affected by factors such as resource limitations and test time limitations, and cannot execute test cases specifically to discover software faults, requiring frequent manual adjustment of the executed cases or the execution order of the executed cases. Summary of the Invention
[0004] Embodiments of this application provide a testing method, device, equipment, storage medium, and program product, so as to achieve the effect of timely discovering software faults by using this test case sorting method.
[0005] In a first aspect, an embodiment of this application provides a testing method, which includes:
[0006] After completing the test of the first software using a test case set, obtain the test information of the test case set, where the test information includes: the test metrics of each test class, and the priority value used, and the priority value is positively correlated with the test quality of the test class;
[0007] Update the priority value of the test class according to the test information;
[0008] In response to a test instruction for the second software, determine the test classes used in this test and the corresponding execution order according to the updated priority value of the test class;
[0009] Test the second software based on the test classes used in this test and the corresponding execution order.
[0010] In one of the embodiments, the test metrics include the number of successful test cases S, the number of failed test cases F, and the number of abnormal test cases E under the test class;
[0011] Updating the priority value of the test class according to the test information includes:
[0012] Set weight values k, h, i, and j for the priority value P0, the number of successful test cases S, the number of failed test cases F, and the number of exceptional test cases E of the last test of the test class, respectively;
[0013] Obtain the test metric value of the test class by dividing the sum of the number of failed test cases F*i and the number of exceptional test cases E*j by the number of successful test cases S*h;
[0014] Calculate the priority value Pn of each test class based on the current test by adding the test metric value of the test class to the priority value P0*k of the last test of the test class;
[0015] Update the priority value of the test class based on the priority value of the current test.
[0016] In one embodiment, after testing the first software using the test case set, obtain the test information of the test case set, specifically including:
[0017] If the test metric of the test class is empty, determine that the test class is blocked;
[0018] Determine that the priority value of the test class based on the current test is a special value.
[0019] In one embodiment, according to the updated priority value of the test class, determine the test classes used in the current test and the corresponding execution order, including:
[0020] Store all test classes and their corresponding test methods in a dictionary according to the default sorting to obtain the initial dictionary of test cases to be executed;
[0021] Optimize the initial dictionary of test cases to be executed based on the updated priority value of the test class to obtain the dictionary of test cases to be executed; the dictionary of test cases to be executed includes: the test classes used in the current test and the corresponding execution order.
[0022] In one embodiment, optimize the initial dictionary of test cases to be executed based on the updated priority value of the test class to obtain the dictionary of test cases to be executed, including:
[0023] Store the test classes with updated priority values greater than or equal to the preset threshold in the dictionary of test cases to be executed;
[0024] Among them, the dictionary of test cases to be executed is sorted according to the updated priority value of the test class.
[0025] In one embodiment, according to the updated priority value of the test class, determine the test classes used in the current test and the corresponding execution order, specifically including:
[0026] Set the rotation parameter R; where R≥1;
[0027] Classify the test classes with updated priority values less than the preset threshold and the test classes with updated priority values being special values into group R of test classes and sort them;
[0028] Select i groups of test classes from group R of test classes based on the rotation parameter and store them in the dictionary of test cases to be executed; where i ≤ R;
[0029] After the second software test is completed, update the value of the rotation parameter R; where the value of the rotation parameter R is updated based on the number of unexecuted test classes in (R - i) groups.
[0030] Second, an embodiment of the present application provides a test device, including:
[0031] An acquisition module, configured to acquire test information of a test case set after testing the first software using the test case set, where the test information includes: test metrics of each test class, and the priority value used, and the priority value is positively correlated with the test quality of the test class;
[0032] A processing module, configured to update the priority value of the test class according to the test information;
[0033] A determination module, in response to a test instruction for the second software, determines the test classes used in this test and the corresponding execution order according to the updated priority values of the test classes;
[0034] A test module, configured to test the second software based on the test classes used in this test and the corresponding execution order.
[0035] Third, an embodiment of the present application provides a test device, including: a memory and a processor;
[0036] The memory stores computer execution instructions;
[0037] The processor executes the computer execution instructions stored in the memory, so that the processor executes the method as described in any one of the above.
[0038] Fourth, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the above.
[0039] Fifth, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method as described in any one of the above.
[0040] The test method, device, equipment, storage medium and program product provided by the embodiments of the present application. The method includes: after completing the test of the first software using a test case set, obtaining the test information of the test case set, where the test information includes: the test metrics of each test class, and the priority value used, and the priority value is positively correlated with the test quality of the test class; updating the priority value of the test class according to the test information; in response to a test instruction for the second software, determining the test classes used in this test and the corresponding execution order according to the updated priority value of the test class; and testing the second software based on the test classes used in this test and the corresponding execution order. By obtaining the priority value of the test class to determine the test classes and execution order used in this test, test classes with high test efficiency can be preferentially executed in automated testing. In case of resource constraints, time constraints, and case blocking, if the automated testing is not completed in time, using the test classes of the present application for automated testing is beneficial to detecting faults in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0042] Figure 1 It is a flowchart of the test method provided by the embodiments of the present application;
[0043] Figure 2 It is a flowchart of the test method provided by another embodiment of the present application;
[0044] Figure 3 It is a schematic structural diagram of the test device provided by an embodiment of the present application;
[0045] Figure 4 It is a schematic structural diagram of the test equipment provided by the present application.
[0046] Reference Signs:
[0047] 30, test device; 301, acquisition module; 302, processing module; 303, determination module; 304, test module; 40, test equipment; 401, processor; 402, memory; 403, communication component.
[0048] Through the above accompanying drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] In the prior art, for the automated test case sorting method, one is through the default sorting method of the automation framework, such as sorting and executing in sequence according to the ASCII code of the case name, and the other is through the test suite, executing the test cases according to the execution order pre-configured in the test suite; the above two sorting methods will be affected by factors such as resource limitations and test time limitations, and cannot execute test cases targeted and discover software faults, and it is necessary to manually adjust the execution cases or the execution order of the execution cases frequently.
[0051] The test method provided by the present application, after completing the test of the first software using the test case set, obtains the test information of the test case set, and the test information includes: the test metrics of each test class, and the priority value used, and the priority value is positively correlated with the test quality of the test class; according to the test information, update the priority value of the test class; in response to the test instruction for the second software, determine the test classes used in this test and the corresponding execution order according to the updated priority value of the test class; based on the test classes used in this test and the corresponding execution order, test the second software. By obtaining the priority value of the test class to determine the test classes and execution order used in this test, it is possible to preferentially execute the test classes with high test efficiency in automated testing. In the case of resource limitations, time limitations, and case blocking, if the automated test is not completed in time, using the test classes of the present application for automated testing is beneficial to discovering faults in time.
[0052] The following will specifically describe the technical solution of the present application and how the technical solution of the present application solves the above technical problems with specific embodiments. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0053] The embodiments of the present application provide a test method, and this method includes the following steps, as Figure 1 shown, Figure 1 is the flow block diagram of the test method provided by the embodiments of the present application:
[0054] Step S102: After testing the first software using a test case set, obtain the test information of the test case set. The test information includes: the test metrics of each test class, and the priority value used. The priority value is positively correlated with the test quality of the test class.
[0055] Step S104: Update the priority value of the test class according to the test information.
[0056] Specifically, the test case set includes multiple test classes, and each test class includes multiple test cases. The test cases are classified according to the test function or others, such as: the change method for the software. After each automated test is completed, by obtaining the test information of the test case set, the priority value of the corresponding test class is updated according to the test information. The priority value is positively correlated with the test quality of the test class. The higher the priority value of a test class, the greater the probability of detecting software faults.
[0057] Step S106: In response to a test instruction for the second software, determine the test classes to be used in this test and the corresponding execution order according to the updated priority values of the test classes.
[0058] Specifically, when testing the second software, all test classes are sorted according to the updated priority values, and the test classes to be used in this test are determined according to the sorting order.
[0059] Step S108: Test the second software based on the test classes used in this test and the corresponding execution order.
[0060] This application determines the test classes to be used in this test and the corresponding execution order based on the updated priority values, and preferentially uses test cases with higher test quality during automated testing. In case of resource constraints, time constraints, and use case blocking, faults in the software to be tested can also be detected in a timely manner.
[0061] In one embodiment, the test metrics include the number of successful test cases S, the number of failed test cases F, and the number of abnormal test cases E under the test class; Step S104 includes the following steps, as Figure 2 shown, Figure 2 is the flowchart of the test method provided by another embodiment of this application:
[0062] Step S201: Set weight values k, h, i, and j for the priority value P0, the number of successful test cases S, the number of failed test cases F, and the number of abnormal test cases E of the last test of the test class, respectively.
[0063] Specifically, setting the weight values k, h, i, and j for the priority value P0 of the last test of the test class, the number of successful test cases S, the number of failed test cases F, and the number of exceptional test cases E respectively is an important part of the priority ranking of the test class, and can be adjusted according to test requirements and changes in the test environment. In an automated test environment, the weight values of the priority value P0 of the last test of the test class, the number of successful test cases S, the number of failed test cases F, and the number of exceptional test cases E can be determined based on factors such as the importance of the test case, execution time, code coverage, and defect detection ability. For example, the weight value (h) of successful cases can be set to a lower value because they usually indicate that the test has passed, while the weight values (i) of failed cases and (j) of exceptional cases can be set to higher values because they indicate potential problems and risks. For example, if the main goal of the automated test is to detect critical defects as early as possible, then the weights of failed cases and exceptional cases may be set higher. The setting of the weight values should also take into account the limitations of test resources such as time, manpower, and equipment to ensure the effectiveness and efficiency of the test activities. The weight values k, h, i, and j should be based on the evaluation of the impact on the test results, as well as the test objectives and strategies. Therefore, in practical applications, the weight values need to be determined according to the actual situation, and this application does not limit them here.
[0064] Step S202: Obtain the test metric value of the test class by dividing the sum of the number of failed test cases F * i and the number of exceptional test cases E * j by the number of successful test cases S * h.
[0065] Step S203: Calculate the priority value Pn of each test class based on the current test by adding the test metric value of the test class and the priority value P0 * k of the last test of the test class.
[0066] Specifically, the priority value of each test class based on the current test can be calculated through steps S202 and S203, and the specific calculation formula is as follows:
[0067]
[0068] If the test class does not have the priority value of the last test, set the priority value P0 of the last test to 0. The updated priority value Pn of the test class can be stored in a database or other storage files.
[0069] Step S204: Update the priority value of the test class based on the priority value of the current test.
[0070] In one of the embodiments, step S102 specifically includes the following steps:
[0071] If the test metric of the test class is empty, it is determined that the test class is blocked.
[0072] Determine that the priority value of the test class based on this test is a special value.
[0073] Specifically, if the test index content of a certain test class is empty, it indicates that the test class is blocked. Then, assign a special value to the priority value Pn of this test class. For example, assign -1 to the priority value of the test class with empty test index content, indicating that this test class is a blocked use case, and this blocked use case will not be executed for automated testing. After manually deleting the corresponding mark of this blocked use case in the database or storage file, this test class will be retested in the automated testing.
[0074] In one embodiment, step S106 includes the following steps:
[0075] Store all test classes and corresponding test methods in a dictionary according to the default sorting to obtain an initial dictionary of test cases to be executed.
[0076] Optimize the initial dictionary of test cases to be executed based on the updated priority value of the test class to obtain a dictionary of test cases to be executed; the dictionary of test cases to be executed includes: the test classes used in this test, and the corresponding execution order.
[0077] Specifically, optimizing the initial dictionary of test cases to be executed can exclude blocked use cases, that is, test classes with low priority values, improve the test efficiency of automated testing, avoid the influence of blocked use cases on the entire automated testing, and is conducive to timely discovery of software faults.
[0078] In one embodiment, based on the updated priority value of the test class, optimizing the initial dictionary of test cases to be executed to obtain a dictionary of test cases to be executed includes the following steps:
[0079] Store the test classes with updated priority values greater than or equal to the preset threshold in the dictionary of test cases to be executed.
[0080] Among them, the dictionary of test cases to be executed is sorted according to the updated priority value of the test class.
[0081] Specifically, the preset threshold can be adjusted according to test requirements and the test environment, and this application does not limit it. By storing the test classes with updated priority values greater than or equal to the preset threshold in the dictionary of test cases to be executed, when performing automated testing subsequently, the test cases in the dictionary of test cases to be executed test the software to be tested. In the case of limited resources, using the test classes in the dictionary of test cases to be executed for testing can greatly improve the efficiency, reduce the test time, and more quickly discover the fault problems of the software to be tested; secondly, by setting the preset threshold, the usability and maintainability of this test method are improved.
[0082] In one embodiment, according to the updated priority value of the test class, determine the test class used in this test and the corresponding execution order, which specifically includes the following steps:
[0083] Set the rotation parameter R; where R ≥ 1.
[0084] Classify the test classes with updated priority values less than the preset threshold and the test classes with updated priority values as special values into R groups of test classes and sort them.
[0085] Based on the rotation parameter, select i groups of test classes from the R groups of test classes and store them in the dictionary of test cases to be executed; where i ≤ R.
[0086] After the second software test is completed, update the value of the rotation parameter R; where the value of the rotation parameter R is updated based on the number of unexecuted test classes in the (R - i) groups.
[0087] Specifically, the automated test can include multiple test cycles. In the first test cycle, execute the test classes in the dictionary of test cases to be executed. The dictionary of test cases to be executed includes i groups of test classes from the R groups of test classes; and record the unexecuted test classes in the R groups. After the first test cycle is completed, update the rotation parameter, and calculate the test cases to be executed in the next test cycle according to the number of unexecuted test classes and the rotation parameter R until all test classes are tested. Ensure that all test classes can be executed as much as possible under limited resources. The setting of the rotation parameter can ensure that the remaining test classes (test classes with updated priority values less than the preset threshold and priority values as special values) can be tested, preventing the problem of the software not being comprehensively tested and missing faults.
[0088] As Figure 3 shown, Figure 3 is a schematic structural diagram of a test device provided by an embodiment of the present application. The test device 30 includes: an acquisition module 301, configured to acquire test information of the test case set after the first software is tested using the test case set. The test information includes: test metrics of each test class and the used priority value, and the priority value is positively correlated with the test quality of the test class; a processing module 302, configured to update the priority value of the test class according to the test information; a determination module 303, in response to a test instruction for the second software, determine the test class used in this test and the corresponding execution order according to the updated priority value of the test class; a test module 304, configured to test the second software based on the test class used in this test and the corresponding execution order.
[0089] The test device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0090] By obtaining the priority values of test classes to determine the test classes and execution order used in this test, this application can preferentially execute the test classes with high test efficiency in automated testing. In the case of resource constraints, time constraints, and case blocking, if the automated testing is not completed in time, using the test classes of this application for automated testing is conducive to timely fault detection.
[0091] Figure 4 It is a schematic structural diagram of the test device provided by this application. As Figure 4 shown, the test device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. Among them, the processor 401, the memory 402, and the communication component 403 are connected through a bus.
[0092] In the specific implementation process, at least one processor 401 executes the computer-executable instructions stored in the memory 402, so that at least one processor 401 executes the above method.
[0093] For the specific implementation process of the processor 401, reference can be made to the above method embodiment, and its implementation principle and technical effects are similar, so they will not be elaborated here in this embodiment.
[0094] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0095] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0096] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0097] This application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0098] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above method is implemented.
[0099] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disc. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0100] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0101] The division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in an electrical, mechanical or other form.
[0102] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, in each embodiment of the present invention, each functional unit may be integrated in a processing unit, may exist physically separately for each unit, or two or more units may be integrated in one unit.
[0104] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0105] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0106] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other implementation schemes of the present invention. The present invention aims to cover any variations, uses, or adaptive changes of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A testing method, characterized in that: The method comprises: After the first software is tested using the test case set, test information of the test case set is obtained, the test information including: test indicators of each test class, and a priority value used, the priority value being positively correlated with the test quality of the test class; According to the test information, updating the priority value of the test class; In response to the test instruction for the second software, determining the test class used for the current test and the corresponding execution order according to the updated priority value of the test class; Based on the test class used in this test and the corresponding execution order, the second software is tested.
2. The method according to claim 1, characterized in that The test indicators include the number S of successful test cases, the number F of failed test cases and the number E of abnormal test cases under the test class; The updating of the priority value of the test class according to the test information includes: Set weight values k, h, i and j for the priority value P0 of the last test of the test class, the number of successful test cases S, the number of failed test cases F and the number of abnormal test cases E respectively; Obtain the test index value of the test class according to the sum of the number of failed test cases F*i and the number of abnormal test cases E*j divided by the number of successful test cases S*h; The priority value Pn of each test class based on this test is calculated according to the sum of the test index value of the test class and the priority value P0*k of the last test of the test class; The priority value of the test class is updated based on the priority value of the current test.
3. The method according to claim 1, characterized in that After the first software is tested using the test case set, obtaining test information of the test case set specifically includes: If the test indicator of the test class is empty, it is determined that the test class is blocked; Determines that the test class is a special value based on the priority value of this test.
4. The method according to claim 3, characterized in that Determining the test class used for this test and the corresponding execution order according to the updated priority value of the test class includes: Store all test classes and corresponding test methods into a dictionary according to the default sorting to obtain the initial dictionary of test cases to be executed; Based on the updated priority value of the test class, the initial dictionary of use cases to be executed is optimized to obtain a dictionary of use cases to be executed; the dictionary of use cases to be executed includes: the test class used in this test, and the corresponding execution order.
5. The method according to claim 4, characterized in that The step of optimizing the initial dictionary of use cases to be executed based on the updated priority value of the test class to obtain a dictionary of use cases to be executed includes: The test classes whose updated priority values are greater than or equal to a preset threshold are stored in the dictionary of test cases to be executed; The dictionary of use cases to be executed is sorted according to the updated priority values of the test classes.
6. The method according to claim 5, characterized in that Determining the test class used for this test and the corresponding execution order according to the updated priority value of the test class specifically includes: Set the rotation parameter R; where R ≥ 1; The test classes whose updated priority values are smaller than the preset threshold and the test classes whose updated priority values are special values are divided into R groups of test classes and sorted; Based on the rotation parameter, i groups of the test classes are selected from the R groups of test classes to store values in the dictionary of use cases to be executed; wherein i≤R; After the second software test is completed, the value of the rotation parameter R is updated; wherein the value of the rotation parameter R is updated based on the number of the test classes that have not been executed in the (Ri) group.
7. A testing device, characterized in that: include: An acquisition module is used to acquire test information of the test case set after the first software is tested using the test case set, wherein the test information includes: a test indicator of each test class, and a priority value used, wherein the priority value is positively correlated with the test quality of the test class; A processing module, used for updating the priority value of the test class according to the test information; A determination module, in response to a test instruction for the second software, determines the test class used in the current test and the corresponding execution order according to the updated priority value of the test class; The test module is used to test the second software based on the test class used in this test and the corresponding execution order.
8. A testing device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
Citation Information
Cited By
Software testing method, system and device
CN120295929A