US20230153511A1 - Regression test method, electronic device and storage medium - Google Patents

Regression test method, electronic device and storage medium Download PDF

Info

Publication number
US20230153511A1
US20230153511A1 US17/884,899 US202217884899A US2023153511A1 US 20230153511 A1 US20230153511 A1 US 20230153511A1 US 202217884899 A US202217884899 A US 202217884899A US 2023153511 A1 US2023153511 A1 US 2023153511A1
Authority
US
United States
Prior art keywords
test
test case
current
adjusted
randomized
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.)
Granted
Application number
US17/884,899
Other versions
US11669672B1 (en
Inventor
Xin Jin
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Assigned to BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD. reassignment BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: JIN, XIN
Publication of US20230153511A1 publication Critical patent/US20230153511A1/en
Application granted granted Critical
Publication of US11669672B1 publication Critical patent/US11669672B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • G06F30/398Design verification or optimisation, e.g. using design rule check [DRC], layout versus schematics [LVS] or finite element methods [FEM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • the present disclosure relates to the field of artificial intelligence technologies, and particularly to a regression test method, an electronic device and a storage medium in the fields of artificial intelligence chips, cloud computing, intelligent voices, or the like.
  • a regression test is an important test in verification of an integrated circuit (IC) chip which may be an intelligent voice chip, or the like.
  • IC integrated circuit
  • a large number of random cases may be generated in a regression test process to traverse and simulate various situations, and a code coverage rate, or the like, may be improved effectively by the regression test.
  • the present disclosure provides a regression test method, an electronic device and a storage medium.
  • a method for regression test includes when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • An electronic device includes at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method for regression test, wherein the method includes: when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • Non-transitory computer readable storage medium with computer instructions stored thereon, wherein the computer instructions are used for causing a method for regression test, wherein the method includes when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • FIG. 1 is a flow chart of a method for regression test according to a first embodiment of the present disclosure
  • FIG. 2 is a flow chart of a method for regression test according to a second embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of an apparatus 300 for regression test according to an embodiment of the present disclosure.
  • FIG. 4 shows a schematic block diagram of an electronic device 400 which may be configured to implement the embodiment of the present disclosure.
  • FIG. 1 is a flow chart of a method for regression test according to a first embodiment of the present disclosure. As shown in FIG. 1 , the method includes the following implementation steps of:
  • Step 101 when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result;
  • Step 102 adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • an adaptive-adjustment regression test method is adopted, such that a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving test efficiency, or the like.
  • the to-be-adjusted test case may be determined from the test cases according to the current test result.
  • the current test refers to a most recently executed regression test.
  • the to-be-adjusted test case may include a positive to-be-adjusted test case
  • the step of determining a positive to-be-adjusted test case from test cases according to a current test result may include: for any test case with a current test result of pass, if test results of the test case in continuous M tests including the current test are determined to be pass, using the test case as the positive to-be-adjusted test case, M being a positive integer.
  • test cases may be used for each regression test, and the test result of each test case is either pass or fail.
  • a specific value of M may be determined according to actual requirements, and may be 1, or greater than 1. If the value of M is 1, if the current test result of any test case is pass, the test case may be taken as a positive to-be-adjusted test case; if the value of M is greater than 1, and is assumed to be 3, when test results of the test case in the current test and two tests before the current test are pass, the test case may be taken as a positive to-be-adjusted test case.
  • the specific way may be determined according to actual requirements, which is quite flexible and convenient.
  • a randomization weight corresponding to a data range randomized by any positive to-be-adjusted test case in the current test may be adjusted, and in one embodiment of the present disclosure, the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test may be reduced, and randomization weights corresponding to other data ranges may be unchanged.
  • an initial randomization weight may be set; for example, the randomization weights corresponding to different data ranges may be set to be the same; that is, case data is completely random within a required range; a local key test may also be supported; that is, during initialization, a randomization weight different from other randomization weights may be set for a specific data range, and a specific implementation is not limited.
  • a current adjustment value may be determined first, and then, the adjustment value may be subtracted from the randomization weight currently corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule. That is, the solution according to the present disclosure supports different adjustment value determination manners, which is quite flexible and convenient.
  • a specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • a current adjustment step may be used as the adjustment value directly, or the adjustment value may be determined in conjunction with the current adjustment step and the preset rule, and the specific rule is not limited, and may also be determined according to actual requirements; for example, a product of M and the adjustment step may be used as the adjustment value.
  • the to-be-adjusted test case may also include a negative to-be-adjusted test case, and correspondingly, the step of determining a negative to-be-adjusted test case from test cases according to a current test result may include: using a test case with the current test result of fail as the negative to-be-adjusted test case.
  • a randomization weight corresponding to a data range randomized by any negative to-be-adjusted test case in the current test may be adjusted, and in one embodiment of the present disclosure, the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test may be increased, and randomization weights corresponding to other data ranges may be unchanged.
  • the data range may be randomized as far as possible during a next test, so as to realize a key test, or the like, near an error region.
  • a current adjustment value may be determined first, and then, the adjustment value may be added to the randomization weight currently corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • a specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • a current adjustment step may be used as the adjustment value directly, or the adjustment value may be determined in conjunction with the current adjustment step and the preset rule, and the specific rule is not limited.
  • FIG. 2 is a flow chart of a method for regression test according to a second embodiment of the present disclosure. As shown in FIG. 2 , the method includes the following implementation steps of:
  • Step 201 performing a first regression test.
  • an initial randomization weight may be set during initialization.
  • Step 202 determining whether a predetermined code coverage rate requirement is met, if yes, ending the process, and if no, executing Step 203 .
  • Step 203 processing each test case in manners shown in Step 204 to Step 206 .
  • Step 204 determining whether a test result of the test case is pass or fail, and if the test result is pass, executing Step 205 , and if the test result is fail, executing Step 206 .
  • Step 205 taking the test case as a positive to-be-adjusted test case, reducing a randomization weight corresponding to a data range randomized by the positive to-be-adjusted test case in a current test, and then, executing Step 207 .
  • a current adjustment value may be determined first, and then, the adjustment value may be subtracted from the randomization weight currently corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • a difference between the randomization weight before adjustment (the currently corresponding randomization weight) and the adjustment value may be calculated, and a calculation result is used as the adjusted randomization weight, i.e., the reduced randomization weight.
  • Step 206 taking the test case as a negative to-be-adjusted test case, increasing a randomization weight corresponding to a data range randomized by the negative to-be-adjusted test case in a current test, and then, executing Step 207 .
  • a current adjustment value may be determined first, and then, the adjustment value may be added to the randomization weight currently corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • a sum between the randomization weight before adjustment and the adjustment value may be calculated, and a calculation result is used as the adjusted randomization weight, i.e., the increased randomization weight.
  • Step 207 after all the test cases are processed in the above manners, performing a next regression test, and then, repeating Step 202 .
  • a method of performing the regression test belongs to a prior art.
  • FIG. 3 is a schematic structural diagram of an apparatus 300 for regression test according to an embodiment of the present disclosure.
  • the apparatus for regression test includes a first processing module 301 configured to, when execution of any regression test is completed, determine a to-be-adjusted test case from test cases according to a current test result; and a second processing module 302 configured to adjust a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • an adaptive-adjustment regression test method is adopted, such that a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving a test efficiency, or the like.
  • the first processing module 301 may determine the to-be-adjusted test case from the test cases according to the current test result.
  • the to-be-adjusted test case may include a positive to-be-adjusted test case
  • the first processing module 301 determining a positive to-be-adjusted test case from test cases according to a current test result may include: for any test case with a current test result of pass, if test results of the test case in continuous M tests including the current test are determined to be pass, using the test case as the positive to-be-adjusted test case, M being a positive integer.
  • test cases may be used for each regression test, and the test result of each test case is either pass or fail.
  • a specific value of M may be determined according to actual requirements, and may be 1, or greater than 1. If the value of M is 1, if the current test result of any test case is pass, the test case may be taken as a positive to-be-adjusted test case; if the value of M is greater than 1, and is assumed to be 3, when test results of the test case in the current test and two tests before the current test are pass, the test case may be taken as a positive to-be-adjusted test case.
  • the second processing module 302 may adjust a randomization weight corresponding to a data range randomized by any positive to-be-adjusted test case in the current test, and in one embodiment of the present disclosure, may reduce the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test.
  • the second processing module 302 may determine a current adjustment value first, and then subtract the adjustment value from the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • the to-be-adjusted test case may also include a negative to-be-adjusted test case
  • the first processing module 301 determining a negative to-be-adjusted test case from test cases according to a current test result may include: using a test case with the current test result of fail as the negative to-be-adjusted test case.
  • the second processing module 302 may adjust a randomization weight corresponding to a data range randomized by any negative to-be-adjusted test case in the current test, and in one embodiment of the present disclosure, may increase the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, and randomization weights corresponding to other data ranges may be unchanged.
  • the second processing module 302 may determine a current adjustment value first, and then add the adjustment value to the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • a specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving a test efficiency, realizing a key test near an error region, and guaranteeing a test effect; in addition, an implementation is simple, and general applicability, or the like, is achieved.
  • the solution of the present disclosure may be applied to the field of artificial intelligence, and particularly relates to the fields of artificial intelligence chips, cloud computing, intelligent voices, or the like.
  • Artificial intelligence is a subject of researching how to cause a computer to simulate certain thought processes and intelligent behaviors (for example, learning, inferring, thinking, planning, or the like) of a human, and includes both hardware-level technologies and software-level technologies.
  • the hardware technologies of the artificial intelligence include technologies, such as a sensor, a dedicated artificial intelligence chip, cloud computing, distributed storage, big data processing, or the like;
  • the software technologies of the artificial intelligence mainly include a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology, or the like.
  • the collection, storage, usage, processing, transmission, provision, disclosure, or the like, of involved user personal information are in compliance with relevant laws and regulations, and do not violate public order and good customs.
  • an electronic device a readable storage medium and a computer program product.
  • FIG. 4 shows a schematic block diagram of an electronic device 400 which may be configured to implement the embodiment of the present disclosure.
  • the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other appropriate computers.
  • the electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing apparatuses.
  • the components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementation of the present disclosure described and/or claimed herein.
  • the device 400 includes a computing unit 401 which may perform various appropriate actions and processing operations according to a computer program stored in a read only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403 .
  • Various programs and data necessary for the operation of the device 400 may be also stored in the RAM 403 .
  • the computing unit 401 , the ROM 402 , and the RAM 403 are connected with one other through a bus 404 .
  • An input/output (I/O) interface 405 is also connected to the bus 404 .
  • the plural components in the device 400 are connected to the I/O interface 405 , and include: an input unit 406 , such as a keyboard, a mouse, or the like; an output unit 407 , such as various types of displays, speakers, or the like; the storage unit 408 , such as a magnetic disk, an optical disk, or the like; and a communication unit 409 , such as a network card, a modem, a wireless communication transceiver, or the like.
  • the communication unit 409 allows the device 400 to exchange information/data with other devices through a computer network, such as the Internet, and/or various telecommunication networks.
  • the computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, or the like.
  • the computing unit 401 performs the methods and processing operations described above, such as the method according to the present disclosure.
  • the method according to the present disclosure may be implemented as a computer software program tangibly contained in a machine readable medium, such as the storage unit 408 .
  • part or all of the computer program may be loaded and/or installed into the device 400 via the ROM 402 and/or the communication unit 409 .
  • the computer program When the computer program is loaded into the RAM 403 and executed by the computing unit 401 , one or more steps of the method according to the present disclosure may be performed.
  • the computing unit 401 may be configured to perform the method according to the present disclosure by any other suitable means (for example, by means of firmware).
  • Various implementations of the systems and technologies described herein above may be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on chips (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • the systems and technologies may be implemented in one or more computer programs which are executable and/or interpretable on a programmable system including at least one programmable processor, and the programmable processor may be special or general, and may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input apparatus, and at least one output apparatus.
  • Program codes for implementing the method according to the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or a controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatuses, such that the program code, when executed by the processor or the controller, causes functions/operations specified in the flowchart and/or the block diagram to be implemented.
  • the program code may be executed entirely on a machine, partly on a machine, partly on a machine as a stand-alone software package and partly on a remote machine, or entirely on a remote machine or a server.
  • the machine readable medium may be a tangible medium which may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine readable medium may be a machine readable signal medium or a machine readable storage medium.
  • the machine readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • machine readable storage medium may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disc read only memory
  • magnetic storage device or any suitable combination of the foregoing.
  • a computer having: a display apparatus (for example, a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to a user; and a keyboard and a pointing apparatus (for example, a mouse or a trackball) by which a user may provide input for the computer.
  • a display apparatus for example, a cathode ray tube (CRT) or liquid crystal display (LCD) monitor
  • a keyboard and a pointing apparatus for example, a mouse or a trackball
  • Other kinds of apparatuses may also be used to provide interaction with a user; for example, feedback provided for a user may be any form of sensory feedback (for example, visual feedback, auditory feedback, or tactile feedback); and input from a user may be received in any form (including acoustic, speech or tactile input).
  • the systems and technologies described here may be implemented in a computing system (for example, as a data server) which includes a back-end component, or a computing system (for example, an application server) which includes a middleware component, or a computing system (for example, a user computer having a graphical user interface or a web browser through which a user may interact with an implementation of the systems and technologies described here) which includes a front-end component, or a computing system which includes any combination of such back-end, middleware, or front-end components.
  • the components of the system may be interconnected through any form or medium of digital data communication (for example, a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN) and the Internet.
  • a computer system may include a client and a server.
  • the client and the server are remote from each other and interact through the communication network.
  • the relationship between the client and the server is generated by virtue of computer programs which run on respective computers and have a client-server relationship to each other.
  • the server may be a cloud server or a server of a distributed system, or a server incorporating a blockchain.

Abstract

There is provided a regression test method, an electronic device and a storage medium, and relates to the field of artificial intelligence, such as artificial intelligence chips, cloud computing, intelligent voices, or the like. The method includes: when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • The present application claims the priority of Chinese Patent Application No. 202111353264.1, filed on Nov. 16, 2021, with the title of “REGRESSION TEST METHOD AND APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIUM.” The disclosure of the above application is incorporated herein by reference in its entirety.
  • FIELD OF THE DISCLOSURE
  • The present disclosure relates to the field of artificial intelligence technologies, and particularly to a regression test method, an electronic device and a storage medium in the fields of artificial intelligence chips, cloud computing, intelligent voices, or the like.
  • BACKGROUND OF THE DISCLOSURE
  • A regression test is an important test in verification of an integrated circuit (IC) chip which may be an intelligent voice chip, or the like. A large number of random cases may be generated in a regression test process to traverse and simulate various situations, and a code coverage rate, or the like, may be improved effectively by the regression test.
  • In practical applications, usually, the regression test is required to take a long time and is inefficient, but there is no better solution to this problem currently.
  • SUMMARY OF THE DISCLOSURE
  • The present disclosure provides a regression test method, an electronic device and a storage medium.
  • A method for regression test includes when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • An electronic device includes at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method for regression test, wherein the method includes: when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • There is provided a non-transitory computer readable storage medium with computer instructions stored thereon, wherein the computer instructions are used for causing a method for regression test, wherein the method includes when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
  • BRIEF DESCRIPTION OF DRAWINGS
  • The drawings are used for better understanding the present solution and do not constitute a limitation of the present disclosure. In the drawings,
  • FIG. 1 is a flow chart of a method for regression test according to a first embodiment of the present disclosure;
  • FIG. 2 is a flow chart of a method for regression test according to a second embodiment of the present disclosure;
  • FIG. 3 is a schematic structural diagram of an apparatus 300 for regression test according to an embodiment of the present disclosure; and
  • FIG. 4 shows a schematic block diagram of an electronic device 400 which may be configured to implement the embodiment of the present disclosure.
  • DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
  • The following part will illustrate exemplary embodiments of the present disclosure with reference to the drawings, including various details of the embodiments of the present disclosure for a better understanding. The embodiments should be regarded only as exemplary ones. Therefore, those skilled in the art should appreciate that various changes or modifications can be made with respect to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the descriptions of the known functions and structures are omitted in the descriptions below.
  • In addition, it should be understood that the term “and/or” only describes an association relationship between associated objects, and indicates that three relationships may exist. For example, A and/or B may indicate three cases: only A exists; both A and B exist; and only B exists. In addition, in this specification, the symbol “/” generally indicates that associated objects have a relationship of “or”.
  • FIG. 1 is a flow chart of a method for regression test according to a first embodiment of the present disclosure. As shown in FIG. 1 , the method includes the following implementation steps of:
  • Step 101: when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result; and
  • Step 102: adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • It is observed that in the solution of the above method embodiment, an adaptive-adjustment regression test method is adopted, such that a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving test efficiency, or the like.
  • In practical applications, usually, plural regression tests are performed on a tested object until an end condition is met, for example, a predetermined code coverage rate requirement is met.
  • In the solution of the present disclosure, when the execution of any regression test is completed, the to-be-adjusted test case may be determined from the test cases according to the current test result. The current test refers to a most recently executed regression test.
  • In one embodiment of the present disclosure, the to-be-adjusted test case may include a positive to-be-adjusted test case, and correspondingly, the step of determining a positive to-be-adjusted test case from test cases according to a current test result may include: for any test case with a current test result of pass, if test results of the test case in continuous M tests including the current test are determined to be pass, using the test case as the positive to-be-adjusted test case, M being a positive integer.
  • All test cases may be used for each regression test, and the test result of each test case is either pass or fail.
  • A specific value of M may be determined according to actual requirements, and may be 1, or greater than 1. If the value of M is 1, if the current test result of any test case is pass, the test case may be taken as a positive to-be-adjusted test case; if the value of M is greater than 1, and is assumed to be 3, when test results of the test case in the current test and two tests before the current test are pass, the test case may be taken as a positive to-be-adjusted test case. The specific way may be determined according to actual requirements, which is quite flexible and convenient.
  • A randomization weight corresponding to a data range randomized by any positive to-be-adjusted test case in the current test may be adjusted, and in one embodiment of the present disclosure, the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test may be reduced, and randomization weights corresponding to other data ranges may be unchanged.
  • Usually, the higher the randomization weight is, the greater the randomized probability is, and conversely, the smaller the randomized probability is, and therefore, by reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, and other data ranges may be randomized as far as possible during a next test, so as to realize a fast increase of the code coverage rate, i.e., an improvement of the test efficiency, or the like.
  • For each test case, during initialization, i.e., before a first regression test is performed, an initial randomization weight may be set; for example, the randomization weights corresponding to different data ranges may be set to be the same; that is, case data is completely random within a required range; a local key test may also be supported; that is, during initialization, a randomization weight different from other randomization weights may be set for a specific data range, and a specific implementation is not limited.
  • In one embodiment of the present disclosure, for any positive to-be-adjusted test case, a current adjustment value may be determined first, and then, the adjustment value may be subtracted from the randomization weight currently corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • In one embodiment of the present disclosure, a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule. That is, the solution according to the present disclosure supports different adjustment value determination manners, which is quite flexible and convenient.
  • A specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • Correspondingly, during determination of the adjustment value, a current adjustment step may be used as the adjustment value directly, or the adjustment value may be determined in conjunction with the current adjustment step and the preset rule, and the specific rule is not limited, and may also be determined according to actual requirements; for example, a product of M and the adjustment step may be used as the adjustment value.
  • In one embodiment of the present disclosure, the to-be-adjusted test case may also include a negative to-be-adjusted test case, and correspondingly, the step of determining a negative to-be-adjusted test case from test cases according to a current test result may include: using a test case with the current test result of fail as the negative to-be-adjusted test case.
  • A randomization weight corresponding to a data range randomized by any negative to-be-adjusted test case in the current test may be adjusted, and in one embodiment of the present disclosure, the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test may be increased, and randomization weights corresponding to other data ranges may be unchanged.
  • By increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, the data range may be randomized as far as possible during a next test, so as to realize a key test, or the like, near an error region.
  • In one embodiment of the present disclosure, for any negative to-be-adjusted test case, a current adjustment value may be determined first, and then, the adjustment value may be added to the randomization weight currently corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • In one embodiment of the present disclosure, a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • A specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • Correspondingly, during determination of the adjustment value, a current adjustment step may be used as the adjustment value directly, or the adjustment value may be determined in conjunction with the current adjustment step and the preset rule, and the specific rule is not limited.
  • Based on the above-mentioned description, FIG. 2 is a flow chart of a method for regression test according to a second embodiment of the present disclosure. As shown in FIG. 2 , the method includes the following implementation steps of:
  • Step 201: performing a first regression test.
  • For each test case, an initial randomization weight may be set during initialization.
  • Step 202: determining whether a predetermined code coverage rate requirement is met, if yes, ending the process, and if no, executing Step 203.
  • Step 203: processing each test case in manners shown in Step 204 to Step 206.
  • Step 204: determining whether a test result of the test case is pass or fail, and if the test result is pass, executing Step 205, and if the test result is fail, executing Step 206.
  • Step 205: taking the test case as a positive to-be-adjusted test case, reducing a randomization weight corresponding to a data range randomized by the positive to-be-adjusted test case in a current test, and then, executing Step 207.
  • For example, a current adjustment value may be determined first, and then, the adjustment value may be subtracted from the randomization weight currently corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • A preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • Assuming that the adjustment step is used as the adjustment value directly, a difference between the randomization weight before adjustment (the currently corresponding randomization weight) and the adjustment value may be calculated, and a calculation result is used as the adjusted randomization weight, i.e., the reduced randomization weight.
  • In addition, it is observed that a value of M is assumed to be 1 in the present embodiment.
  • Step 206: taking the test case as a negative to-be-adjusted test case, increasing a randomization weight corresponding to a data range randomized by the negative to-be-adjusted test case in a current test, and then, executing Step 207.
  • For example, a current adjustment value may be determined first, and then, the adjustment value may be added to the randomization weight currently corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • A preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • Assuming that the adjustment step is used as the adjustment value directly, a sum between the randomization weight before adjustment and the adjustment value may be calculated, and a calculation result is used as the adjusted randomization weight, i.e., the increased randomization weight.
  • Step 207: after all the test cases are processed in the above manners, performing a next regression test, and then, repeating Step 202.
  • A method of performing the regression test belongs to a prior art.
  • It should be noted that for simplicity of description, all the above-mentioned embodiments of the method are described as combinations of a series of acts, but those skilled in the art should understand that the present disclosure is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present disclosure. Further, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessary for the present disclosure. In addition, for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
  • The above is a description of an embodiment of the method, and an embodiment of an apparatus according to the present disclosure will be further described below.
  • FIG. 3 is a schematic structural diagram of an apparatus 300 for regression test according to an embodiment of the present disclosure. As shown in FIG. 3 , the apparatus for regression test includes a first processing module 301 configured to, when execution of any regression test is completed, determine a to-be-adjusted test case from test cases according to a current test result; and a second processing module 302 configured to adjust a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test.
  • In the solution of the above apparatus embodiment, an adaptive-adjustment regression test method is adopted, such that a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving a test efficiency, or the like.
  • In practical applications, usually, plural regression tests are performed on a tested object until an end condition is met, for example, a predetermined code coverage rate requirement is met.
  • In the solution of the present disclosure, when the execution of any regression test is completed, the first processing module 301 may determine the to-be-adjusted test case from the test cases according to the current test result.
  • In one embodiment of the present disclosure, the to-be-adjusted test case may include a positive to-be-adjusted test case, and correspondingly, the first processing module 301 determining a positive to-be-adjusted test case from test cases according to a current test result may include: for any test case with a current test result of pass, if test results of the test case in continuous M tests including the current test are determined to be pass, using the test case as the positive to-be-adjusted test case, M being a positive integer.
  • All test cases may be used for each regression test, and the test result of each test case is either pass or fail.
  • A specific value of M may be determined according to actual requirements, and may be 1, or greater than 1. If the value of M is 1, if the current test result of any test case is pass, the test case may be taken as a positive to-be-adjusted test case; if the value of M is greater than 1, and is assumed to be 3, when test results of the test case in the current test and two tests before the current test are pass, the test case may be taken as a positive to-be-adjusted test case.
  • The second processing module 302 may adjust a randomization weight corresponding to a data range randomized by any positive to-be-adjusted test case in the current test, and in one embodiment of the present disclosure, may reduce the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test.
  • In one embodiment of the present disclosure, for any positive to-be-adjusted test case, the second processing module 302 may determine a current adjustment value first, and then subtract the adjustment value from the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, thereby obtaining a reduced randomization weight.
  • In one embodiment of the present disclosure, a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • In one embodiment of the present disclosure, the to-be-adjusted test case may also include a negative to-be-adjusted test case, and correspondingly, the first processing module 301 determining a negative to-be-adjusted test case from test cases according to a current test result may include: using a test case with the current test result of fail as the negative to-be-adjusted test case.
  • The second processing module 302 may adjust a randomization weight corresponding to a data range randomized by any negative to-be-adjusted test case in the current test, and in one embodiment of the present disclosure, may increase the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, and randomization weights corresponding to other data ranges may be unchanged.
  • In one embodiment of the present disclosure, for any negative to-be-adjusted test case, the second processing module 302 may determine a current adjustment value first, and then add the adjustment value to the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, thereby obtaining an increased randomization weight.
  • In one embodiment of the present disclosure, a preset adjustment step may be used as the adjustment value, or the adjustment value may be determined in conjunction with the adjustment step and a preset rule.
  • A specific value of the adjustment step may be determined according to actual requirements, and may be modified/adjusted at any time according to actual requirements after set.
  • For the specific work flow of the embodiment of the apparatus shown in FIG. 3 , reference may be made to the related description in the foregoing embodiment of the method.
  • In conclusion, with the solution of the present disclosure, a data randomization direction of a subsequent regression test may be adjusted according to the test result of the performed regression test, thereby improving a test efficiency, realizing a key test near an error region, and guaranteeing a test effect; in addition, an implementation is simple, and general applicability, or the like, is achieved.
  • The solution of the present disclosure may be applied to the field of artificial intelligence, and particularly relates to the fields of artificial intelligence chips, cloud computing, intelligent voices, or the like. Artificial intelligence is a subject of researching how to cause a computer to simulate certain thought processes and intelligent behaviors (for example, learning, inferring, thinking, planning, or the like) of a human, and includes both hardware-level technologies and software-level technologies. Generally, the hardware technologies of the artificial intelligence include technologies, such as a sensor, a dedicated artificial intelligence chip, cloud computing, distributed storage, big data processing, or the like; the software technologies of the artificial intelligence mainly include a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology, or the like.
  • In addition, in the technical solution of the present disclosure, the collection, storage, usage, processing, transmission, provision, disclosure, or the like, of involved user personal information are in compliance with relevant laws and regulations, and do not violate public order and good customs.
  • According to the embodiment of the present disclosure, there are also provided an electronic device, a readable storage medium and a computer program product.
  • FIG. 4 shows a schematic block diagram of an electronic device 400 which may be configured to implement the embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other appropriate computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementation of the present disclosure described and/or claimed herein.
  • As shown in FIG. 4 , the device 400 includes a computing unit 401 which may perform various appropriate actions and processing operations according to a computer program stored in a read only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data necessary for the operation of the device 400 may be also stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected with one other through a bus 404. An input/output (I/O) interface 405 is also connected to the bus 404.
  • The plural components in the device 400 are connected to the I/O interface 405, and include: an input unit 406, such as a keyboard, a mouse, or the like; an output unit 407, such as various types of displays, speakers, or the like; the storage unit 408, such as a magnetic disk, an optical disk, or the like; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 409 allows the device 400 to exchange information/data with other devices through a computer network, such as the Internet, and/or various telecommunication networks.
  • The computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, or the like. The computing unit 401 performs the methods and processing operations described above, such as the method according to the present disclosure. For example, in some embodiments, the method according to the present disclosure may be implemented as a computer software program tangibly contained in a machine readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed into the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method according to the present disclosure may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the method according to the present disclosure by any other suitable means (for example, by means of firmware).
  • Various implementations of the systems and technologies described herein above may be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on chips (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and/or combinations thereof. The systems and technologies may be implemented in one or more computer programs which are executable and/or interpretable on a programmable system including at least one programmable processor, and the programmable processor may be special or general, and may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input apparatus, and at least one output apparatus.
  • Program codes for implementing the method according to the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or a controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatuses, such that the program code, when executed by the processor or the controller, causes functions/operations specified in the flowchart and/or the block diagram to be implemented. The program code may be executed entirely on a machine, partly on a machine, partly on a machine as a stand-alone software package and partly on a remote machine, or entirely on a remote machine or a server.
  • In the context of the present disclosure, the machine readable medium may be a tangible medium which may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine readable medium may be a machine readable signal medium or a machine readable storage medium. The machine readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine readable storage medium may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
  • To provide interaction with a user, the systems and technologies described here may be implemented on a computer having: a display apparatus (for example, a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to a user; and a keyboard and a pointing apparatus (for example, a mouse or a trackball) by which a user may provide input for the computer. Other kinds of apparatuses may also be used to provide interaction with a user; for example, feedback provided for a user may be any form of sensory feedback (for example, visual feedback, auditory feedback, or tactile feedback); and input from a user may be received in any form (including acoustic, speech or tactile input).
  • The systems and technologies described here may be implemented in a computing system (for example, as a data server) which includes a back-end component, or a computing system (for example, an application server) which includes a middleware component, or a computing system (for example, a user computer having a graphical user interface or a web browser through which a user may interact with an implementation of the systems and technologies described here) which includes a front-end component, or a computing system which includes any combination of such back-end, middleware, or front-end components. The components of the system may be interconnected through any form or medium of digital data communication (for example, a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN) and the Internet.
  • A computer system may include a client and a server. Generally, the client and the server are remote from each other and interact through the communication network. The relationship between the client and the server is generated by virtue of computer programs which run on respective computers and have a client-server relationship to each other. The server may be a cloud server or a server of a distributed system, or a server incorporating a blockchain.
  • It should be understood that various forms of the flows shown above may be used and reordered, and steps may be added or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, which is not limited herein as long as the desired results of the technical solution disclosed in the present disclosure may be achieved.
  • The above-mentioned implementations are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure all should be included in the extent of protection of the present disclosure.

Claims (16)

1. A method for regression test, comprising:
when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result, comprising: for any test case with a current test result of pass, if test results of the test case in continuous M tests comprising the current test are determined to be pass, using the test case as a positive to-be-adjusted test case, M being a positive integer; and using a test case with the current test result of fail as a negative to-be-adjusted test case; and
adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test, wherein the higher the randomization weight is, the greater the randomized probability is, and conversely, the smaller the randomized probability is, comprising: reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test; and increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test; and
performing a next regression test after all the test cases are processed until a predetermined code coverage rate requirement is met.
2-3. (canceled)
4. The method according to claim 1, wherein the reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test comprises:
determining a current adjustment value; and
subtracting the adjustment value from the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, so as to obtain a reduced randomization weight.
5-6. (canceled)
7. The method according to claim 1, wherein the increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test comprises:
determining a current adjustment value; and
adding the adjustment value to the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, so as to obtain an increased randomization weight.
8. The method according to claim 2, wherein the determining a current adjustment value comprises:
using a preset adjustment step as the adjustment value; or
determining the adjustment value in conjunction with the adjustment step and a preset rule.
9. The method according to claim 3, wherein the determining a current adjustment value comprises:
using a preset adjustment step as the adjustment value; or
determining the adjustment value in conjunction with the adjustment step and a preset rule.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively connected with the at least one processor;
wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method for regression test, wherein the method comprises:
when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result, comprising: for any test case with a current test result of pass, if test results of the test case in continuous M tests comprising the current test are determined to be pass, using the test case as a positive to-be-adjusted test case, M being a positive integer; and using a test case with the current test result of fail as a negative to-be-adjusted test case; and
adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test, wherein the higher the randomization weight is, the greater the randomized probability is, and conversely, the smaller the randomized probability is, comprising: reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test; and increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test; and
performing a next regression test after all the test cases are processed until a predetermined code coverage rate requirement is met.
11-12. (canceled)
13. The electronic device according to claim 6,
wherein the reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test comprises: determining a current adjustment value, and subtracting the adjustment value from the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test, so as to obtain a reduced randomization weight.
14-15. (canceled)
16. The electronic device according to claim 6,
wherein the increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test comprises: determining a current adjustment value, and adding the adjustment value to the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test, so as to obtain an increased randomization weight.
17. The electronic device according to claim 7,
wherein the determining a current adjustment value comprises: using a preset adjustment step as the adjustment value, or determining the adjustment value in conjunction with the adjustment step and a preset rule.
18. The electronic device according to claim 8,
wherein the determining a current adjustment value comprises: using a preset adjustment step as the adjustment value, or determining the adjustment value in conjunction with the adjustment step and a preset rule.
19. A non-transitory computer readable storage medium with computer instructions stored thereon, wherein the computer instructions are used for causing a method for regression test, wherein the method comprises:
when execution of any regression test is completed, determining a to-be-adjusted test case from test cases according to a current test result, comprising: for any test case with a current test result of pass, if test results of the test case in continuous M tests comprising the current test are determined to be pass, using the test case as a positive to-be-adjusted test case, M being a positive integer; and using a test case with the current test result of fail as a negative to-be-adjusted test case; and
adjusting a randomization weight corresponding to a data range randomized by the to-be-adjusted test case in a current test, wherein the higher the randomization weight is, the greater the randomized probability is, and conversely, the smaller the randomized probability is, comprising: reducing the randomization weight corresponding to the data range randomized by the positive to-be-adjusted test case in the current test; and increasing the randomization weight corresponding to the data range randomized by the negative to-be-adjusted test case in the current test; and
performing a next regression test after all the test cases are processed until a predetermined code coverage rate requirement is met.
20. (canceled)
US17/884,899 2021-11-16 2022-08-10 Regression test method, electronic device and storage medium Active US11669672B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111353264.1A CN114218069B (en) 2021-11-16 2021-11-16 Regression testing method, regression testing device, electronic equipment and storage medium
CN202111353264.1 2021-11-16

Publications (2)

Publication Number Publication Date
US20230153511A1 true US20230153511A1 (en) 2023-05-18
US11669672B1 US11669672B1 (en) 2023-06-06

Family

ID=80697362

Family Applications (1)

Application Number Title Priority Date Filing Date
US17/884,899 Active US11669672B1 (en) 2021-11-16 2022-08-10 Regression test method, electronic device and storage medium

Country Status (3)

Country Link
US (1) US11669672B1 (en)
EP (1) EP4180968A1 (en)
CN (1) CN114218069B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474562B2 (en) * 2017-09-20 2019-11-12 Salesforce.Com Machine learning based ranking of test cases for software development
US20200394127A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Fault detection using breakpoint value-based fingerprints of failing regression test cases
US11132286B1 (en) * 2020-04-16 2021-09-28 International Business Machines Corporation Dynamic reordering of test case execution
US11263116B2 (en) * 2019-01-24 2022-03-01 International Business Machines Corporation Champion test case generation

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750153B (en) * 2012-06-29 2015-11-25 南京大学 A kind of regression test case collection construction method based on programing change
CN108268366B (en) * 2016-12-30 2021-01-22 腾讯科技(深圳)有限公司 Test case execution method and device
CN110941545A (en) * 2018-09-25 2020-03-31 中国石油化工股份有限公司 Method and device for processing regression test case based on defects and computing equipment
CN111045933B (en) * 2019-11-27 2023-05-12 深圳云天励飞技术有限公司 Regression strategy updating method and device, storage medium and terminal equipment
CN113391992A (en) * 2020-12-03 2021-09-14 腾讯科技(深圳)有限公司 Test data generation method and device, storage medium and electronic equipment
CN112965903A (en) * 2021-03-09 2021-06-15 北京百度网讯科技有限公司 Test method, test device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474562B2 (en) * 2017-09-20 2019-11-12 Salesforce.Com Machine learning based ranking of test cases for software development
US11263116B2 (en) * 2019-01-24 2022-03-01 International Business Machines Corporation Champion test case generation
US20200394127A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Fault detection using breakpoint value-based fingerprints of failing regression test cases
US11132286B1 (en) * 2020-04-16 2021-09-28 International Business Machines Corporation Dynamic reordering of test case execution

Also Published As

Publication number Publication date
CN114218069A (en) 2022-03-22
US11669672B1 (en) 2023-06-06
CN114218069B (en) 2022-09-23
EP4180968A1 (en) 2023-05-17

Similar Documents

Publication Publication Date Title
US20230004721A1 (en) Method for training semantic representation model, device and storage medium
US11861498B2 (en) Method and apparatus for compressing neural network model
US20230195945A1 (en) Integrated circuit chip verification method and apparatus, electronic device, and storage medium
CN113515462A (en) Method, device, equipment and storage medium for testing
CN114330221B (en) Score board implementation method, score board, electronic device and storage medium
US11669672B1 (en) Regression test method, electronic device and storage medium
US20230306048A1 (en) Multi-round dialogue processing method and apparatus, electronic device and storage medium
US20230062632A1 (en) Method and Apparatus for Assigning Task, Electronic Device and Computer Readable Medium
CN114399513B (en) Method and device for training image segmentation model and image segmentation
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN114139605A (en) Distributed model training method, system, device and storage medium
CN113408632A (en) Method and device for improving image classification accuracy, electronic equipment and storage medium
CN114078274A (en) Face image detection method and device, electronic equipment and storage medium
US20230168723A1 (en) Thermal relief implementing method, electronic device and storage medium
CN114218026B (en) Score board generation method and device, electronic equipment and storage medium
US20230004774A1 (en) Method and apparatus for generating node representation, electronic device and readable storage medium
US20230342561A1 (en) Machine translation method and apparatus, device and storage medium
CN113407844B (en) Version recommendation method, device and equipment of applet framework and storage medium
CN113011494B (en) Feature processing method, device, equipment and storage medium
US20240144570A1 (en) Method for generating drivable 3d character, electronic device and storage medium
CN113239296B (en) Method, device, equipment and medium for displaying small program
CN113867634B (en) Data reading method and device, electronic equipment and storage medium
CN113961405B (en) State switching instruction verification method and device, electronic equipment and storage medium
CN113360346B (en) Method and device for training model
US20230206075A1 (en) Method and apparatus for distributing network layers in neural network model

Legal Events

Date Code Title Description
AS Assignment

Owner name: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:JIN, XIN;REEL/FRAME:060770/0060

Effective date: 20211103

FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCF Information on status: patent grant

Free format text: PATENTED CASE