CN115061932A - Regression testing method, device and equipment - Google Patents
Regression testing method, device and equipment Download PDFInfo
- Publication number
- CN115061932A CN115061932A CN202210753379.8A CN202210753379A CN115061932A CN 115061932 A CN115061932 A CN 115061932A CN 202210753379 A CN202210753379 A CN 202210753379A CN 115061932 A CN115061932 A CN 115061932A
- Authority
- CN
- China
- Prior art keywords
- test
- interface
- preset
- information
- historical
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 381
- 238000000034 method Methods 0.000 claims abstract description 26
- 230000004044 response Effects 0.000 claims description 49
- 238000012795 verification Methods 0.000 claims description 27
- 238000012545 processing Methods 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010998 test method Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
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 application provides a regression testing method, device and equipment. The method comprises the following steps: acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing; determining a use case list according to the request information set; and performing regression testing on the items to be processed according to the use case list, and generating a regression testing report. The method realizes the selective emphasis on regression testing of the key function interface of the project to be processed, saves the time and cost of regression testing, and further improves the online timeliness and the online quality of the project.
Description
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a regression testing method, device, and apparatus.
Background
In an agile project, the demand can be split into a plurality of small demands so as to rapidly develop, iterate and reach the line of the project. The basic requirement of iteration is that the new requirement cannot affect the function of the previous requirement, so that while testing is performed on the implementation point of the new requirement, regression testing needs to be performed on the possibly affected associated requirement or function to ensure that the function can be normally implemented.
In the prior art, after all the function requirements are iterated, a regression test is performed uniformly by using pre-stored test cases.
However, in the prior art, the heavy-point regression testing of the correlation and key functions cannot be realized, and the regression testing of all the functions of the project is long in time consumption and high in cost, so that the online timeliness and the online quality of the project are influenced.
Disclosure of Invention
The application provides a regression testing method, device and equipment, which are used for solving the problems that the relevance and key function importance regression testing cannot be carried out, and the online timeliness and online quality of a project are influenced.
In a first aspect, the present application provides a regression testing method, the method comprising:
acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing;
determining a use case list according to the request information set, wherein the use case list comprises at least one test use case;
and performing regression testing on the item to be processed according to the use case list, and generating a regression testing report.
In an optional implementation manner, the historical test information of each preset interface includes interface name information of the preset interface, historical request information of the preset interface, and historical response information of the preset interface; each test case comprises a request parameter field of the test case and a verification field of the test case.
In an optional implementation manner, determining a use case list according to the request information set includes:
analyzing historical test information of each preset interface, and determining interface name information of the corresponding preset interface, historical request information of the preset interface and historical response information of the preset interface;
determining a target interface corresponding to the test case according to interface name information of a preset interface; determining a request parameter field of the test case according to the historical request information of the preset interface; and determining the verification fields of the test cases according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
In an optional implementation manner, performing regression testing on the to-be-processed item according to the use case list, and generating a regression testing report includes:
performing regression testing on the item to be processed according to each test case, and determining a regression testing result of the item to be processed under each test case;
and generating a regression test report according to the test result corresponding to each test case.
In an optional implementation manner, performing a regression test on the to-be-processed item according to each test case, and determining a regression test result of the to-be-processed item under each test case includes:
performing regression testing on a corresponding target interface according to the request parameter field of each test case, and receiving request response information of the target interface;
if the request response information is determined to be consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test;
and if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
In an optional embodiment, the method further comprises:
and testing the item to be processed based on preset agent software, and acquiring the request information set, wherein the preset agent software is provided with a preset running script, and the preset running script is used for acquiring historical test information of each preset interface of the item to be processed.
In an optional embodiment, the method further comprises:
and optimizing the project to be processed according to the regression test report.
In a second aspect, the present application provides a regression test apparatus, the apparatus comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a request information set of a project to be processed, the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface which needs to be subjected to regression test on the project to be processed;
a determining unit, configured to determine a use case list according to the request information set, where the use case list includes at least one test use case;
and the first processing unit is used for performing regression testing on the item to be processed according to the use case list and generating a regression testing report.
In an optional implementation manner, the historical test information of each preset interface includes interface name information of the preset interface, historical request information of the preset interface, and historical response information of the preset interface; each test case comprises a request parameter field of the test case and a verification field of the test case.
In an optional embodiment, the determining unit includes:
the first determining subunit is configured to analyze historical test information of each preset interface, and determine interface name information of the corresponding preset interface, historical request information of the preset interface, and historical response information of the preset interface;
the second determining subunit is used for determining a target interface corresponding to the test case according to the interface name information of the preset interface; determining a request parameter field of the test case according to the historical request information of the preset interface; and determining the verification fields of the test cases according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
In an alternative embodiment, the first processing unit includes:
the third determining subunit is used for performing regression testing on the item to be processed according to each test case, and determining a regression testing result of the item to be processed under each test case;
and the fourth determining subunit is used for generating a regression test report according to the test result corresponding to each test case.
In an optional embodiment, the third determining subunit is specifically configured to:
performing regression testing on a corresponding target interface according to the request parameter field of each test case, and receiving request response information of the target interface;
if the request response information is determined to be consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test;
and if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
In an alternative embodiment, the apparatus further comprises:
and the second acquisition unit is used for testing the item to be processed based on preset agent software and acquiring the request information set, wherein the preset agent software is provided with a preset running script, and the preset running script is used for acquiring historical test information of each preset interface of the item to be processed.
In an alternative embodiment, the apparatus further comprises:
and the second processing unit is used for optimizing the item to be processed according to the regression test report.
In a third aspect, the present application provides an electronic device, comprising: a memory, a processor;
a memory for storing computer execution instructions;
a processor configured to read the computer-executable instructions stored in the memory and execute the regression testing method according to the computer-executable instructions in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the regression testing method according to the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the regression testing method as described in the first aspect.
The regression testing method, device and equipment provided by the application comprise the following steps: acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing; determining a use case list according to the request information set; and performing regression testing on the items to be processed according to the use case list, and generating a regression testing report. The method realizes the selective emphasis on regression testing of the key function interface of the project to be processed, saves the time and cost of regression testing, and further improves the online timeliness and the online quality of the project.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a regression testing method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another regression testing method provided in the embodiments of the present application;
fig. 3 is a schematic structural diagram of a regression testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a regression testing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a block diagram illustrating a terminal device according to an example embodiment.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In an agile project, a demand can be split into a plurality of small demands, namely a plurality of sub-projects, so as to rapidly develop, iterate and bring on-line the project. The basic requirement of iteration is that the new requirement cannot influence the function of the last requirement. In terms of design, the realized requirements should not be influenced because of no change, but actually, because of many and time-tight requirements, when a developer realizes a new requirement, the developer has insufficient time to consider whether the original functions are influenced, and a tester has no time to perform sufficient tests or only tests aiming at the realization points of the new requirement, and has no time to test the related modules or functions which are possibly influenced, so that after the new requirement is developed, the existing required function modules are possibly influenced, and the problem is easily exposed to the online environment to real users. And in the agile project, the more the requirements with similar ranks are influenced mutually. Assuming that the requirement 1, the requirement 2 and the requirement 3 are successively realized on the same day, if the requirement 3 is realized and then influences other requirements, the influence on the requirement 1 and the requirement 2 is likely to be caused. Therefore, while testing the implementation points of the new requirements, regression testing needs to be performed on the possibly affected associated requirements or functions to ensure that the functions can be implemented normally.
In the prior art, each iteration can only verify the function of the iteration, or after all the function requirements are iterated, the regression test is uniformly performed by using the pre-stored test cases.
However, in the prior art, each iteration only verifies the function of the iteration, which leads to easy missing test; and if the regression test is uniformly carried out by using the pre-stored test cases, the heavy-point regression test of the correlation and key functions cannot be realized, the time consumption for carrying out the regression test on all the functions of the project is long, the cost is high, and the online timeliness and the online quality of the project can be influenced.
The regression testing method provided by the application aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a regression testing method according to an embodiment of the present application, and as shown in fig. 1, the method includes:
101. acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing.
Illustratively, a request information set of a to-be-processed item to be regression tested is obtained, wherein the request information set is pre-stored and includes historical test information of at least one preset interface of the to-be-processed item, and each preset interface is a functional interface of the to-be-processed item to be regression tested. For example, if the to-be-processed item is a new user registered on an application program, the preset interface may be one or more of an interface for acquiring registered page information, an interface for automatically acquiring a mobile phone number of the user, and an interface for submitting the registration according to the requirement of the regression test, and the request information set may include one or more of interface request information corresponding to the interface for acquiring registered page information, interface request information corresponding to the interface for automatically acquiring a mobile phone number of the user, and interface request information corresponding to the interface for submitting the registration.
102. And determining a use case list according to the request information set, wherein the use case list comprises at least one test case.
Illustratively, a case list for performing regression testing on the item to be processed is determined according to the acquired request information set, for example, a preset interface for performing regression testing is called, so that after the back-end service receives the interface request, historical test information of the preset interface in the request information set is analyzed and extracted, an interface needing regression testing and testing content thereof are determined according to the historical test information, and then the case list is assembled and generated. The use case list may include one test case, or may include a plurality of test cases.
103. And performing regression testing on the items to be processed according to the use case list, and generating a regression testing report.
Illustratively, according to the use case list of the items to be processed, each preset interface is controlled to execute the code logic of the corresponding test use case in the use case list, that is, regression testing is performed on the items to be processed, and a regression test report is generated according to the regression test result of each test use case.
In this embodiment, the following steps are performed: acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing; determining a use case list according to the request information set; and performing regression testing on the items to be processed according to the use case list, and generating a regression testing report. The method realizes the selective emphasis on regression testing of the key function interface of the project to be processed, saves the time and cost of regression testing, and further improves the online timeliness and the online quality of the project.
Fig. 2 is a flowchart of another regression testing method provided in an embodiment of the present application, and as shown in fig. 2, the method includes:
201. and testing the item to be processed based on the preset proxy software, and acquiring a request information set, wherein the preset proxy software is provided with a preset running script which is used for acquiring historical test information of each preset interface of the item to be processed.
Illustratively, the test terminal tests the item to be processed based on preset agent software, and obtains a request information set of the item to be processed in the test process, wherein the request information set includes historical test information of at least one preset interface of the item to be processed, each preset interface is a functional interface of the item to be processed, which needs to be subjected to a regression test, the preset agent software has a preset running script, and the preset running script is used for obtaining the historical test information of each preset interface of the item to be processed.
In one example, a network of a test terminal is set to be in a connection proxy mode, a preset proxy software is a proxy server established between the test terminal and a server, and is capable of monitoring a request sent by the test terminal and a response result returned by the server, editing an operation script of the preset proxy software in advance, adding a script code of "saving a request of a preset Uniform Resource Locator (URL) into a local file" to an original operation script, so that the proxy software can judge whether the request meets URL matching when capturing each request, and if so, writing information of the request into the local file, that is, historical test information of a preset interface needing regression testing can be saved into the local file, wherein different preset interfaces have unique and specific URLs.
In one example, the implementation logic for the "save request specifying URL to local file" script code is: (1) screening and judging each interface request, judging whether the request is matched with the specified URL, saving historical test information (request header information, request body information, response header information and response body information) into a local file for the request which is successfully matched, and not performing any processing for the request which is unsuccessfully matched.
In one example, in an agile project, when a plurality of sub-projects are subjected to routine testing, a request information set of each sub-project can be obtained according to agent software, wherein the request information set is specific to different sub-projects and comprises historical testing information of different functional interfaces. And then after the new project test is finished, the request information set of the previous sub project can be called at any time according to actual needs to perform regression test. For some requests for modifying data, before performing the regression test, the historical test information needs to be restored, so that the regression test can be started based on the initial data, and the test case can be successfully executed. The key to this sub-project scenario, such as "register a new user", is that the "submit registration interface" can be processed normally, and therefore the recorded historical test information of the interface is also stored for use in subsequent regression tests. However, for the same user information, it can only be registered once, otherwise, it is registered repeatedly, from the viewpoint of interface invocation, the same interface parameter can only be used once, otherwise, the interface will process error report, such as returning response information that the user has been registered repeatedly. Therefore, if it is desired that the "submit registration interface" be successfully regression tested, the historical test information needs to be recovered before the regression test is initiated, in this example, the user information stored in the database is deleted, and the user is considered to be unregistered.
In one example, since many requests need to carry valid login state information to request successfully, and the validity time of the login state information is generally within 1 day, the regression test is preferably completed within the day without day-to-day interaction. If it is necessary to cross the day, the effective time of the login state information should be prolonged. In fact, for agile projects, since multiple requirements are often fulfilled during the day, the corresponding regression tests should also be completed within the day in order to find and solve the problem as soon as possible.
202. Acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression testing.
In one example, the historical test information of each preset interface includes interface name information of the preset interface, historical request information of the preset interface, and historical response information of the preset interface.
Illustratively, a request information set of a to-be-processed item to be regression tested is obtained, wherein the request information set is pre-stored and includes historical test information of at least one preset interface of the to-be-processed item, and each preset interface is a functional interface of the to-be-processed item to be regression tested. The historical test information of each preset interface comprises interface name information of the preset interface, historical request information of the preset interface and historical response information of the preset interface, and the historical request information comprises a request head and a request body; the historical response information includes a response header and a response body. For example, if a new user is registered in an application program in the scenario of the to-be-processed project, the preset interface may be one or more of an interface for acquiring registered page information, an interface for automatically acquiring a mobile phone number of the user, and an interface for submitting registration according to the requirement of the regression test, and the request information set may include one or more of interface request information for acquiring registered page information, interface request information for automatically acquiring a mobile phone number of the user, and interface request information for submitting registration.
203. And determining a use case list according to the request information set, wherein the use case list comprises at least one test case, and each test case comprises a request parameter field of the test case and a verification field of the test case.
In one example, step 203 comprises the steps of:
analyzing the historical test information of each preset interface, and determining the corresponding interface name information of the preset interface, the historical request information of the preset interface and the historical response information of the preset interface.
Determining a target interface corresponding to the test case according to interface name information of a preset interface; determining a request parameter field of a test case according to historical request information of a preset interface; and determining a verification field of the test case according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
Illustratively, a case list for performing regression testing on the item to be processed is determined according to the acquired request information set, for example, a preset interface for performing regression testing is called, so that after the back-end service receives the interface request, historical test information of the preset interface in the request information set is analyzed and extracted, an interface needing regression testing and testing content thereof are determined according to the historical test information, and then the case list is assembled and generated. The use case list may include one test case, or may include a plurality of test cases.
In one example, historical test information of each preset interface of the item to be processed in the request information set is analyzed, and interface name information, historical request information and historical response information of each preset interface of the item to be processed are obtained; determining a target interface corresponding to the test case according to interface name information of a preset interface; determining a request parameter field corresponding to a test case according to historical request information of a preset interface; and determining a verification field of the test case according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case. Wherein, the request parameter field of the test case.
204. And performing regression testing on the item to be processed according to each test case, and determining a regression testing result of the item to be processed under each test case.
In one example, step 204 includes the steps of:
and performing regression testing on the corresponding target interface according to the request parameter field of each test case, and receiving the request response information of the target interface.
And if the request response information is consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test.
And if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
Illustratively, according to each test case of the item to be processed, code logic of the corresponding test case in each preset interface execution case list is controlled, that is, regression testing is performed on the item to be processed, and a regression testing result of each preset interface in the item to be processed under the corresponding test case is determined.
In one example, regression testing is performed on a corresponding target interface according to a request parameter field of each test case, and request response information of the target interface is received; if the request response information is consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test; and if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
205. And generating a regression test report according to the test result corresponding to each test case.
Illustratively, the regression test result of each preset interface in the to-be-processed project under the corresponding test case is read, and a test report is generated. The test report may further include test analysis content such as expected results and actual results of the test.
206. And optimizing the items to be processed according to the regression test report.
Illustratively, according to the regression test report, optimizing and adjusting the functional interface which does not pass the regression test or the functional interface whose regression test result is not ideal in the project to be processed.
In this embodiment, historical test information of a functional interface of each project, which needs to be subjected to regression testing, is pre-stored through a preset running script based on preset agent software, test cases are generated in a targeted manner according to the historical test information, regression testing is performed on the project to be processed according to the test cases, a regression test report is generated, and optimization processing is performed on the project to be processed based on the regression test report. The process enables the regression test to be more flexible and convenient to realize, can quickly realize the selective emphasis regression test of the key function interface of the project to be processed, saves the time and cost of the regression test, and improves the online timeliness and the online quality of the project.
Fig. 3 is a schematic structural diagram of a regression testing apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus includes:
the first obtaining unit 31 is configured to obtain a request information set of the to-be-processed item, where the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface on which a regression test needs to be performed on the to-be-processed item.
The determining unit 32 is configured to determine a use case list according to the request information set, where the use case list includes at least one test case.
The first processing unit 33 is configured to perform a regression test on the item to be processed according to the use case list, and generate a regression test report.
Fig. 4 is a schematic structural diagram of a regression testing apparatus according to an embodiment of the present application, and based on the embodiment shown in fig. 3, as shown in fig. 4, the apparatus includes:
in one example, the historical test information of each preset interface comprises interface name information of the preset interface, historical request information of the preset interface and historical response information of the preset interface; each test case includes a request parameter field of the test case and a verification field of the test case.
In one example, the determining unit 32 includes:
the first determining subunit 321 is configured to analyze historical test information of each preset interface, and determine interface name information of the corresponding preset interface, historical request information of the preset interface, and historical response information of the preset interface.
A second determining subunit 322, configured to determine, according to the interface name information of the preset interface, a target interface corresponding to the test case; determining a request parameter field of a test case according to historical request information of a preset interface; and determining a verification field of the test case according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
In one example, the first processing unit 33 includes:
the third determining subunit 331 is configured to perform a regression test on the item to be processed according to each test case, and determine a regression test result of the item to be processed under each test case.
The fourth determining subunit 332 is configured to generate a test report according to the test result corresponding to each test case.
In one example, the third determining subunit 331 is specifically configured to:
and performing regression testing on the corresponding target interface according to the request parameter field of each test case, and receiving the request response information of the target interface.
And if the request response information is consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test.
And if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
In one example, the apparatus further comprises:
the second obtaining unit 41 is configured to test the item to be processed based on a preset proxy software, and obtain the request information set, where the preset proxy software has a preset running script, and the preset running script is used to obtain historical test information of each preset interface of the item to be processed.
In one example, the apparatus further comprises:
and the second processing unit 42 is configured to perform optimization processing on the item to be processed according to the regression test report.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 5, the electronic device includes: memory 51, processor 52.
A memory 51 for storing computer execution instructions;
and a processor 52 for reading the computer-executable instructions stored in the memory 51 and executing the regression testing method provided in the above embodiment according to the computer-executable instructions in the memory 51.
Fig. 6 is a block diagram illustrating a terminal device, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, etc., according to one exemplary embodiment.
The apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The apparatus 800 may access a wireless network based on a communication standard, such as wireless communication technology (WiFi), second Generation mobile communication technology (2G) or third Generation mobile communication technology (3rd-Generation, 3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Embodiments of the present application also provide a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method provided by the above embodiments.
An embodiment of the present application further provides a computer program product, where the computer program product includes: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (17)
1. A regression testing method, said method comprising:
acquiring a request information set of a project to be processed, wherein the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface of the project to be processed, which needs to be subjected to regression test;
determining a use case list according to the request information set, wherein the use case list comprises at least one test use case;
and performing regression testing on the item to be processed according to the use case list, and generating a regression testing report.
2. The method according to claim 1, wherein the historical test information of each preset interface comprises interface name information of the preset interface, historical request information of the preset interface and historical response information of the preset interface; each test case comprises a request parameter field of the test case and a verification field of the test case.
3. The method of claim 2, wherein determining a list of use cases from the set of request information comprises:
analyzing historical test information of each preset interface, and determining interface name information of the corresponding preset interface, historical request information of the preset interface and historical response information of the preset interface;
determining a target interface corresponding to the test case according to interface name information of a preset interface; determining a request parameter field of the test case according to the historical request information of the preset interface; and determining the verification fields of the test cases according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
4. The method of claim 3, wherein performing regression testing on the to-be-processed item according to the use case list and generating a regression test report comprises:
performing regression testing on the item to be processed according to each test case, and determining a regression testing result of the item to be processed under each test case;
and generating a regression test report according to the test result corresponding to each test case.
5. The method of claim 4, wherein performing regression testing on the item to be processed according to each test case, and determining the regression testing result of the item to be processed under each test case comprises:
performing regression testing on a corresponding target interface according to the request parameter field of each test case, and receiving request response information of the target interface;
if the request response information is determined to be consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test;
and if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
6. The method according to any one of claims 1-5, further comprising:
and testing the item to be processed based on preset agent software, and acquiring the request information set, wherein the preset agent software is provided with a preset running script, and the preset running script is used for acquiring historical test information of each preset interface of the item to be processed.
7. The method according to any one of claims 1-5, further comprising:
and optimizing the project to be processed according to the regression test report.
8. A regression testing apparatus, characterized in that the apparatus comprises:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a request information set of a project to be processed, the request information set comprises historical test information of at least one preset interface, and each preset interface is a functional interface which needs to be subjected to regression test on the project to be processed;
a determining unit, configured to determine a use case list according to the request information set, where the use case list includes at least one test use case;
and the first processing unit is used for performing regression testing on the item to be processed according to the use case list and generating a regression testing report.
9. The apparatus according to claim 8, wherein the historical test information of each of the preset interfaces includes interface name information of the preset interface, historical request information of the preset interface, and historical response information of the preset interface; each test case comprises a request parameter field of the test case and a verification field of the test case.
10. The apparatus of claim 9, wherein the determining unit comprises:
the first determining subunit is configured to analyze historical test information of each preset interface, and determine interface name information of the corresponding preset interface, historical request information of the preset interface, and historical response information of the preset interface;
the second determining subunit is used for determining a target interface corresponding to the test case according to the interface name information of the preset interface; determining a request parameter field of the test case according to the historical request information of the preset interface; and determining the verification fields of the test cases according to the historical response information of the preset interfaces, wherein the historical test information of each preset interface corresponds to at least one test case.
11. The apparatus of claim 10, wherein the first processing unit comprises:
the third determining subunit is used for performing regression testing on the item to be processed according to each test case, and determining a regression testing result of the item to be processed under each test case;
and the fourth determining subunit is used for generating a regression test report according to the test result corresponding to each test case.
12. The apparatus according to claim 11, wherein the third determining subunit is specifically configured to:
performing regression testing on a corresponding target interface according to the request parameter field of each test case, and receiving request response information of the target interface;
if the request response information is determined to be consistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a pass test;
and if the request response information is determined to be inconsistent with the verification field of the test case, determining that the regression test result of the target interface under the test case is a failed test.
13. The apparatus of any one of claims 8-12, further comprising:
and the second acquisition unit is used for testing the item to be processed based on preset agent software and acquiring the request information set, wherein the preset agent software is provided with a preset running script, and the preset running script is used for acquiring historical test information of each preset interface of the item to be processed.
14. The apparatus of any one of claims 8-12, further comprising:
and the second processing unit is used for optimizing the item to be processed according to the regression test report.
15. An electronic device, characterized in that the electronic device comprises: a memory, a processor;
a memory for storing computer execution instructions;
a processor for reading computer-executable instructions stored in the memory and executing the regression test method of any one of claims 1-7 in accordance with the computer-executable instructions in the memory.
16. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement the regression testing method of any one of claims 1-7.
17. A computer program product, characterized in that it comprises a computer program which, when being executed by a processor, implements the regression testing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210753379.8A CN115061932A (en) | 2022-06-29 | 2022-06-29 | Regression testing method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210753379.8A CN115061932A (en) | 2022-06-29 | 2022-06-29 | Regression testing method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115061932A true CN115061932A (en) | 2022-09-16 |
Family
ID=83203632
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210753379.8A Pending CN115061932A (en) | 2022-06-29 | 2022-06-29 | Regression testing method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115061932A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102945204A (en) * | 2012-11-14 | 2013-02-27 | 清华大学 | Operating system standard conformance test adequacy evaluation method based on interface model |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109960653A (en) * | 2019-02-18 | 2019-07-02 | 天津五八到家科技有限公司 | Regression testing method, device, equipment and storage medium |
US10824549B1 (en) * | 2020-05-19 | 2020-11-03 | Mesh Dynamics, Inc | System and method for regression testing of an application programming interface |
CN112835808A (en) * | 2021-03-12 | 2021-05-25 | 中国平安财产保险股份有限公司 | Interface testing method and device, computer equipment and storage medium |
CN113778871A (en) * | 2021-09-07 | 2021-12-10 | 未鲲(上海)科技服务有限公司 | Mock testing method, device, equipment and storage medium |
CN114185804A (en) * | 2021-12-17 | 2022-03-15 | 平安付科技服务有限公司 | Interface testing method and device and terminal equipment |
-
2022
- 2022-06-29 CN CN202210753379.8A patent/CN115061932A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102945204A (en) * | 2012-11-14 | 2013-02-27 | 清华大学 | Operating system standard conformance test adequacy evaluation method based on interface model |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109960653A (en) * | 2019-02-18 | 2019-07-02 | 天津五八到家科技有限公司 | Regression testing method, device, equipment and storage medium |
US10824549B1 (en) * | 2020-05-19 | 2020-11-03 | Mesh Dynamics, Inc | System and method for regression testing of an application programming interface |
CN112835808A (en) * | 2021-03-12 | 2021-05-25 | 中国平安财产保险股份有限公司 | Interface testing method and device, computer equipment and storage medium |
CN113778871A (en) * | 2021-09-07 | 2021-12-10 | 未鲲(上海)科技服务有限公司 | Mock testing method, device, equipment and storage medium |
CN114185804A (en) * | 2021-12-17 | 2022-03-15 | 平安付科技服务有限公司 | Interface testing method and device and terminal equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109359056B (en) | Application program testing method and device | |
CN111274131A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN106790895B (en) | Fault processing method and device | |
CN106375096A (en) | Short message verification method and device | |
CN115185717B (en) | Interface calling method and device, electronic equipment and storage medium | |
CN107562500B (en) | Debugging device, method and equipment | |
CN107395624A (en) | Information processing method and device | |
CN114217803A (en) | Page function problem processing method and device and electronic equipment | |
CN111209195B (en) | Method and device for generating test case | |
CN114896165A (en) | Testing method and device of conversation robot system, electronic equipment and storage medium | |
CN113626321B (en) | Bridging test method, device, system and storage medium | |
CN115061932A (en) | Regression testing method, device and equipment | |
CN113420205B (en) | Method and device for determining shared source account, terminal equipment and server | |
CN115543831A (en) | Test script generation method, device, equipment and storage medium | |
CN111866098B (en) | Log processing method, device and storage medium | |
CN112732098B (en) | Input method and related device | |
CN106408304A (en) | Account security management method and device | |
CN112883314A (en) | Request processing method and device | |
CN113206772B (en) | Method, device, equipment, medium and product for judging correctness of response message | |
CN111611156B (en) | Function test method, function test device, and computer-readable storage medium | |
CN112363917B (en) | Application program debugging exception processing method and device, electronic equipment and medium | |
CN113468536B (en) | Detection method, detection device, detection system, electronic equipment and storage medium | |
CN111401048B (en) | Intention identification method and device | |
CN117093486A (en) | Interface testing method, device, equipment and storage medium | |
CN115310013A (en) | Data processing method and device, electronic 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 |