Regression testing methods, devices and equipment
By obtaining and analyzing the historical test information of the preset interface, determining the use case list and performing regression testing, the key regression testing problems of related and key functions in agile projects are solved, time and cost savings are achieved, and project launch efficiency is improved. and quality.
Patent Information
- Application Number
- CN202210753379.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In agile projects, the existing technology cannot effectively conduct key regression tests of related and key functions, resulting in the impact of the timeliness and quality of the project.
By obtaining the request information set of pending items, including historical test information of the preset interface, determining the use case list, and regression test the project based on the use case list, generating a regression test report, and selective focus on regression testing of key functional interfaces.
It saves time and cost of regression testing, and improves the project's timeliness and quality of online launch.
Smart Images

Figure CN115061932B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a regression testing method, device and equipment. Background Art
[0002] In agile projects, requirements are divided into many small requirements in order to quickly iterate and launch the project. The basic requirement for iteration is that the new requirement cannot affect the function of the previous requirement. Therefore, while testing the implementation point of the new requirement, regression testing is required for the related requirements or functions that may be affected to ensure that their functions can be implemented normally.
[0003] In the prior art, usually after all functional requirements are iterated, regression testing is uniformly performed using pre-stored test cases.
[0004] However, in the prior art, it is not possible to implement focused regression testing of related and key functions, and regression testing of all functions of the project is time-consuming and costly, thereby affecting the timeliness and quality of the project's launch. Summary of the invention
[0005] The present application provides a regression testing method, apparatus and device to solve the problem that the focused regression testing of related and key functions cannot be performed, thereby affecting the timeliness and quality of the project's launch.
[0006] In a first aspect, the present application provides a regression testing method, the method comprising:
[0007] Obtaining a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, each preset interface being a functional interface that needs to be regression tested for the pending project;
[0008] Determine a use case list according to the request information set, wherein the use case list includes at least one test case;
[0009] According to the use case list, regression testing is performed on the items to be processed, and a regression testing report is generated.
[0010] In an optional implementation, the historical test information of each of the preset interfaces includes the interface name information of the preset interface, the historical request information of the preset interface, and the historical response information of the preset interface; each of the test cases includes the request parameter field of the test case and the verification field of the test case.
[0011] In an optional implementation manner, determining a use case list according to the request information set includes:
[0012] Parsing the historical test information of each preset interface to determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface;
[0013] According to the interface name information of the preset interface, determine the target interface of the corresponding test case; according to the historical request information of the preset interface, determine the request parameter field of the test case; according to the historical response information of the preset interface, determine the verification field of the test case, wherein each historical test information of the preset interface corresponds to at least one test case.
[0014] In an optional implementation manner, regression testing is performed on the project to be processed according to the use case list, and a regression testing report is generated, including:
[0015] According to each test case, regression testing is performed on the project to be processed to determine the regression test result of the project to be processed under each test case;
[0016] Generate a regression test report based on the test results corresponding to each test case.
[0017] In an optional implementation manner, performing regression testing on the project to be processed according to each test case, and determining the regression test result of the project to be processed under each test case includes:
[0018] According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and request response information of the target interface is received;
[0019] If it is determined that the request response information is consistent with the verification field of the test case, then determining that the regression test result of the target interface under the test case is a passed test;
[0020] If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to have failed the test.
[0021] In an optional embodiment, the method further includes:
[0022] Based on the preset proxy software, the project to be processed is tested and the request information set is obtained, wherein the preset proxy software has a preset running script, and the preset running script is used to obtain the historical test information of each preset interface of the project to be processed.
[0023] In an optional embodiment, the method further includes:
[0024] According to the regression test report, the items to be processed are optimized.
[0025] In a second aspect, the present application provides a regression testing device, the device comprising:
[0026] A first acquisition unit is used to acquire a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the pending project;
[0027] A determination unit, configured to determine a use case list according to the request information set, wherein the use case list includes at least one test case;
[0028] The first processing unit is used to perform regression testing on the project to be processed according to the use case list and generate a regression testing report.
[0029] In an optional implementation, the historical test information of each of the preset interfaces includes the interface name information of the preset interface, the historical request information of the preset interface, and the historical response information of the preset interface; each of the test cases includes the request parameter field of the test case and the verification field of the test case.
[0030] In an optional implementation manner, the determining unit includes:
[0031] A first determination subunit is used to parse the historical test information of each preset interface, determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface;
[0032] The second determination subunit is used to determine the target interface of the corresponding test case according to the interface name information of the preset interface; determine the request parameter field of the test case according to the historical request information of the preset interface; determine the verification field of the test case according to the historical response information of the preset interface, wherein the historical test information of each preset interface corresponds to at least one test case.
[0033] In an optional implementation manner, the first processing unit includes:
[0034] A third determining subunit is used to perform a regression test on the project to be processed according to each test case, and determine the regression test result of the project to be processed under each test case;
[0035] The fourth determining subunit is used to generate a regression test report according to the test results corresponding to each test case.
[0036] In an optional implementation manner, the third determining subunit is specifically configured to:
[0037] According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and request response information of the target interface is received;
[0038] If it is determined that the request response information is consistent with the verification field of the test case, then determining that the regression test result of the target interface under the test case is a passed test;
[0039] If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to have failed the test.
[0040] In an optional embodiment, the device further comprises:
[0041] The second acquisition unit is used to test the project to be processed based on the preset agent software and obtain the request information set, wherein the preset agent software has a preset running script, and the preset running script is used to obtain the historical test information of each preset interface of the project to be processed.
[0042] In an optional embodiment, the device further comprises:
[0043] The second processing unit is used to optimize the items to be processed according to the regression test report.
[0044] In a third aspect, the present application provides an electronic device, the electronic device comprising: a memory, a processor;
[0045] Memory for storing computer-executable instructions;
[0046] The processor is used to read the computer execution instructions stored in the memory, and execute the regression testing method as described in the first aspect according to the computer execution instructions in the memory.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the regression testing method as described in the first aspect.
[0048] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the regression testing method described in the first aspect when executed by a processor.
[0049] The regression testing method, device and equipment provided by the present application are implemented through the following steps: obtaining a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the pending project; determining a use case list according to the request information set; and performing regression testing on the pending project according to the use case list, and generating a regression testing report. The selective focus on regression testing of the key functional interfaces of the pending project is achieved, which saves the time and cost of regression testing, thereby improving the timeliness and quality of the project's launch. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] 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 present application.
[0051] Figure 1 A flowchart of a regression testing method provided in an embodiment of the present application;
[0052] Figure 2 A flowchart of another regression testing method provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of the structure of a regression testing device provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the structure of a regression testing device provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0056] Figure 6 The present invention is a block diagram of a terminal device according to an exemplary embodiment.
[0057] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0059] In agile projects, requirements are divided into many small requirements, that is, many sub-projects, in order to quickly develop, iterate and launch the project. The basic requirement for iteration is that the new requirement cannot affect the function of the previous requirement. From a design perspective, the implemented requirements should not be affected because they have not been changed. However, in fact, due to the large number of requirements and tight time, developers do not have enough time to consider whether the original functions are affected when implementing new requirements, and testers do not have time to conduct sufficient testing or can only test the implementation points of new requirements. There is no time to test the associated modules or functions that may be affected. As a result, after developing new requirements, the existing requirement function modules may be affected, and the problem is easily exposed to real users in the online environment. In agile projects, the more similar the schedules, the more likely they are to affect each other. Assuming that requirements 1, 2, and 3 are all implemented on the same day, if the implementation of requirement 3 will affect other requirements, then it is likely to affect requirements 1 and 2. Therefore, while testing the implementation points of new requirements, regression testing of the associated requirements or functions that may be affected is required to ensure that their functions can be implemented normally.
[0060] In the prior art, each iteration can only verify the functions of that iteration, or after all functional requirements are iterated, regression testing is performed uniformly using pre-stored test cases.
[0061] However, in the prior art, only the functions of each iteration are verified, which may easily lead to missed tests; and using pre-existing test cases for unified regression testing cannot achieve focused regression testing of related and key functions, and regression testing of all functions of the project is time-consuming and costly, which will affect the timeliness and quality of the project's launch.
[0062] The regression testing method provided in this application is intended to solve the above technical problems in the prior art.
[0063] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0064] Figure 1 A flowchart of a regression testing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0065] 101. Obtain a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the pending project.
[0066] Exemplarily, a request information set of a pending project that needs to undergo regression testing is obtained, wherein the request information set is pre-stored and includes historical test information of at least one preset interface of the pending project, and each preset interface is a functional interface that needs to undergo regression testing for the pending project. For example, the pending project is to register a new user on an application. Then, according to the needs of regression testing, the preset interface may be one or more of an interface for obtaining registration page information, an interface for automatically obtaining a user's mobile phone number, and an interface for submitting a registration. Furthermore, the request information set may include one or more of the interface request information corresponding to the interface for obtaining registration page information, the interface request information corresponding to the interface for automatically obtaining a user's mobile phone number, and the interface request information corresponding to the interface for submitting a registration.
[0067] 102. Determine a use case list according to the request information set, wherein the use case list includes at least one test case.
[0068] Exemplarily, based on the acquired request information set, a list of use cases for regression testing of the project to be processed is determined, for example, a preset interface for performing regression testing is called, so that after receiving the interface request, the backend service parses and extracts the historical test information of the preset interface in the request information set, and based on the historical test information, the interface that needs to be regression tested and the content of the test are determined, and then a list of use cases is assembled and generated. The list of use cases may include one test case or multiple test cases.
[0069] 103. Perform regression testing on the project to be processed based on the use case list and generate a regression testing report.
[0070] Exemplarily, according to the use case list of the project to be processed, each preset interface is controlled to execute the code logic of the corresponding test case in the use case list, that is, regression testing is performed on the project to be processed, and a regression test report is generated according to the regression test results of each test case.
[0071] In this embodiment, the following steps are performed: obtaining a request information set of the project to be processed, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the project to be processed; determining a use case list according to the request information set; and performing regression testing on the project to be processed according to the use case list, and generating a regression test report. This achieves selective focus on regression testing of key functional interfaces of the project to be processed, saves time and cost of regression testing, and thereby improves the timeliness and quality of the project's launch.
[0072] Figure 2 A flowchart of another regression testing method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:
[0073] 201. Based on a preset proxy software, the project to be processed is tested and a request information set is obtained, wherein 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 project to be processed.
[0074] Exemplarily, the test terminal tests the project to be processed based on the preset agent software, and obtains a request information set of the project to be processed during the testing process, wherein the request information set includes historical test information of at least one preset interface of the project to be processed, and each preset interface is a functional interface that needs to be regression tested for the project to be processed. The preset agent software has a preset running script, and the preset running script is used to obtain historical test information of each preset interface of the project to be processed.
[0075] In one example, the network of the test terminal is set to a connection proxy mode. The preset proxy software is a proxy server established between the test terminal and the server, which can monitor the requests sent by the test terminal and the response results returned by the server. The running script of the preset proxy software is pre-edited, and the script code of "saving the request of the preset uniform resource locator (URL) to a local file" is added to the original running script, so that when the proxy software captures each request, it will determine whether the request satisfies the URL match. If so, the request information is written to the local file, that is, the historical test information of the preset interface that needs to be regression tested can be saved to the local file, where different preset interfaces have unique and specific URLs.
[0076] In one example, the implementation logic of the script code "Save the request of the specified URL to a local file" is: (1) For each interface request, a screening judgment is performed to determine whether the request matches the specified URL. For requests that successfully match, the historical test information (request header information, request body information, response header information, response body information) is saved to a local file. For requests that fail to match, no processing is performed.
[0077] In one example, in an agile project, when performing routine tests on multiple sub-projects, the request information set of each sub-project can be obtained according to the proxy software, wherein the request information set includes historical test information of different functional interfaces for different sub-projects. Then, after the new project test is completed, the request information set of the previous sub-project can be called at any time according to actual needs to perform regression testing. Among them, for some requests to modify data, before executing the regression test, the historical test information needs to be restored first, so that the regression test can start based on the initial data, so that the test case can be executed successfully. For example, the key to the sub-project scenario of "registering a new user" is that the "submit registration interface" can be processed normally, so the historical test information of the interface is also stored and recorded for subsequent regression testing. However, for the same user information, it can only be registered once, otherwise it is a repeated registration. From the perspective of interface call, the same interface parameters can only be used once, otherwise the interface will handle errors, such as returning a response message that the user has been repeatedly registered. Therefore, if you want the "submit registration interface" to be successfully regression tested, you need to restore the historical test information before initiating the regression test. In this example, you actually delete the user information saved in the database, so that it is considered that the user has not been registered.
[0078] In one example, since many requests require valid login information to be successful, and the validity period of login information is generally one day, regression testing is best completed within the same day, not across days. If it is necessary to span days, the validity period of login information should be extended. In fact, for agile projects, since multiple requirements are often implemented within a day, the corresponding regression testing should also be completed within the same day, so as to find and solve problems as soon as possible.
[0079] 202. Obtain a request information set of the project to be processed, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the project to be processed.
[0080] 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.
[0081] Exemplarily, a request information set of a pending project that needs to undergo regression testing is obtained, wherein the request information set is pre-stored and includes historical test information of at least one preset interface of the pending project, and each preset interface is a functional interface that needs to undergo regression testing for the pending project. The historical test information of each preset interface includes the interface name information of the preset interface, the historical request information of the preset interface, and the historical response information of the preset interface, the historical request information includes a request header and a request body; the historical response information includes a response header and a response body. For example, if the scenario of the pending project is to register a new user on an application, then according to the needs of regression testing, the preset interface can be one or more of an interface for obtaining registration page information, an interface for automatically obtaining a user's mobile phone number, and an interface for submitting registration, and then the request information set can include one or more of interface request information for obtaining registration page information, interface request information for automatically obtaining a user's mobile phone number, and interface request information for submitting registration.
[0082] 203. Determine a use case list according to the request information set, wherein the use case list includes at least one test case, and each test case includes a request parameter field of the test case and a verification field of the test case.
[0083] In one example, step 203 includes the following steps:
[0084] The historical test information of each preset interface is parsed to determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface.
[0085] According to the interface name information of the preset interface, determine the target interface of the corresponding test case; according to the historical request information of the preset interface, determine the request parameter field of the test case; according to the historical response information of the preset interface, determine the verification field of the test case, wherein each historical test information of the preset interface corresponds to at least one test case.
[0086] Exemplarily, based on the acquired request information set, a list of use cases for regression testing of the project to be processed is determined, for example, a preset interface for performing regression testing is called, so that after receiving the interface request, the backend service parses and extracts the historical test information of the preset interface in the request information set, and based on the historical test information, the interface that needs to be regression tested and the content of the test are determined, and then a list of use cases is assembled and generated. The list of use cases may include one test case or multiple test cases.
[0087] In one example, the historical test information of each preset interface of the pending project in the request information set is parsed to obtain the interface name information, historical request information and historical response information of each preset interface of the pending project; the target interface of the corresponding test case is determined according to the interface name information of the preset interface; the request parameter field of the corresponding test case is determined according to the historical request information of the preset interface; the verification field of the test case is determined according to the historical response information of the preset interface, wherein the historical test information of each preset interface corresponds to at least one test case. Among them, the request parameter field of the test case.
[0088] 204. According to each test case, regression testing is performed on the project to be processed to determine the regression test results of the project to be processed under each test case.
[0089] In one example, step 204 includes the following steps:
[0090] According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and the request response information of the target interface is received.
[0091] If it is determined that the request response information is consistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to be a passed test.
[0092] If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to be failed.
[0093] Exemplarily, according to each test case of the project to be processed, the code logic of the corresponding test case in the case list of each preset interface execution is controlled, that is, regression testing is performed on the project to be processed, and the regression test results of each preset interface in the project to be processed under the corresponding test case are determined.
[0094] In an example, a regression test is performed on the corresponding target interface according to the request parameter field of each test case, and the request response information of the target interface is received; if it is determined that the request response information is consistent with the verification field of the test case, the regression test result of the target interface under the test case is determined to be a passed test; if it is determined that the request response information is inconsistent with the verification field of the test case, the regression test result of the target interface under the test case is determined to be a failed test.
[0095] 205. Generate a regression test report based on the test results corresponding to each test case.
[0096] Exemplarily, the regression test results of each preset interface in the project to be processed under the corresponding test case are read to generate a test report, wherein the test report may also include test analysis content such as expected results and actual results of the test.
[0097] 206. Based on the regression test report, optimize the projects to be processed.
[0098] Exemplarily, according to the regression test report, the functional interfaces in the project to be processed that have not passed the regression test or have unsatisfactory regression test results are optimized and adjusted.
[0099] In this embodiment, the historical test information of the functional interfaces that need to be regression tested for each project is pre-stored by using the preset running script based on the preset proxy software, and then test cases are generated in a targeted manner based on these historical test information. According to these test cases, regression tests are performed on the projects to be processed, regression test reports are generated, and then based on the regression test reports, the projects to be processed are optimized. This process makes the implementation of regression testing more flexible and convenient, and can quickly implement selective and focused regression testing of the key functional interfaces of the projects to be processed, saving the time and cost of regression testing, and improving the timeliness and quality of the project's launch.
[0100] Figure 3 A schematic diagram of a regression testing device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device comprises:
[0101] The first acquisition unit 31 is used to acquire a request information set of the project to be processed, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the project to be processed.
[0102] The determination unit 32 is used to determine a use case list according to the request information set, wherein the use case list includes at least one test case.
[0103] The first processing unit 33 is used to perform regression testing on the project to be processed according to the use case list and generate a regression testing report.
[0104] Figure 4 A schematic diagram of a regression test device provided in an embodiment of the present application is shown in FIG. Figure 3 Based on the embodiment shown, Figure 4 As shown, the device comprises:
[0105] In one example, the historical test information of each preset interface includes the interface name information of the preset interface, the historical request information of the preset interface, and the historical response information of the preset interface; each test case includes the request parameter field of the test case and the verification field of the test case.
[0106] In one example, the determining unit 32 includes:
[0107] The first determining subunit 321 is used to parse the historical test information of each preset interface, and determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface.
[0108] The second determination subunit 322 is used to determine the target interface corresponding to the test case according to the interface name information of the preset interface; determine the request parameter field of the test case according to the historical request information of the preset interface; determine the verification field of the test case according to the historical response information of the preset interface, wherein each historical test information of the preset interface corresponds to at least one test case.
[0109] In one example, the first processing unit 33 includes:
[0110] The third determining subunit 331 is used to perform regression testing on the item to be processed according to each test case, and determine the regression test result of the item to be processed under each test case.
[0111] The fourth determining subunit 332 is used to generate a test report according to the test results corresponding to each test case.
[0112] In an example, the third determining subunit 331 is specifically configured to:
[0113] According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and the request response information of the target interface is received.
[0114] If it is determined that the request response information is consistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to be a passed test.
[0115] If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to be failed.
[0116] In one example, the device further includes:
[0117] The second acquisition unit 41 is used to test the project to be processed based on the preset proxy software and obtain a request information set, wherein 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 project to be processed.
[0118] In one example, the device further includes:
[0119] The second processing unit 42 is used for optimizing the items to be processed according to the regression test report.
[0120] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52.
[0121] A memory 51, used for storing computer-executable instructions;
[0122] The processor 52 is used to read the computer execution instructions stored in the memory 51 and execute the regression testing method provided in the above embodiment according to the computer execution instructions in the memory 51.
[0123] Figure 6 It is a block diagram of a terminal device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0124] The device 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 .
[0125] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0126] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0127] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0128] 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 input signals from the 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 boundaries of the 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 camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0129] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0130] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as 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.
[0131] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor assembly 814 can also detect the position change 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 the temperature change of the device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include an optical sensor, such as a complementary metal oxide semiconductor (CMOS) or a charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0132] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as wireless communication technology (WiFi), second generation mobile communication technology (second generation, referred to as 2G) or third generation mobile communication technology (3rd-Generation, referred to as 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, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0133] 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, microcontrollers, microprocessors or other electronic components to perform the above method.
[0134] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0135] An embodiment of the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method provided by the above embodiment.
[0136] An embodiment of the present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0137] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0138] It should be understood that the present application is not limited to the precise structures that have been 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 present application is limited only by the appended claims.
Claims
1. A regression testing method, It is characterized in that The method comprises: Obtaining a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the pending project; when the pending project is to register a new user on an application, the preset interface includes: one or more of an interface for obtaining registration page information, an interface for automatically obtaining a user's mobile phone number, and an interface for submitting registration; Determine a use case list according to the request information set, wherein the use case list includes at least one test case; According to the use case list, regression testing is performed on the pending items, and a regression testing report is generated; wherein, for requests to modify data, historical testing information is restored before regression testing is performed; The historical test information of each preset interface includes the interface name information of the preset interface, the historical request information of the preset interface and the historical response information of the preset interface; each test case includes the request parameter field of the test case and the verification field of the test case; According to the request information set, a use case list is determined, including: Parsing the historical test information of each preset interface to determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface; According to the interface name information of the preset interface, determine the target interface of the corresponding test case; according to the historical request information of the preset interface, determine the request parameter field of the test case; according to the historical response information of the preset interface, determine the verification field of the test case, wherein each historical test information of the preset interface corresponds to at least one test case.
2. The method according to claim 1, It is characterized in that According to the use case list, regression testing is performed on the pending project, and a regression testing report is generated, including: According to each test case, regression testing is performed on the project to be processed to determine the regression test result of the project to be processed under each test case; Generate a regression test report based on the test results corresponding to each test case.
3. The method according to claim 2, It is characterized in that According to each test case, regression testing is performed on the project to be processed to determine the regression test result of the project to be processed under each test case, including: According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and request response information of the target interface is received; If it is determined that the request response information is consistent with the verification field of the test case, then determining that the regression test result of the target interface under the test case is a passed test; If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to have failed the test.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Based on the preset proxy software, the project to be processed is tested and the request information set is obtained, wherein the preset proxy software has a preset running script, and the preset running script is used to obtain the historical test information of each preset interface of the project to be processed.
5. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: According to the regression test report, the items to be processed are optimized.
6. A regression testing device, It is characterized in that The device comprises: A first acquisition unit is used to acquire a request information set of a pending project, wherein the request information set includes historical test information of at least one preset interface, and each preset interface is a functional interface that needs to be regression tested for the pending project; when the pending project is to register a new user on an application, the preset interface includes: an interface for acquiring registration page information, an interface for automatically acquiring a user's mobile phone number, and an interface for submitting registration. One or more; A determination unit, configured to determine a use case list according to the request information set, wherein the use case list includes at least one test case; A first processing unit is used to perform regression testing on the items to be processed according to the use case list and generate a regression testing report; wherein, for a request to modify data, historical test information is restored before performing regression testing; The historical test information of each preset interface includes the interface name information of the preset interface, the historical request information of the preset interface and the historical response information of the preset interface; each test case includes the request parameter field of the test case and the verification field of the test case; The determining unit comprises: A first determination subunit is used to parse the historical test information of each preset interface, determine the interface name information of the corresponding preset interface, the historical request information of the preset interface, and the historical response information of the preset interface; The second determination subunit is used to determine the target interface of the corresponding test case according to the interface name information of the preset interface; determine the request parameter field of the test case according to the historical request information of the preset interface; determine the verification field of the test case according to the historical response information of the preset interface, wherein the historical test information of each preset interface corresponds to at least one test case.
7. The device according to claim 6, It is characterized in that The first processing unit comprises: A third determining subunit is used to perform a regression test on the project to be processed according to each test case, and determine the regression test result of the project to be processed under each test case; The fourth determining subunit is used to generate a regression test report according to the test results corresponding to each test case.
8. The device according to claim 7, It is characterized in that The third determining subunit is specifically used for: According to the request parameter field of each test case, regression test is performed on the corresponding target interface, and request response information of the target interface is received; If it is determined that the request response information is consistent with the verification field of the test case, then determining that the regression test result of the target interface under the test case is a passed test; If it is determined that the request response information is inconsistent with the verification field of the test case, then the regression test result of the target interface under the test case is determined to have failed the test.
9. The device according to any one of claims 6 to 8, It is characterized in that The device also includes: The second acquisition unit is used to test the project to be processed based on the preset agent software and obtain the request information set, wherein the preset agent software has a preset running script, and the preset running script is used to obtain the historical test information of each preset interface of the project to be processed.
10. The device according to any one of claims 6 to 8, It is characterized in that The device also includes: The second processing unit is used to optimize the items to be processed according to the regression test report.
11. An electronic device, It is characterized in that The electronic device comprises: a memory and a processor; Memory for storing computer-executable instructions; A processor is used to read the computer-executable instructions stored in the memory, and execute the regression testing method according to any one of claims 1 to 5 according to the computer-executable instructions in the memory.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the regression testing method according to any one of claims 1 to 5.
13. A computer program product, It is characterized in that The invention comprises a computer program, which implements the regression testing method according to any one of claims 1 to 5 when executed by a processor.
