CN115374012A - Automatic regression testing method and device, electronic equipment and storage medium - Google Patents

Automatic regression testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115374012A
CN115374012A CN202211209874.9A CN202211209874A CN115374012A CN 115374012 A CN115374012 A CN 115374012A CN 202211209874 A CN202211209874 A CN 202211209874A CN 115374012 A CN115374012 A CN 115374012A
Authority
CN
China
Prior art keywords
test
script
duration
reserved
test duration
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
CN202211209874.9A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211209874.9A priority Critical patent/CN115374012A/en
Publication of CN115374012A publication Critical patent/CN115374012A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic regression testing method, an automatic regression testing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the estimated production time of a target product, and determining the reserved test duration based on the estimated production time; determining a corresponding test script based on the reserved test duration and the preset test duration, and acquiring a test case set corresponding to the test script; and performing automatic regression testing on the test script based on the test case set, and generating a corresponding test result. Based on the technical scheme, the corresponding test script is automatically determined according to the remaining reserved test duration, the corresponding test case set is called, then the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.

Description

Automatic regression testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an automated regression testing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of computer technology, in order to ensure that an application program or a newly developed function can normally operate, a regression test is often performed on a script in the application program or the newly developed function before the application program or the newly developed function is put into use.
However, in the conventional regression testing method, the effect of ensuring the stability of the program is achieved by verifying the scripts of all the functions, but the cost is high during testing, the testing period is long, and the efficiency of the regression testing is reduced due to the fact that the scripts of all the functions are verified.
Disclosure of Invention
The invention provides an automatic regression testing method, an automatic regression testing device, electronic equipment and a storage medium, which are used for determining a corresponding testing script according to testing duration and carrying out automatic regression testing according to a testing case set corresponding to the testing script, so that the regression testing efficiency is improved.
In a first aspect, the present invention provides an automated regression testing method, including:
acquiring the expected production time of a target product, and determining the reserved test time length based on the expected production time;
determining a corresponding test script based on the reserved test duration and a preset test duration, and acquiring a test case set corresponding to the test script; the preset test duration is the minimum test duration required by the test script;
and carrying out automatic regression testing on the test script based on the test case set, and generating a corresponding test result.
In a second aspect, an embodiment of the present invention further provides an automated regression testing apparatus, where the apparatus includes:
the reserved test duration obtaining module is used for obtaining the predicted production time of the target product and determining the reserved test duration based on the predicted production time;
the test script determining module is used for determining a corresponding test script based on the reserved test duration and the preset test duration and acquiring a test case set corresponding to the test script; the preset test duration is the minimum test duration required by the test script;
and the test module is used for carrying out automatic regression test on the test script based on the test case set and generating a corresponding test result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to implement the automated regression testing method according to any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the automated regression testing method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the expected production time of the target product is obtained, the reserved test time is determined based on the expected production time, the corresponding test script is further determined based on the reserved test time and the preset test time, the test case set corresponding to the test script is obtained, finally, the automatic regression test is carried out on the test script based on the test case set, and the corresponding test result is generated. Based on the technical scheme, the corresponding test script is automatically determined according to the remaining reserved test duration, the corresponding test case set is called, then the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of an automated regression testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an automated regression testing method according to an embodiment of the present invention;
FIG. 3 is a block diagram of an automated regression testing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a schematic flow chart of an automated regression testing method according to an embodiment of the present invention, where the method is applicable to determining a reserved testing duration based on a production time of a current commodity, further determining a corresponding testing script based on the reserved testing duration, and performing an automated regression test.
As shown in fig. 1, the method includes:
s110, obtaining the estimated production time of the target product, and determining the reserved test duration based on the estimated production time.
The target product may be a product that needs to be subjected to regression testing, such as an application to be developed or a new function to be brought online. The estimated production time may be understood as the production time corresponding to the target product. The reserved test duration may be a duration between a current time and an expected commissioning time for completing the test of the target product.
Specifically, when a target product needs to be tested, the estimated production time of the target product can be obtained, and it can be understood that when a product is established, in order to reasonably plan the production time of the product, a predetermined production time is often set in advance to indicate that all development work of the product by a development department needs to be completed before the predetermined production time, the predetermined production time of the target product can be stored in a corresponding database, the predetermined production time corresponding to the target product can be called from the database when needed, and after the predetermined production time is obtained, the reserved test duration can be determined according to the reserved production time and the current time. For example, if the estimated production time is 1/2025 and the current time is 1/2024, the reserved test duration may be one year based on the estimated production time and the current time.
On the basis of the technical scheme, before the step of obtaining the expected production time of the target product and determining the reserved test time length based on the expected production time, the method comprises the following steps: acquiring historical function use data and script importance information of the target product; and determining the type of the test script based on the historical function use data and the script importance degree information, and determining the preset test duration corresponding to the type of the test script.
The test script category comprises a full-scale script, an important script, a key script and a core script. The historical function usage data may be historical operating data for each function in the application for a preset period of time. The script importance level information can be understood as the importance level corresponding to each script in the application program. The test script category may be a type of test script, and the number of scripts in different types of test scripts may be different. The preset test duration may be understood as different test durations set based on different test script categories. The full script can be understood as all scripts in the target product, and the important script, the key script and the core script can be all scripts meeting a certain condition in all scripts of the target product.
Specifically, historical function use data of the target product in a certain time period and script importance information in the target product are obtained, scripts of the target product are divided into scripts of different script categories based on the historical function use data and the script importance information, and corresponding test duration is set according to the different script categories. For example, if the function of the application program is updated, the function use data in three months of the history of the application program and the script importance information of the application program may be obtained, an important script, a key script and a core script are determined according to the function use data in three months of the history of the application program and the script importance information, and corresponding test durations are set for different types of scripts. It can be understood that the number of scripts of the full-volume script is greater than that of the important scripts, the number of scripts of the important scripts is greater than that of script data of the key scripts, and the number of scripts of the key scripts is greater than that of the core scripts.
On the basis of the above technical solution, the determining a test script type based on the historical function usage data and the importance information, and determining a preset test duration corresponding to the test script type includes: all scripts corresponding to the target product are used as the full-scale scripts, and the preset test duration corresponding to the full-scale scripts is set as a first test duration; and determining an important script based on the historical function use data and a first use threshold, and setting the preset test duration of the important script as a second test duration.
Wherein the first test duration is greater than the second test duration. The first usage threshold may be a preset function history usage amount threshold. The first test duration may be a minimum duration required when testing the full amount of scripts, and correspondingly, the second test duration may be a minimum duration required when testing the important scripts.
Specifically, after the related information of the target product is acquired, all scripts of the target product can be directly used as full-volume scripts, and corresponding first test durations are set for the full-volume scripts, it needs to be noted that the test durations are set by testers according to conditions, that is, the test durations of the test scripts corresponding to different target products are different, and the testers need to set the test durations according to actual requirements. Furthermore, scripts meeting the conditions are determined according to the historical function usage data and the first usage threshold, all scripts meeting the conditions are used as important scripts, for example, the first usage threshold can be set to be greater than 1 of the historical usage data in three months, and then scripts corresponding to functions with the historical usage data greater than 1 in three months are used as important scripts.
On the basis of the above technical solution, the determining a test script type based on the historical function usage data and the importance information, and determining a preset test duration corresponding to the test script type includes: determining a key script based on the historical function usage data and a second usage threshold, and setting a preset test duration of the key script as a third test duration; and determining a core script based on the script importance information of the target product, and setting the preset test duration of the core script as a fourth test duration.
And the second test duration is longer than the third test duration, and the third test duration is longer than the fourth test duration. The second usage threshold may be a preset number of times the function is used for a certain length of time. The third test duration may be understood as a minimum test duration of the key script, and correspondingly, the fourth test duration may be understood as a minimum test duration of the core script.
Specifically, historical function usage data of the target product is acquired, a key script is determined based on the historical function usage data and a second usage threshold, for example, a script corresponding to a function with historical function usage data larger than the second usage threshold in three months of the history is used as the key script, and a third test duration corresponding to the key script is set. And based on the script importance degree information of the target product, taking the script with the highest script importance degree information as a core script of the target product, and setting fourth test duration corresponding to the core script. It is understood that the core script ensures the usability of the target product, and in order to ensure the normal operation of the application program, the normal operation of the core script is necessarily ensured, for example, the core script may correspond to the login function of the application program.
And S120, determining a corresponding test script based on the reserved test duration and the preset test duration, and acquiring a test case set corresponding to the test script.
The preset test duration is the minimum test duration required by the test script. A set of test cases may be understood as a set of cases used to perform regression testing on a test script.
Specifically, the scripts capable of being tested are determined according to the reserved test duration and the preset test duration of each type of test script, and a test case set corresponding to the test scripts is obtained. For example, the reserved test duration may be matched with a preset test duration, when the reserved test duration meets the condition of the preset test duration, a script type corresponding to the current preset test duration is selected as a test script, and a test case set corresponding to the current test script type is obtained. It should be noted that the test case sets are used for testing the test scripts to obtain corresponding test results, and the number of scripts included in different test scripts is different, so that different test case sets correspond to different test scripts.
On the basis of the technical scheme, determining a corresponding test script based on the reserved test duration and the preset test duration, and acquiring a test case set corresponding to the test script, wherein the steps of: if the reserved test duration is longer than a first test duration, determining that the test script corresponding to the reserved test duration is a full script, and acquiring a test case set corresponding to the full script; and if the reserved test duration is less than a first test duration and is greater than a second test duration, determining the test script corresponding to the reserved test duration as an important script, and acquiring the test case set corresponding to the important script.
Specifically, the reserved test duration is matched with the preset test duration to determine a test script meeting the test condition, if the reserved test duration is greater than the first test duration, it is indicated that the current reserved test duration is sufficient to complete the test of all scripts in the target product, so that the test script is determined to be a full-volume script, and a test case set corresponding to the full-volume script is obtained to complete the test of the full-volume script based on the test case set. If the reserved test duration is less than the first test duration and the reserved test duration is greater than the second test duration, it is indicated that the current reserved test duration does not meet the test conditions of the full-scale script but meets the test conditions of the important script, so that the test script is determined to be the important script, and the test case set corresponding to the important script is called to complete regression testing on the important script based on the test case set corresponding to the important script.
On the basis of the technical scheme, determining a corresponding test script based on the reserved test duration and the preset test duration, and acquiring a test case set corresponding to the test script, wherein the steps of: if the reserved test duration is less than a second test duration and the reserved test duration is greater than a third test duration, determining a test script corresponding to the reserved test duration as a key script, and acquiring a test case set corresponding to the key script; and if the reserved test time length is less than a third test time length and the reserved test time length is greater than a fourth test time length, determining a test script corresponding to the reserved test time length as a core script, and acquiring a test case set corresponding to the core script.
Specifically, the reserved test duration is matched with the preset test duration to determine a test script meeting the test conditions, if the reserved test duration is smaller than the second test duration and the reserved test duration is greater than the third test duration, it is indicated that the current reserved test duration does not meet the test conditions of the important scripts but meets the test conditions of the key scripts, and therefore the test script is determined to be the key script, and a test case set corresponding to the key script is called to complete regression testing of the key script based on the test case set corresponding to the key script. If the reserved test duration is less than the third test duration and is greater than the fourth test duration, it is indicated that the current reserved test duration does not meet the test conditions of the key scripts but meets the test conditions of the core scripts, so that the test scripts are determined to be the core scripts, and the test case sets corresponding to the core scripts are called to complete regression tests on the core scripts based on the test case sets corresponding to the core scripts.
On the basis of the technical scheme, determining a corresponding test script based on the reserved test duration and the preset test duration, and acquiring a test case set corresponding to the test script, wherein the steps of: if the reserved test time length is less than a fourth test time length, the reserved test time length cannot meet the test requirement, and whether the expected production time needs to be delayed is determined; if the estimated production time needs to be delayed, re-determining the reserved test time length based on the delayed estimated production time; if the projected commissioning time does not need to be postponed, the testing of the target product is immediately ended.
Specifically, if the current reserved test duration is less than the fourth test duration, it indicates that the current condition cannot complete the test on any script, and therefore it is necessary to determine whether to postpone the expected production time of the target product. If the scheduled production time needs to be postponed, the reserved test duration is re-determined based on the postponed scheduled production time, and the test plan is determined based on the re-determined reserved test duration. If the expected production time does not need to be delayed, the regression test is immediately finished.
And S130, carrying out automatic regression testing on the test script based on the test case set, and generating a corresponding test result.
The automated regression testing may be automated regression testing of software, and the software testing may be understood as running a system or an application under a preset condition, and evaluating a running result, where the preset condition includes a normal condition and an abnormal condition. Regression testing may be understood to mean that the old code is modified and then retested to confirm that the modification did not introduce new errors or cause other code errors. The test result can be understood as a test result generated after the test script is tested.
Specifically, the test script is subjected to an automated regression test according to the test case set corresponding to the test script, and a test result corresponding to the test script is generated after the test is completed. For example, if an automated regression test needs to be performed on the core script, it is necessary to ensure that the current reserved test duration is greater than the fourth test duration, and obtain a test case set corresponding to the core script, and then test the core script based on the test case set to generate a corresponding test result.
According to the technical scheme of the embodiment of the invention, the expected production time of the target product is obtained, the reserved test duration is determined based on the expected production time, the corresponding test script can be further determined based on the reserved test duration and the preset test duration, the test case set corresponding to the test script is obtained, the automatic regression test is finally carried out on the test script based on the test case set, and the corresponding test result is generated. Based on the technical scheme, the corresponding test script is automatically determined according to the remaining reserved test duration, the corresponding test case set is called, then the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.
Example two
Fig. 2 is a flowchart of an automated regression testing method according to an embodiment of the present invention. On the basis of the above embodiments, the present embodiment further optimizes the above automated regression testing method. The specific implementation manner can be referred to the technical scheme of the embodiment. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein.
It should be noted that different regression testing strategies correspond to different testing methods, such as a comprehensive regression test, a selective regression test, an index regression test, an automated tool regression test, and the like.
The comprehensive regression test means that no matter how many problems are found, no matter which functions have problems, and which functions have no problems, the test is performed. The advantage of the full regression test is that all functions are verified to ensure that the system has no problems to the maximum extent, but this also brings a very important problem that if the full regression test is performed, the cost of the test will be greatly increased.
The selective regression test means that only the functions with problems are verified during the regression test, and the functions without problems are not tested. For example, if a system has 20 functions, and 10 BUGs are found in the first test round, and the 10 BUGs are found by testing 8 of the function points, then the selective regression test only performs regression testing on the 8 functions. However, there is a problem that when a certain BUG is modified, if the a function is modified and the a function is called by other functions (assuming that the F1 function is correct in the previous test), only the 8 functions having the problem cannot be verified at this time, and it should also be verified whether the F1 function is correct, that is, in addition to verifying the BUGs, the modules that may be affected are also concerned. But there is a problem as to how can the test engineer know which functions may be affected? Therefore, it is necessary for the development engineer to write clearly when repairing the BUG, which is caused by what reason, how to modify the BUG and the possible influence, so that the selective regression test needs to verify the influence of the modified BUG on other functions in addition to the current BUG.
The index method regression test refers to that each regression test tests a certain proportion of test cases, for example, a case library is 500 cases in total, each regression test only regresses 60% of cases, and this method is not preferable because it is not specified which 60% of cases are regressed, so that it may happen that a test engineer intentionally regresses some irrelevant test cases, and thus the quality cannot be guaranteed.
Therefore, in order to improve the efficiency and accuracy of the test, it is necessary to improve the conventional test method and adopt a new automated regression test method, and the automated regression test method provided in this embodiment includes the following steps:
acquiring a reserved test duration: specifically, before each automated regression test is executed, the expected commissioning time of the submitted test and the target product needs to be confirmed, the reserved test duration is determined according to the expected commissioning time, and then the corresponding test script is determined based on the reserved test duration.
It should be noted that the scripts may be classified according to the historical use data of the functions in the target product and the importance degree of the scripts, and may be divided into a full-volume script, an important script, a key script, and a core script, specifically, the full-volume script may be a regression test case set covering all product transactions, and the test time required for all the scripts of the script set to be completely executed is at least the first test duration. The important script can be a function with the function usage amount larger than 1 in nearly three months, and the time required for completely executing all scripts of the script set is at least the second test time length. The key scripts can be understood as case sets with higher transaction volume and more important system, and the time required for completely executing all the scripts of the script set is at least the third test time. The core script may be understood to ensure that a few scripts are available to the system, all of which takes at least a fourth test duration to complete all scripts of the script set.
Determining the script type to be tested: analyzing and judging whether the reserved test time length is greater than or equal to a first test time length (the minimum time required by testing the full script), if so, testing the full script, if not, judging whether the reserved test time length is greater than or equal to a second test time length (the minimum time required by testing the important script), if so, testing the important script, if not, judging whether the reserved test time length is greater than or equal to a third test time length (the minimum time required by testing the key script), if so, testing the key script, otherwise, testing the core script.
According to the technical scheme of the embodiment of the invention, the expected production time of the target product is obtained, the reserved test duration is determined based on the expected production time, the corresponding test script can be further determined based on the reserved test duration and the preset test duration, the test case set corresponding to the test script is obtained, the automatic regression test is finally carried out on the test script based on the test case set, and the corresponding test result is generated. Based on the technical scheme, the corresponding test script is automatically determined according to the remaining reserved test duration, the corresponding test case set is called, then the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.
According to the technical scheme of the embodiment of the invention, the expected production time of the target product is obtained, the reserved test time is determined based on the expected production time, the corresponding test script is further determined based on the reserved test time and the preset test time, the test case set corresponding to the test script is obtained, finally, the automatic regression test is carried out on the test script based on the test case set, and the corresponding test result is generated. Based on the technical scheme, the corresponding test script is automatically determined according to the remaining reserved test duration, the corresponding test case set is called, then the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.
EXAMPLE III
Fig. 3 is a block diagram of an automated regression testing apparatus according to an embodiment of the present invention. The device includes: a reserved test duration obtaining module 310, a test script determining module 320, and a testing module 330.
A reserved test duration obtaining module 310, configured to obtain a predicted commissioning time of a target product, and determine a reserved test duration based on the predicted commissioning time;
a test script determining module 320, configured to determine a corresponding test script based on the reserved test duration and a preset test duration, and obtain a test case set corresponding to the test script; the preset test duration is the minimum test duration required by the test script;
the testing module 330 is configured to perform an automated regression test on the testing script based on the testing case set, and generate a corresponding testing result.
On the basis of the technical scheme, the device comprises:
the test duration setting module is used for acquiring historical function use data and script importance information of the target product; determining the type of a test script based on the historical function use data and the script importance degree information, and determining a preset test duration corresponding to the type of the test script; the test script category comprises a full-scale script, an important script, a key script and a core script.
On the basis of the technical scheme, the test duration setting module is used for taking all scripts corresponding to the target product as the full-scale scripts and setting the preset test duration corresponding to the full-scale scripts as a first test duration; determining an important script based on the historical function use data and a first use threshold, and setting a preset test duration of the important script as a second test duration; wherein the first test duration is greater than the second test duration.
On the basis of the technical scheme, the test duration setting module is used for determining a key script based on the historical function use data and a second use threshold, and setting the preset test duration of the key script as a third test duration; determining a core script based on the script importance information of the target product, and setting the preset test duration of the core script as a fourth test duration; and the second test duration is longer than the third test duration, and the third test duration is longer than the fourth test duration.
On the basis of the technical scheme, the test script determining module is used for determining that the test script corresponding to the reserved test duration is a full-scale script and acquiring a test case set corresponding to the full-scale script if the reserved test duration is greater than a first test duration; and if the reserved test duration is less than a first test duration and is greater than a second test duration, determining the test script corresponding to the reserved test duration as an important script, and acquiring the test case set corresponding to the important script.
On the basis of the technical scheme, the test script determining module is used for determining that the test script corresponding to the reserved test duration is the key script and acquiring the test case set corresponding to the key script if the reserved test duration is less than a second test duration and the reserved test duration is greater than a third test duration; and if the reserved test time length is less than a third test time length and the reserved test time length is greater than a fourth test time length, determining a test script corresponding to the reserved test time length as a core script, and acquiring a test case set corresponding to the core script.
On the basis of the technical scheme, the test script determining module is used for determining whether the predicted production time needs to be delayed or not if the reserved test time cannot meet the test requirement if the reserved test time is shorter than a fourth test time; if the predicted production time needs to be delayed, re-determining the reserved test time length based on the delayed predicted production time; if the projected commissioning time does not need to be postponed, the testing of the target product is immediately ended.
According to the technical scheme of the embodiment of the invention, the expected production time of the target product is obtained, the reserved test time is determined based on the expected production time, the corresponding test script is further determined based on the reserved test time and the preset test time, the test case set corresponding to the test script is obtained, finally, the automatic regression test is carried out on the test script based on the test case set, and the corresponding test result is generated. Based on the technical scheme, the corresponding test script is automatically determined according to the residual reserved test duration, the corresponding test case set is called, the automatic regression test of the script is completed based on the test case set, and the efficiency of the regression test is improved.
The automated regression testing device provided by the embodiment of the invention can execute the automated regression testing method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are also only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the embodiments of the present disclosure.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 11 performs the various methods and processes described above, such as automated regression testing methods.
In some embodiments, the automated regression testing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the automated regression testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the automated regression testing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An automated regression testing method, comprising:
acquiring the estimated production time of a target product, and determining the reserved test duration based on the estimated production time;
determining a corresponding test script based on the reserved test duration and a preset test duration, and acquiring a test case set corresponding to the test script; the preset test duration is the minimum test duration required by the test script;
and carrying out automatic regression testing on the test script based on the test case set, and generating a corresponding test result.
2. The method of claim 1, wherein before obtaining the expected commissioning time of the target product and determining the reserved test duration based on the expected commissioning time, the method comprises:
acquiring historical function use data and script importance information of the target product;
determining the type of a test script based on the historical function use data and the script importance degree information, and determining a preset test duration corresponding to the type of the test script; the test script categories include full-volume scripts, important scripts, key scripts and core scripts.
3. The method of claim 2, wherein determining a test script category based on the historical functional usage data and the importance information, and determining a preset test duration corresponding to the test script category comprises:
all scripts corresponding to the target product are used as the full-scale scripts, and the preset test duration corresponding to the full-scale scripts is set as a first test duration;
determining an important script based on the historical function use data and a first use threshold, and setting a preset test duration of the important script as a second test duration; wherein the first test duration is greater than the second test duration.
4. The method of claim 2, wherein determining a test script category based on the historical functional usage data and the importance information, and determining a preset test duration corresponding to the test script category comprises:
determining a key script based on the historical function use data and a second use threshold, and setting a preset test duration of the key script as a third test duration;
determining a core script based on the script importance information of the target product, and setting the preset test duration of the core script as a fourth test duration; and the second test duration is longer than the third test duration, and the third test duration is longer than the fourth test duration.
5. The method of claim 1, wherein determining a corresponding test script based on the reserved test duration and a preset test duration, and obtaining a set of test cases corresponding to the test script comprises:
if the reserved test duration is longer than a first test duration, determining that the test script corresponding to the reserved test duration is a full script, and acquiring a test case set corresponding to the full script;
and if the reserved test duration is less than a first test duration and the reserved test duration is greater than a second test duration, determining the test script corresponding to the reserved test duration as an important script, and acquiring the test case set corresponding to the important script.
6. The method of claim 1, wherein determining a corresponding test script based on the reserved test duration and a preset test duration, and obtaining a set of test cases corresponding to the test script comprises:
if the reserved test duration is less than a second test duration and the reserved test duration is greater than a third test duration, determining a test script corresponding to the reserved test duration as a key script, and acquiring a test case set corresponding to the key script;
and if the reserved test time length is less than a third test time length and the reserved test time length is greater than a fourth test time length, determining a test script corresponding to the reserved test time length as a core script, and acquiring a test case set corresponding to the core script.
7. The method of claim 1, wherein determining a corresponding test script based on the reserved test duration and a preset test duration, and obtaining a set of test cases corresponding to the test script comprises:
if the reserved test time length is less than a fourth test time length, the reserved test time length cannot meet the test requirement, and whether the expected production time needs to be delayed is determined;
if the estimated production time needs to be delayed, re-determining the reserved test time length based on the delayed estimated production time;
if the projected commissioning time does not need to be postponed, the testing of the target product is immediately ended.
8. An automated regression testing apparatus, comprising:
the reserved test duration acquisition module is used for acquiring the estimated production time of the target product and determining the reserved test duration based on the estimated production time;
the test script determining module is used for determining a corresponding test script based on the reserved test duration and the preset test duration and acquiring a test case set corresponding to the test script; the preset test duration is the minimum test duration required by the test script;
and the test module is used for carrying out automatic regression test on the test script based on the test case set and generating a corresponding test result.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the automated regression testing method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon computer instructions for causing a processor to, when executed, implement the automated regression testing method of any one of claims 1-7.
CN202211209874.9A 2022-09-30 2022-09-30 Automatic regression testing method and device, electronic equipment and storage medium Pending CN115374012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211209874.9A CN115374012A (en) 2022-09-30 2022-09-30 Automatic regression testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211209874.9A CN115374012A (en) 2022-09-30 2022-09-30 Automatic regression testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115374012A true CN115374012A (en) 2022-11-22

Family

ID=84073435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211209874.9A Pending CN115374012A (en) 2022-09-30 2022-09-30 Automatic regression testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115374012A (en)

Similar Documents

Publication Publication Date Title
CN110134598B (en) Batch processing method, device and system
CN115576828A (en) Test case generation method, device, equipment and storage medium
US9612944B2 (en) Method and system for verifying scenario based test selection, execution and reporting
CN116702668A (en) Regression testing method and device, electronic equipment and storage medium
CN115437961A (en) Data processing method and device, electronic equipment and storage medium
CN115374012A (en) Automatic regression testing method and device, electronic equipment and storage medium
CN115061921A (en) Automatic test method, device, electronic equipment and readable storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN107229487B (en) Code processing method and device
CN113836016B (en) Writing interface storage quality testing method, system, electronic equipment and storage medium
CN115098405B (en) Software product evaluation method and device, electronic equipment and storage medium
CN117648252A (en) Function test method and device for software application, electronic equipment and storage medium
CN115456558A (en) Method and device for online project service, electronic equipment and storage medium
CN116627820A (en) Data creation method, device, equipment and medium
CN115599682A (en) Environment availability detection method, device, equipment and storage medium
CN116955189A (en) Automatic testing method, device and equipment for user interface and storage medium
CN116303019A (en) Test tracing method, device, equipment and medium
CN116909925A (en) Test flow management method and management system based on agile iteration
CN116150024A (en) Method and device for evaluating program to be tested and electronic equipment
CN115543748A (en) Signal testing method, device, equipment and storage medium
CN116225390A (en) Warehouse-in method, device, equipment and medium for software development files
CN115757097A (en) Test case generation method and device, electronic equipment and storage medium
CN115391227A (en) Fault testing method, device, equipment and medium based on distributed system
CN117609069A (en) Test case review method, device, equipment and storage medium
CN115599689A (en) Test logic display method, device, equipment 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