[go: up one dir, main page]

CN120086145A - Test method, device, equipment, storage medium and program product - Google Patents

Test method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN120086145A
CN120086145A CN202510264746.1A CN202510264746A CN120086145A CN 120086145 A CN120086145 A CN 120086145A CN 202510264746 A CN202510264746 A CN 202510264746A CN 120086145 A CN120086145 A CN 120086145A
Authority
CN
China
Prior art keywords
test
class
priority value
test class
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510264746.1A
Other languages
Chinese (zh)
Inventor
唐梨
魏乾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Electronics Technology Group Jincang Beijing Technology Co ltd
Original Assignee
China Electronics Technology Group Jincang Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Electronics Technology Group Jincang Beijing Technology Co ltd filed Critical China Electronics Technology Group Jincang Beijing Technology Co ltd
Priority to CN202510264746.1A priority Critical patent/CN120086145A/en
Publication of CN120086145A publication Critical patent/CN120086145A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本申请实施例提供的测试方法、装置、设备、存储介质及程序产品,该方法包括:在使用测试用例集合对第一软件完成测试之后,获取测试用例集合的测试信息,测试信息包括:每个测试类的测试指标,以及,所使用的优先值,优先值与测试类的测试质量正相关;根据测试信息,更新测试类的优先值;响应于针对第二软件的测试指令,根据测试类更新后的优先值,确定本次测试所使用的测试类,以及,对应的执行顺序;基于本次测试所使用的测试类,以及,对应的执行顺序,对第二软件进行测试。通过获取测试类的优先值确定本次测试使用的测试类及执行顺序,可以在自动化测试中优先执行测试效率高的测试类,有利于及时发现故障。

The test method, apparatus, device, storage medium and program product provided by the embodiment of the present application include: after completing the test of the first software using the test case set, obtaining the test information of the test case set, the test information includes: the test indicators of each test class, and the priority value used, 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 the test instruction for the second software, determining the test class used in this test and the corresponding execution order according to the updated priority value of the test class; testing the second software based on the test class used in this test and the corresponding execution order. By obtaining the priority value of the test class to determine the test class used in this test and the execution order, the test class with high test efficiency can be executed preferentially in the automated test, which is conducive to timely detection of faults.

Description

Test method, test device, test apparatus, test program, and test program
Technical Field
The present application relates to the field of automated testing technology, and in particular, to a testing method, apparatus, device, storage medium, and program product.
Background
Automated testing is an essential element in the development of modern software. By means of automatic testing, the efficiency and quality of the software testing process can be improved. Along with the increasing complexity and the increasing demand of the automatic test, the method has the advantages that the design of the automatic test cases is reasonable, the execution sequence is efficient, and the method becomes one of the key problems in the current automatic test field.
In the prior art, the automatic test case sorting method is carried out sequentially through an automatic frame default sorting method, for example, according to ASCII code sorting of case names, and the test cases are executed through a test sleeve according to an execution sequence preset by the test sleeve.
Disclosure of Invention
The embodiment of the application provides a test method, a device, equipment, a storage medium and a program product, which are used for achieving the effect that software faults can be found in time by adopting the test case ordering method.
In a first aspect, an embodiment of the present application provides a testing method, including:
After the first software is tested by using the test case set, test information of the test case set is obtained, wherein the test information comprises test indexes of each test class and used priority values, and the priority values are positively related to the test quality of the test class;
Updating the priority value of the test class according to the test information;
responding to a test instruction aiming at the second software, and determining a test class used by the test and a corresponding execution sequence according to the updated priority value of the test class;
and testing the second software based on the test class used in the test and the corresponding execution sequence.
In one embodiment, the test indexes include a successful test case number S, a failed test case number F and an abnormal test case number E under the test class;
Updating the priority value of the test class according to the test information, including:
setting weight values k, h, i and j for a priority value P0, a successful test case number S, a failed test case number F and an abnormal test case number E of the last test of the test class respectively;
obtaining a test index value of the test class according to the sum of the failed test case number F x i and the abnormal test case number E x j divided by the successful test case number S x h;
Calculating to obtain a priority value Pn of each test class based on the current test according to the sum of the test index value of the test class and the priority value P0 x k of the last test of the test class;
and updating the priority value of the test class based on the priority value of the current test.
In one embodiment, after testing the first software using the test case set, obtaining test information of the test case set specifically includes:
if the test index of the test class is empty, determining that the test class is blocked;
And determining the priority value of the test class based on the current test as a special value.
In one embodiment, determining the test class used in the test and the corresponding execution sequence according to the updated priority value of the test class includes:
storing all test classes and corresponding test methods into a dictionary according to default ordering to obtain an initial to-be-executed use case dictionary;
And optimizing the initial to-be-executed use case dictionary based on the updated priority value of the test class to obtain the to-be-executed use case dictionary, wherein the to-be-executed use case dictionary comprises the test class used by the test and the corresponding execution sequence.
In one embodiment, optimizing the initial to-be-executed use case dictionary based on the updated priority value of the test class to obtain the to-be-executed use case dictionary includes:
Storing the updated test class with the priority value larger than or equal to a preset threshold value into a dictionary of the use case to be executed;
and the dictionary of the use cases to be executed is ordered according to the updated priority values of the test classes.
In one embodiment, determining the test class used in the test and the corresponding execution sequence according to the updated priority value of the test class specifically includes:
Setting a rotation parameter R, wherein R is more than or equal to 1;
Classifying the updated test class with the priority value smaller than the preset threshold value and the test class with the updated priority value as a special value into R groups of test classes, and sequencing;
Selecting i groups of test class storage values from R groups of test classes to be executed in a use case dictionary based on rotation parameters, wherein i is less than or equal to R;
And updating the value of the rotation parameter R after the second software test is completed, wherein the value of the rotation parameter R is updated based on the number of test classes not executed in the (R-i) group.
In a second aspect, an embodiment of the present application provides a test apparatus, including:
the acquisition module is used for acquiring the test information of the test case set after the test of the first software is completed by using the test case set, wherein the test information comprises test indexes of each test class and used priority values, and the priority values are positively related to the test quality of the test class;
the processing module is used for updating the priority value of the test class according to the test information;
the determining module is used for determining the test class used by the test and the corresponding execution sequence according to the updated priority value of the test class in response to the test instruction aiming at the second software;
And the test module is used for testing the second software based on the test class used in the test and the corresponding execution sequence.
In a third aspect, an embodiment of the present application provides a test apparatus, including a memory, a processor;
The memory stores computer-executable instructions;
The processor executes the computer-executable instructions stored in the memory to cause the processor to perform a method as any one of the above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement a method as described in any of the above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements any of the methods described above.
The method comprises the steps of obtaining test information of a test case set after the first software is tested by the test case set, wherein the test information comprises test indexes of each test class and used priority values positively correlated with test quality of the test class, updating the priority values of the test classes according to the test information, responding to test instructions of the second software, determining the test class used for the test according to the updated priority values of the test classes and corresponding execution sequences, and testing the second software based on the test class used for the test and the corresponding execution sequences. The test class and the execution sequence used in the test are determined by acquiring the priority value of the test class, so that the test class with high test efficiency can be preferentially executed in the automatic test, and the automatic test class is favorable for timely finding faults if the automatic test is not completed in time under the conditions of resource limitation, time limitation and use case blockage.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart of a test method according to an embodiment of the present application;
FIG. 2 is a flow chart of a testing method according to another embodiment of the present application;
FIG. 3 is a schematic structural diagram of a testing device according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of a test apparatus according to the present application.
Reference numerals:
30. test device 301, acquisition module 302, processing module 303, determination module 304, test module 40, test equipment 401, processor 402, memory 403, and communication unit.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In the prior art, the automatic test case sorting method is carried out sequentially through an automatic frame default sorting method, for example, according to ASCII code sorting of case names, and the test cases are executed through a test sleeve according to an execution sequence preset by the test sleeve.
The test method comprises the steps of obtaining test information of a test case set after the test of first software is completed by using the test case set, wherein the test information comprises test indexes of each test class and used priority values, the priority values are positively correlated with test quality of the test classes, updating the priority values of the test classes according to the test information, responding to a test instruction of second software, determining the test class used for the test according to the updated priority values of the test classes and corresponding execution sequence, and testing the second software based on the test class used for the test and the corresponding execution sequence. The test class and the execution sequence used in the test are determined by acquiring the priority value of the test class, so that the test class with high test efficiency can be preferentially executed in the automatic test, and the automatic test class is favorable for timely finding faults if the automatic test is not completed in time under the conditions of resource limitation, time limitation and use case blockage.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The embodiment of the application provides a testing method, which comprises the following steps, as shown in fig. 1, fig. 1 is a flow chart diagram of the testing method provided by the embodiment of the application:
Step S102, after testing the first software by using the test case set, obtaining test information of the test case set, wherein the test information comprises test indexes of each test class and used priority values, and the priority values are positively related to the test quality of the test class.
Step S104, updating the priority value of the test class according to the test information.
Specifically, the test case set includes a plurality of test classes, and the test classes include a plurality of test cases. Test cases are categorized by test function or otherwise, e.g., as to the method of software variation. After each automatic test is finished, the test information of the test case set is obtained, and the priority value of the corresponding test class is updated according to the test information. The higher the priority value, the greater the probability that a test class with a high priority value will detect a software fault.
And step S106, responding to a test instruction aiming at the second software, and determining the test class used by the test and the corresponding execution sequence according to the updated priority value of the test class.
Specifically, when testing the second software, all test classes are ordered according to the updated priority value, and the test class needed to be used in the test is determined according to the order of the test classes.
Step S108, testing the second software based on the test class used in the test and the corresponding execution sequence.
The application determines the test class used in the test based on the updated priority value and the corresponding execution sequence, and when the automatic test is performed, the test case with higher test quality is preferentially used, and the faults of the software to be tested can be found in time under the conditions of resource limitation, time limitation and case blockage.
In one embodiment, the test indexes 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, and the step S104 includes the following steps, as shown in FIG. 2, and FIG. 2 is a flow chart of a test method according to another embodiment of the present application:
Step S201, weight values k, h, i and j are set for the priority value P0, the number S of successful test cases, the number F of failed test cases and the number E of abnormal test cases of the last test of the test class respectively.
Specifically, setting 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 is an important link in the priority ranking of the test class, and can be adjusted according to the test requirement and the change of the test environment. In an automatic test environment, the priority value P0, the successful test case number S, the failed test case number F and the weight value of the abnormal test case number E of the last test of the test class can be determined according to factors such as the importance of the test cases, the execution time, the code coverage rate, the defect detection capability and the like. For example, the weight value (h) of a successful use case may be set to a lower value because they generally indicate that the test passed, while the weight value (i) of a failed use case and the weight value (j) of an abnormal use case may be set to higher values because they indicate potential problems and risks. For example, if the primary goal of an automated test is to discover critical defects as soon as possible, the weights of failed and abnormal cases may be set higher. The weight values should also be set in consideration of limitations of test resources such as time, manpower, and equipment, etc., to ensure the validity and efficiency of the test activities. The weight values k, h, i and j should be based on the evaluation of the influence on the test result and the test targets and strategies, so in practical application, the weight values need to be determined according to practical situations, and the application is not limited herein.
Step S202, obtaining a test index value of the test class according to the sum of the failed test case number F x i and the abnormal test case number E x j divided by the successful test case number S x h.
Step S203, calculating a priority value Pn of each test class based on the current test according to the sum of the test index value of the test class and the priority value P0 x k of the last test of the test class.
Specifically, the priority value of each test class based on the current test can be calculated through step S202 and step S203, and the specific calculation formula is as follows:
if the test class has no priority value of the last test, setting the priority value P0 of the last test to be 0. The updated priority value Pn for the test class may be stored in a database or other storage file.
Step S204, updating the priority value of the test class based on the priority value of the current test.
In one embodiment, the step S102 specifically includes the following steps:
and if the test index of the test class is empty, determining that the test class is blocked.
And determining the priority value of the test class based on the current test as a special value.
Specifically, if the test index content of a certain test class is empty, it indicates that the test class is blocked, a special value is assigned to the priority value Pn of the test class, for example, a value-1 is assigned to the priority value of the test class with the empty test index content, which indicates that the test class is a blocking case, and the blocking case will not be automatically tested. The test class is re-executed in the automated test by manually deleting the mark corresponding to the blocking case in the database or the storage file.
In one embodiment, step S106 includes the steps of:
and storing all the test classes and the corresponding test methods into the dictionary according to the default ordering to obtain an initial to-be-executed use case dictionary.
And optimizing the initial to-be-executed use case dictionary based on the updated priority value of the test class to obtain the to-be-executed use case dictionary, wherein the to-be-executed use case dictionary comprises the test class used by the test and the corresponding execution sequence.
Specifically, the initial to-be-executed use case dictionary is optimized, so that the test class with a low priority value of the blocked use case can be eliminated, the test efficiency of the automatic test is improved, the influence of the blocked use case on the whole automatic test is avoided, and the software fault is found in time advantageously.
In one embodiment, based on the updated priority value of the test class, the initial to-be-executed use case dictionary is optimized to obtain the to-be-executed use case dictionary, which includes the following steps:
And storing the test class with the updated priority value being greater than or equal to a preset threshold value into the dictionary of the use case to be executed.
And the dictionary of the use cases to be executed is ordered according to the updated priority values of the test classes.
Specifically, the preset threshold value can be adjusted according to the test requirement and the test environment, which is not limited by the present application. And testing the software to be tested by using the test cases in the test case dictionary to be tested when the automatic test is carried out subsequently by storing the updated test class storage value with the priority value being greater than or equal to the preset threshold value in the test case dictionary to be executed. Under the condition of limited resources, the test class in the dictionary of the use cases to be executed is used for testing, so that the efficiency can be greatly improved, the test time is shortened, the fault problem of the software to be tested can be found out more quickly, and secondly, the usability and maintainability of the test method are improved by setting a preset threshold value.
In one embodiment, determining the test class used in the test and the corresponding execution sequence according to the updated priority value of the test class, specifically includes the following steps:
setting a rotation parameter R, wherein R is more than or equal to 1.
And classifying the updated test class with the priority value smaller than the preset threshold value and the test class with the updated priority value as a special value into R groups of test classes, and sequencing.
And selecting i groups of test class storage values from the R groups of test classes to be executed in the use case dictionary based on the rotation parameters, wherein i is less than or equal to R.
And updating the value of the rotation parameter R after the second software test is completed, wherein the value of the rotation parameter R is updated based on the number of test classes not executed in the (R-i) group.
The automatic test method comprises the steps of carrying out automatic test on test classes in a dictionary of to-be-executed cases, wherein the dictionary of to-be-executed cases comprises i groups of test classes in R groups of test classes, recording non-executed test classes in the R groups, updating rotation parameters after the first test period is finished, and calculating test cases to be executed in the next test period according to the number of the non-executed test classes and the rotation parameters R until all the test classes finish the test. Under the condition of limited resources, all test classes are ensured to be executed as much as possible, the setting of rotation parameters can ensure that the rest test classes (the test classes with updated priority values smaller than a preset threshold value and with the priority values being special values) can be executed for testing, and the problems that software is not comprehensively tested and faults are omitted are prevented.
Fig. 3 is a schematic structural diagram of a testing device according to an embodiment of the application. The testing device 30 comprises an acquisition module 301 for acquiring testing information of a testing case set after testing a first software by using the testing case set, wherein the testing information comprises testing indexes of each testing class and used priority values positively correlated with testing quality of the testing class, a processing module 302 for updating the priority values of the testing classes according to the testing information, a determination module 303 for determining the testing class used by the current testing and corresponding execution sequence according to the updated priority values of the testing class in response to a testing instruction of a second software, and a testing module 304 for testing the second software based on the testing class used by the current testing and the corresponding execution sequence.
The test device provided in this embodiment may execute the method provided in the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein in detail.
The application determines the test class and the execution sequence used by the test by acquiring the priority value of the test class, can preferentially execute the test class with high test efficiency in the automatic test, and is favorable for timely finding faults by adopting the test class for the automatic test if the automatic test is not completed in time under the conditions of resource limitation, time limitation and use case blockage.
Fig. 4 is a schematic structural diagram of a test apparatus according to the present application. As shown in fig. 4, the test apparatus 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the device 40 further comprises a communication component 403. Wherein the processor 401, the memory 402 and the communication section 403 are connected by a bus.
In a specific implementation, at least one processor 401 executes computer-executable instructions stored in a memory 402, so that the at least one processor 401 performs the above-described method.
The specific implementation process of the processor 401 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the above embodiment, it should be understood that the Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: DIGITAL SIGNAL Processor, abbreviated as DSP), application specific integrated circuits (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The Memory may include high-speed Memory (Random Access Memory, RAM) or may further include Non-volatile Memory (NVM), such as at least one disk Memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the method described above.
The application also provides a computer readable storage medium, wherein computer execution instructions are stored in the computer readable storage medium, and when a processor executes the computer execution instructions, the method is realized.
The above-described readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, 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, magnetic or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). The processor and the readable storage medium may reside as discrete components in a device.
The division of units is merely a logical function division, and there may be another division manner in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the various method embodiments described above may be implemented by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs the steps comprising the method embodiments described above, and the storage medium described above includes various media capable of storing program code, such as ROM, RAM, magnetic or optical disk.
Finally, it should be noted that other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any adaptations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains and as may be applied to the precise construction hereinbefore set forth and shown in the drawings and as follows in the scope of the appended claims. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method of testing, the method comprising:
After the first software is tested by using the test case set, test information of the test case set is obtained, wherein the test information comprises test indexes of each test class and used priority values, and the priority values are positively related to the test quality of the test class;
updating the priority value of the test class according to the test information;
Responding to a test instruction aiming at second software, and determining a test class used in the test and a corresponding execution sequence according to the updated priority value of the test class;
and testing the second software based on the test class used in the test and the corresponding execution sequence.
2. The method of claim 1, wherein the test metrics include a number of successful test cases S, a number of failed test cases F, and a number of abnormal test cases E under the test class;
the updating the priority value of the test class according to the test information comprises the following steps:
Respectively setting weight values k, h, i and j for a priority value P0 of the last test of the test class, the number S of successful test cases, the number F of failed test cases and the number E of abnormal test cases;
obtaining a test index value of the test class according to the sum of the failed test case number F x i and the abnormal test case number E x j divided by the successful test case number S x h;
calculating to obtain a priority value Pn of each test class based on the current test according to the sum of the test index value of the test class and the priority value P0 x k of the last test of the test class;
And updating the priority value of the test class based on the priority value of the current test.
3. The method according to claim 1, wherein the obtaining the test information of the test case set after the test of the first software using the test case set is completed, specifically comprises:
If the test index of the test class is empty, determining that the test class is blocked;
And determining the priority value of the test class based on the current test as a special value.
4. A method according to claim 3, wherein the determining the test class used in the test according to the updated priority value of the test class, and the corresponding execution sequence, includes:
storing all test classes and corresponding test methods into a dictionary according to default ordering to obtain an initial to-be-executed use case dictionary;
and optimizing the initial to-be-executed use case dictionary based on the updated priority value of the test class to obtain the to-be-executed use case dictionary, wherein the to-be-executed use case dictionary comprises the test class used in the test and a corresponding execution sequence.
5. The method of claim 4, wherein optimizing the initial to-be-executed use case dictionary based on the updated priority value of the test class to obtain a to-be-executed use case dictionary comprises:
storing the test class with the updated priority value being greater than or equal to a preset threshold value into the to-be-executed use case dictionary;
And the to-be-executed case dictionary is ordered according to the updated priority values of the test class.
6. The method according to claim 5, wherein the determining the test class used in the present test according to the updated priority value of the test class, and the corresponding execution sequence specifically includes:
Setting a rotation parameter R, wherein R is more than or equal to 1;
Classifying the updated test class with the priority value smaller than the preset threshold value and the test class with the updated priority value as a special value into R groups of test classes, and sequencing;
selecting i groups of test class storage values from the R groups of test classes based on the rotation parameters to be used for executing the dictionary, wherein i is less than or equal to R;
Updating the value of the rotation parameter R after the second software test is completed, wherein the value of the rotation parameter R is updated based on the number of test classes not executed by the (R-i) group.
7. A test device, comprising:
The acquisition module is used for acquiring the test information of the test case set after the first software is tested by using the test case set, wherein the test information comprises test indexes of each test class and used priority values, and the priority values are positively related to the test quality of the test class;
the processing module is used for updating the priority value of the test class according to the test information;
The determining module is used for determining the test class used by the test and the corresponding execution sequence according to the updated priority value of the test class in response to the test instruction aiming at the second software;
and the test module is used for testing the second software based on the test class used in the test and the corresponding execution sequence.
8. A test device is characterized by comprising a memory and a processor;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-6.
9. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202510264746.1A 2025-03-06 2025-03-06 Test method, device, equipment, storage medium and program product Pending CN120086145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510264746.1A CN120086145A (en) 2025-03-06 2025-03-06 Test method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510264746.1A CN120086145A (en) 2025-03-06 2025-03-06 Test method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN120086145A true CN120086145A (en) 2025-06-03

Family

ID=95856003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510264746.1A Pending CN120086145A (en) 2025-03-06 2025-03-06 Test method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN120086145A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120295929A (en) * 2025-06-13 2025-07-11 济南浪潮数据技术有限公司 Software testing method, system and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120295929A (en) * 2025-06-13 2025-07-11 济南浪潮数据技术有限公司 Software testing method, system and device

Similar Documents

Publication Publication Date Title
US7028290B2 (en) Method and apparatus for prioritizing software tests
CN113220598B (en) System test method, device, equipment, medium and program product
CN110471915B (en) Account routing determination method and device
CN120086145A (en) Test method, device, equipment, storage medium and program product
CN111784160A (en) A method and system for assessing changes in river hydrology
CN113254352A (en) Test method, device, equipment and storage medium for test case
CN106897224B (en) Method and device for determining software testing range
CN109992511B (en) Device and method for obtaining code test coverage rate
CN110442370B (en) Test case query method and device
CN114355171B (en) Reconfigurable chip performance bottleneck detection platform, detection method and electronic equipment
CN112231229A (en) Web UI (user interface) automatic testing method and system, electronic equipment and readable storage medium
CN116881117A (en) Test case coverage rate evaluation method, device, computer equipment and storage medium
CN115223878B (en) Repairing method and device for failure position
CN114064511A (en) Custom monitoring index development method and device
CN109947656A (en) A kind of testing case management and device
CN114996139B (en) Test case storage method and device, electronic equipment and storage medium
CN118259979A (en) Method and device for determining configuration parameters
CN109359093A (en) A method and system for updating a rule file
CN112905169B (en) Method and device for automatically positioning naming space reference problem
CN117707936B (en) Multi-system multi-version full-link testing method, device, equipment and storage medium
CN111984522A (en) Automatic testing method and device
CN112527659A (en) Test method and device
CN116561018B (en) Service system counting method, device, terminal equipment and storage medium
CN118916280B (en) Test code generation methods, devices, equipment, and storage media
CN112579336B (en) Database exception recovery method and device, computing device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination