Nothing Special   »   [go: up one dir, main page]

CN113609021A - Regression testing method, device, equipment and storage medium - Google Patents

Regression testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113609021A
CN113609021A CN202110915055.5A CN202110915055A CN113609021A CN 113609021 A CN113609021 A CN 113609021A CN 202110915055 A CN202110915055 A CN 202110915055A CN 113609021 A CN113609021 A CN 113609021A
Authority
CN
China
Prior art keywords
calling
interface
parameter
interfaces
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110915055.5A
Other languages
Chinese (zh)
Inventor
凌文剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN202110915055.5A priority Critical patent/CN113609021A/en
Publication of CN113609021A publication Critical patent/CN113609021A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of computers, and provides a regression testing method, a regression testing device, regression testing equipment and a storage medium, wherein the method comprises the following steps: acquiring a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces; according to the calling sequence of the calling interfaces, sequentially requesting the calling interfaces; acquiring calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises a parameter mapping relation between each calling interface; generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface; and performing regression testing on the system to be tested through the calling chain. According to the technical scheme of the embodiment of the application, the efficiency of the project regression test is improved.

Description

Regression testing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a regression testing method, apparatus, device, and storage medium.
Background
The regression testing task of the project is realized through automatic testing, and the regression testing case is automatically executed to help the project to quickly find out the function decline point of the project.
Currently, regression testing of projects is mainly based on coding implementations. On one hand, the process of designing the regression testing code is disjointed from the actual functional testing process, and the code of the regression testing of the project needs to be supplemented and developed at the later stage, so that the code development amount is large, and the effectiveness of the regression testing following the development of the project is difficult to meet due to the fact that the process of designing the regression testing code is after the functional testing of the project. On the other hand, in the regression testing process of the project, after each test failure, the testing process needs to be comprehensively analyzed so as to confirm the failed step and then repair, so that the efficiency of fault location and repair in the testing process is low. In the current project regression testing process, the testing efficiency is low.
Disclosure of Invention
The application provides a regression testing method, device, equipment and storage medium, which are beneficial to improving the efficiency of project regression testing.
A first aspect of the present application provides a regression testing method, including:
acquiring a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces;
according to the calling sequence of the calling interfaces, sequentially requesting the calling interfaces;
acquiring calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises a parameter mapping relation between each calling interface;
generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and performing regression testing on the system to be tested through the calling chain.
A second aspect of the present application provides a regression testing apparatus, including:
the first acquisition module is used for acquiring a plurality of calling interfaces in a system to be tested and the calling sequence of the calling interfaces;
the request module is used for sequentially requesting the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces;
a second obtaining module, configured to obtain call data of each call interface in the multiple call interfaces, where the call data includes a parameter mapping relationship between the call interfaces;
the generation module is used for generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and the testing module is used for performing regression testing on the system to be tested through the calling chain.
A third aspect of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of the first aspects of the present application.
A fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon for execution by a processor to perform some or all of the steps described in any of the methods of the first aspect of the present application.
It can be seen that, with the regression testing method, apparatus, device, and storage medium provided by the present application, a plurality of call interfaces and a call sequence of the plurality of call interfaces in a system to be tested are first obtained, and a request is sequentially made to the plurality of call interfaces according to the call sequence of the plurality of call interfaces. And secondly, acquiring the calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises the parameter mapping relation between each calling interface. And secondly, generating a calling chain according to the calling sequence of the plurality of calling interfaces and the calling data of each calling interface. And finally, carrying out regression testing on the system to be tested by calling the chain. Therefore, a calling chain is generated according to the calling sequence of the calling interfaces and the calling data of each calling interface, and the regression test is performed on the system to be tested through the calling chain, so that on one hand, the regression test case is synchronously edited in the functional test stage, and the regression efficiency and the coverage rate are improved. On the other hand, when regression testing is carried out through the calling chain, the position where the project is declined can be quickly judged according to the information that the calling chain fails to call at a specific certain node, the analysis time is reduced, and the fault positioning and repairing efficiency is improved. By the regression testing method, the regression testing device, the regression testing equipment and the storage medium, the efficiency of the project regression testing is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a system to be tested according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a regression testing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of another regression testing method provided in the embodiments of the present application;
fig. 4 is a schematic diagram of a regression testing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
Detailed Description
The regression testing method, the regression testing device, the regression testing equipment and the storage medium are beneficial to improving the efficiency of the regression testing of the project.
Hereinafter, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
The term "at least one" as used in the embodiments of the present application means one or more, and the "plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
And, unless stated to the contrary, the embodiments of the present application refer to the ordinal numbers "first", "second", etc., for distinguishing a plurality of objects, and do not limit the sequence, timing, priority, or importance of the plurality of objects. For example, the first information and the second information are different information only for distinguishing them from each other, and do not indicate a difference in the contents, priority, transmission order, importance, or the like of the two kinds of information. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following describes embodiments of the present application in detail.
Referring first to fig. 1, fig. 1 is a schematic diagram of a system to be tested according to an embodiment of the present application. As shown in fig. 1, the system under test 100 includes a call interface 1, a call interface 2, a call interface 3, a. The calling sequence of the N calling interfaces in the system to be tested 100 is: call interface 1, call interface 2, call interface 3.
In the system to be tested 100 provided in the embodiment of the present application, first, a plurality of call interfaces (call interfaces 1-N) in the system to be tested 100 and a call sequence of the call interfaces are obtained.
And secondly, sequentially requesting the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces. Specifically, the request is first made to the calling interface 1, then to the calling interface 2, and then to the calling interface 3, and the requests are sequentially made until the request is made to the calling interface N.
And secondly, acquiring the calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises the parameter mapping relation between each calling interface. For example, the calling data includes a parameter mapping relationship between the calling interface 1 and the calling interface 2, and also includes a parameter mapping relationship between the calling interface 2 and the calling interface 3. Optionally, the call data further includes parameters of the call interface itself.
And secondly, generating a calling chain according to the calling sequence of the plurality of calling interfaces and the calling data of each calling interface. Specifically, the multiple calling interfaces are sequentially requested in the functional test stage, then the calling sequence of the multiple calling interfaces and the calling data of each calling interface are stored, and a calling chain is generated and used for regression testing. Therefore, the regression test case is edited synchronously in the functional test stage, and the regression efficiency and the coverage rate are improved.
Finally, regression testing is performed on the system under test 100 through the call chain. Specifically, when regression testing is performed through the calling chain, the position where the project is declined can be quickly judged according to the information that the calling chain fails to call at a specific certain node, the analysis time is reduced, and the fault location and repair efficiency is improved.
In one possible embodiment, the system under test 100 includes three types of nodes, namely a call interface node, a function node, and a logic node, where each user editable content is referred to as a node.
Specifically, the tester may initiate the request by calling the interface node.
The function nodes comprise a database node, a job node and a reissue message queue node, and are used for initiating a systematic function. The database node uses the parameter of the previous node and formats the parameter into a variable, and combines with an SQL statement preset in the node to judge or update the value of the database, judge whether the current flow is correct or correct the key value, and ensure that the subsequent node can be continuously executed. The job node is used for executing tasks regularly according to the schedule, and when certain work needs to be executed in an accelerated mode, the job node can be used for quickly triggering the work and entering a subsequent process. The reissue message queue node is used for asynchronous communication between systems to be tested, and can be used for rapidly reissuing a Message Queue (MQ) so as to trigger a subsequent process.
And the logic node is used for carrying out logic control according to the call interface node and the exit parameters of the function node.
The method has the advantages that parameter information among all the nodes is flexibly transmitted through the mode of the nodes, on the basis of the function test, the editing and the saving of a calling chain can be completed while the function test is carried out, and the time for independently developing a regression test case is saved. In addition, when the calling chain is used for regression testing, the position where the system to be tested is degenerated can be quickly judged according to the information that the calling chain fails to call at a specific certain node, so that the analysis time is reduced, and the fault positioning and repairing efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart of a regression testing method according to an embodiment of the present disclosure. As shown in fig. 2, a regression testing method provided in the embodiment of the present application may include:
201. the method comprises the steps of obtaining a plurality of calling interfaces in a system to be tested and calling sequences of the calling interfaces.
Optionally, besides obtaining a plurality of call interfaces and call sequences, functional nodes and logical nodes of the system to be tested are also determined. The function nodes comprise a database node, a jobnode and a reissue message queue node, and are used for initiating a systematic function. And the logic node is used for carrying out logic control according to the call interface and the exit parameters of the functional node.
Specifically, the order of the initial calling interface and other calling interfaces in the system to be tested is determined, for example, in this embodiment, the initial calling interface is interface 1, the next calling interface of interface 1 is interface 2, and the parameter output by interface 1 may be used as the input parameter of interface 2.
Optionally, after the database node is determined, the SQL statement in the database node is preset for subsequently performing database value determination or updating, determining whether the current flow is correct, or correcting the key value, and ensuring that the subsequent node can continue to execute.
Optionally, after determining the job node, a timing task in the job node is preset, so that the job node can trigger the task to enter a subsequent process.
202. And sequentially requesting the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces.
Optionally, according to the calling sequence of the multiple calling interfaces, the method for sequentially requesting the multiple calling interfaces may be: determining a first calling interface and a second calling interface in the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces, wherein the second calling interface is the next calling interface of the first calling interface; requesting the first calling interface to obtain a return parameter of the first calling interface; according to the return parameters of the first calling interface, requesting the second calling interface to obtain the return parameters of the second calling interface; and according to the return parameters of the second calling interface, requesting the next calling interface of the second calling interface until the plurality of calling interfaces are sequentially requested.
For example, in this embodiment, the initial calling interface is interface 1, the next calling interface of interface 1 is interface 2, the next calling interface of interface 2 is interface 3, and so on, and the last calling interface is interface N. First, a request is made to interface 1 to obtain the return parameters of interface 1. Then, according to the return parameters of the interface 1, a request is made for the interface 2 to obtain the return parameters of the interface 2. Then according to the return parameter of interface 2, making request for interface 3, and so on, until the request for interface N is completed.
Optionally, the requesting the second call interface according to the return parameter of the first call interface includes: performing parameter mapping on the return parameter of the first calling interface to obtain a first calling parameter of the second calling interface; acquiring a second calling parameter of the second calling interface; and requesting the second calling interface according to the first calling parameter and the second calling parameter of the second calling interface.
For example, the return parameter of the first call interface includes a parameter a and a parameter b, and the return parameter of the first call interface is mapped to a parameter, specifically, the parameter a is mapped to a parameter X, and the parameter b is mapped to a parameter Y, that is, the first call parameter of the second call interface includes the parameter X and the parameter Y. And after obtaining part of the calling parameters of the second calling interface, filling up other necessary parameters of the second calling interface, namely obtaining the second calling parameters of the second calling interface, wherein the second calling parameters comprise a parameter Z. That is, the calling parameters of the second calling interface include a parameter X, a parameter Y, and a parameter Z, and the second calling interface is requested according to the parameter X, the parameter Y, and the parameter Z.
Optionally, the obtaining the second call parameter of the second call interface includes: acquiring a first parameter type of a first calling parameter of the first calling interface; comparing the first parameter type with a preset calling parameter type of the second calling interface to determine a second parameter type in the preset calling parameter types of the second calling interface, wherein the second parameter type is different from the first parameter type; and acquiring a second calling parameter of the second calling interface matched with the second parameter type.
In a possible implementation manner, the method for obtaining the second call parameter of the second call interface matching with the second parameter type may be: and acquiring a preset second calling parameter matched with the second parameter type.
Optionally, before requesting the second call interface according to the return parameter of the first call interface, the method further includes: and performing assertion judgment on the return parameter of the first calling interface, and confirming that the return parameter of the first calling interface is true.
Optionally, after confirming that the return parameter of the first call interface is true, the method further includes: formatting a return parameter of the first calling interface into a first variable; and executing a preset Structured Query Language (SQL) statement on the first variable to perform database value judgment on the first variable and confirm that the first variable is correct.
Optionally, if the return parameter of the first call interface is not true, triggering a preset task in the system to be tested, where the preset task includes: resetting the calling parameters of the first calling interface, making a request for the first calling interface again, and obtaining the return parameters of the first calling interface again.
In a possible implementation manner, if the return parameter of the first call interface is not true, a timing task preset in the jobnode is triggered, and a subsequent process is entered.
Optionally, when the database value is determined for the first variable, if the first variable is wrong, the message queue is reissued quickly by the reissue message queue node, so as to trigger a subsequent process. And the subsequent flow comprises inputting the parameters passing through the nodes of the reissued message queue into the second calling interface, and continuing the request.
203. And acquiring the calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises the parameter mapping relation between each calling interface.
For example, the return parameter of the first call interface includes a parameter a and a parameter b, and the return parameter of the first call interface is mapped to a parameter, specifically, the parameter a is mapped to a parameter X, and the parameter b is mapped to a parameter Y, that is, the first call parameter of the second call interface includes the parameter X and the parameter Y. The mapping relation between the parameter a and the parameter Y can be determined, and the mapping relation between the parameter b and the parameter Y can be determined, so that the parameter mapping relation between the first calling interface and the second calling interface can be obtained. And by analogy, the parameter mapping relation between each calling interface can be obtained.
Optionally, the call data further includes parameters of the call interface itself. In a possible embodiment, the call data further comprise a second call parameter for each call interface. For example, after the first call parameter of the second call interface is obtained, the second call parameter of the second call interface is obtained, and a request is made to the second call interface according to the first call parameter and the second call parameter of the second call interface. And after the request, storing the second calling parameters of the second calling interface, wherein the calling data comprises the second calling parameters of the second calling interface, and the like to obtain the second calling parameters of each calling interface.
204. And generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface.
Specifically, the multiple calling interfaces are sequentially requested in the functional test stage, then the calling sequence of the multiple calling interfaces and the calling data of each calling interface are stored, and a calling chain is generated and used for regression testing. Therefore, the regression test case is edited synchronously in the functional test stage, and the regression efficiency and the coverage rate are improved.
In one possible implementation mode, the call chain is generated according to the call sequence of the plurality of call interfaces, the call data of each call interface and the data of the function node, wherein the data of the function node comprises SQL statements in the database nodes, timing task data in the jobnode and data in the reissue message queue node. The calling chain is perfected through the data of other nodes, the corresponding calling chain for regression testing is edited along with the completion of the function testing, and the saved calling chain can be repeatedly used in the subsequent regression testing.
205. And performing regression testing on the system to be tested through the calling chain.
Specifically, when regression testing is performed through the calling chain, the position where the project is declined can be quickly judged according to the information that the calling chain fails to call at a specific certain node, the analysis time is reduced, and the fault location and repair efficiency is improved.
Therefore, according to the regression testing method provided by the embodiment of the application, the calling chain is generated according to the calling sequence of the calling interfaces and the calling data of each calling interface, and the regression testing is performed on the system to be tested through the calling chain, so that on one hand, the regression testing case is synchronously edited in the functional testing stage, and the regression efficiency and the coverage rate are improved. On the other hand, when regression testing is carried out through the calling chain, the position where the project is declined can be quickly judged according to the information that the calling chain fails to call at a specific certain node, the analysis time is reduced, and the fault positioning and repairing efficiency is improved. By the regression testing method, the efficiency of the regression testing of the project is improved.
Referring to fig. 3, fig. 3 is a schematic flow chart of another regression testing method provided in the embodiments of the present application. As shown in fig. 3, another regression testing method provided in the embodiment of the present application may include:
301. obtaining a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces.
Specifically, the order of the initial calling interface and other calling interfaces in the system to be tested is determined, for example, in this embodiment, the initial calling interface is interface 1, the next calling interface of interface 1 is interface 2, and the parameter output by interface 1 may be used as the input parameter of interface 2.
302. And determining functional nodes and logic nodes in the system to be tested.
Specifically, the functional nodes include a database node, a jobnode, and a reissue message queue node, and the functional nodes are used for initiating a systematic function. And the logic node is used for carrying out logic control according to the call interface and the exit parameters of the functional node.
Optionally, after the database node is determined, the SQL statement in the database node is preset for subsequently performing database value determination or updating, determining whether the current flow is correct, or correcting the key value, and ensuring that the subsequent node can continue to execute.
Optionally, after determining the job node, a timing task in the job node is preset, so that the job node can trigger the task to enter a subsequent process.
303. And determining a first calling interface and a second calling interface according to the calling sequence of the plurality of calling interfaces, wherein the second calling interface is the next calling interface of the first calling interface.
304. And requesting the first calling interface to obtain the return parameters of the first calling interface.
Specifically, if the first calling interface is the initial calling interface, the preset calling parameter of the initial calling interface is obtained, and the request is made for the first calling interface according to the calling parameter of the initial calling interface. And if the first calling interface is a calling interface except the initial calling interface, acquiring a return parameter of a last calling interface of the first calling interface, and requesting the first calling interface according to the return parameter of the last calling interface.
305. And performing assertion judgment on the return parameter of the first calling interface, and confirming that the return parameter of the first calling interface is true.
Optionally, after confirming that the return parameter of the first call interface is true, the method further includes: formatting a return parameter of the first calling interface into a first variable; and executing a preset Structured Query Language (SQL) statement on the first variable to perform database value judgment on the first variable and confirm that the first variable is correct.
Optionally, if the return parameter of the first call interface is not true, triggering a preset task in the system to be tested, where the preset task includes: resetting the calling parameters of the first calling interface, making a request for the first calling interface again, and obtaining the return parameters of the first calling interface again.
In a possible implementation manner, if the return parameter of the first call interface is not true, a timing task preset in the jobnode is triggered, and a subsequent process is entered.
Optionally, when the database value is determined for the first variable, if the first variable is wrong, the message queue is reissued quickly by the reissue message queue node, so as to trigger a subsequent process. And the subsequent flow comprises inputting the parameters passing through the nodes of the reissued message queue into the second calling interface, and continuing the request.
306. And according to the return parameters of the first calling interface, requesting the second calling interface to obtain the return parameters of the second calling interface.
Optionally, according to the return parameter of the first call interface, the method for requesting the second call interface may be: performing parameter mapping on the return parameter of the first calling interface to obtain a first calling parameter of the second calling interface; acquiring a second calling parameter of the second calling interface; and requesting the second calling interface according to the first calling parameter and the second calling parameter of the second calling interface.
For example, the return parameter of the first call interface includes a parameter a and a parameter b, and the return parameter of the first call interface is mapped to a parameter, specifically, the parameter a is mapped to a parameter X, and the parameter b is mapped to a parameter Y, that is, the first call parameter of the second call interface includes the parameter X and the parameter Y. And after obtaining part of the calling parameters of the second calling interface, filling up other necessary parameters of the second calling interface, namely obtaining the second calling parameters of the second calling interface, wherein the second calling parameters comprise a parameter Z. That is, the calling parameters of the second calling interface include a parameter X, a parameter Y, and a parameter Z, and the second calling interface is requested according to the parameter X, the parameter Y, and the parameter Z.
Optionally, the method for obtaining the second call parameter of the second call interface may be: acquiring a first parameter type of a first calling parameter of the first calling interface; comparing the first parameter type with a preset calling parameter type of the second calling interface to determine a second parameter type in the preset calling parameter types of the second calling interface, wherein the second parameter type is different from the first parameter type; and acquiring a second calling parameter of the second calling interface matched with the second parameter type.
In a possible implementation manner, the method for obtaining the second call parameter of the second call interface matching with the second parameter type may be: and acquiring a preset second calling parameter matched with the second parameter type.
307. And according to the return parameters of the second calling interface, requesting the next calling interface of the second calling interface until the plurality of calling interfaces are sequentially requested.
For example, in this embodiment, the initial calling interface is interface 1, the next calling interface of interface 1 is interface 2, the next calling interface of interface 2 is interface 3, and so on, and the last calling interface is interface N. First, a request is made to interface 1 to obtain the return parameters of interface 1. Then, according to the return parameters of the interface 1, a request is made for the interface 2 to obtain the return parameters of the interface 2. Then according to the return parameter of interface 2, making request for interface 3, and so on, until the request for interface N is completed.
308. And acquiring the calling data of each calling interface in the plurality of calling interfaces.
Specifically, the call data of each call interface includes a parameter mapping relationship between each call interface.
For example, the return parameter of the first call interface includes a parameter a and a parameter b, and the return parameter of the first call interface is mapped to a parameter, specifically, the parameter a is mapped to a parameter X, and the parameter b is mapped to a parameter Y, that is, the first call parameter of the second call interface includes the parameter X and the parameter Y. The mapping relation between the parameter a and the parameter Y can be determined, and the mapping relation between the parameter b and the parameter Y can be determined, so that the parameter mapping relation between the first calling interface and the second calling interface can be obtained. And by analogy, the parameter mapping relation between each calling interface can be obtained.
Optionally, the call data of each call interface further includes parameters of each call interface itself. In one possible embodiment, the call data of each call interface further includes a second call parameter of each call interface. For example, after the first call parameter of the second call interface is obtained, the second call parameter of the second call interface is obtained, and a request is made to the second call interface according to the first call parameter and the second call parameter of the second call interface. And after the request, storing the second calling parameters of the second calling interface, wherein the calling data comprises the second calling parameters of the second calling interface, and the like to obtain the second calling parameters of each calling interface.
309. And generating a calling chain according to the calling sequence of the plurality of calling interfaces, the calling data of each calling interface and the data of the function node.
Specifically, the data of the functional node includes SQL statements in the database node, timing task data in the jobb node, and data in the reissue message queue node. In the functional test stage, the multiple calling interfaces are requested in sequence, then the calling sequence of the multiple calling interfaces, the calling data of each calling interface and the data of the functional nodes are stored, a calling chain is generated, and the calling chain is used for regression testing. Therefore, the regression test case is edited synchronously in the functional test stage, and the regression efficiency and the coverage rate are improved. The calling chain is perfected through the data of other nodes, the corresponding calling chain for regression testing is edited along with the completion of the function testing, and the saved calling chain can be repeatedly used in the subsequent regression testing.
310. And carrying out regression testing on the system to be tested by calling the chain.
Specifically, when regression testing is performed through the calling chain, the position where the project is declined can be quickly judged according to the information that the calling chain fails to call at a specific certain node, the analysis time is reduced, and the fault location and repair efficiency is improved.
Therefore, by the regression testing method provided by the embodiment of the application, parameter information among all nodes is flexibly transmitted through the mode of the nodes, editing and saving of a call chain can be completed while the function is tested on the basis of the function test, and time for independently developing regression test cases is saved. In addition, when the calling chain is used for regression testing, the position where the system to be tested is degenerated can be quickly judged according to the information that the calling chain fails to call at a specific certain node, so that the analysis time is reduced, and the fault positioning and repairing efficiency is improved.
Referring to fig. 4, fig. 4 is a schematic diagram of a regression testing apparatus according to an embodiment of the present disclosure. As shown in fig. 4, a regression testing apparatus provided in an embodiment of the present application may include:
a first obtaining module 401, configured to obtain multiple call interfaces in a system to be tested and a call sequence of the multiple call interfaces;
a request module 402, configured to sequentially request the multiple call interfaces according to the call sequence of the multiple call interfaces;
a second obtaining module 403, configured to obtain call data of each call interface in the multiple call interfaces, where the call data includes a parameter mapping relationship between the call interfaces;
a generating module 404, configured to generate a call chain according to the call order of the multiple call interfaces and the call data of each call interface;
a testing module 405, configured to perform regression testing on the system to be tested through the call chain.
For the specific implementation of the regression testing apparatus in the embodiment of the present application, reference may be made to the embodiments of the regression testing method, which are not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application. As shown in fig. 5, an electronic device of a hardware operating environment according to an embodiment of the present application may include:
a processor 501, such as a CPU.
The memory 502 may alternatively be a high speed RAM memory or a stable memory such as a disk memory.
A communication interface 503 for implementing connection communication between the processor 501 and the memory 502.
Those skilled in the art will appreciate that the configuration of the electronic device shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 5, the memory 502 may include an operating system, a network communication module, and a regression test program. An operating system is a program that manages and controls the hardware and software resources of an electronic device, supporting the operation of a regression test program and other software or programs. The network communication module is used to implement communication between the components in the memory 502 and with other hardware and software in the electronic device.
In the electronic device shown in fig. 5, the processor 501 is configured to execute the regression test program stored in the memory 502, and implement the following steps:
acquiring a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces;
according to the calling sequence of the calling interfaces, sequentially requesting the calling interfaces;
acquiring calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises a parameter mapping relation between each calling interface;
generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and performing regression testing on the system to be tested through the calling chain.
For specific implementation of the electronic device in the embodiment of the present application, reference may be made to each embodiment of the regression testing method, which is not described herein again.
Another embodiment of the present application provides a computer-readable storage medium storing a computer program for execution by a processor to perform the steps of:
acquiring a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces;
according to the calling sequence of the calling interfaces, sequentially requesting the calling interfaces;
acquiring calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises a parameter mapping relation between each calling interface;
generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and performing regression testing on the system to be tested through the calling chain.
For specific implementation of the computer-readable storage medium in the embodiment of the present application, reference may be made to the embodiments of the regression testing method, which are not described herein again.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A regression testing method, comprising:
acquiring a plurality of calling interfaces in a system to be tested and a calling sequence of the calling interfaces;
according to the calling sequence of the calling interfaces, sequentially requesting the calling interfaces;
acquiring calling data of each calling interface in the plurality of calling interfaces, wherein the calling data comprises a parameter mapping relation between each calling interface;
generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and performing regression testing on the system to be tested through the calling chain.
2. The method of claim 1, wherein sequentially requesting the plurality of calling interfaces in the calling order of the plurality of calling interfaces comprises:
determining a first calling interface and a second calling interface in the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces, wherein the second calling interface is the next calling interface of the first calling interface;
requesting the first calling interface to obtain a return parameter of the first calling interface;
according to the return parameters of the first calling interface, requesting the second calling interface to obtain the return parameters of the second calling interface;
and according to the return parameters of the second calling interface, requesting the next calling interface of the second calling interface until the plurality of calling interfaces are sequentially requested.
3. The method of claim 2, wherein requesting the second calling interface according to the return parameters of the first calling interface comprises:
performing parameter mapping on the return parameter of the first calling interface to obtain a first calling parameter of the second calling interface;
acquiring a second calling parameter of the second calling interface;
and requesting the second calling interface according to the first calling parameter and the second calling parameter of the second calling interface.
4. The method of claim 3, wherein obtaining the second call parameter of the second call interface comprises:
acquiring a first parameter type of a first calling parameter of the first calling interface;
comparing the first parameter type with a preset calling parameter type of the second calling interface to determine a second parameter type in the preset calling parameter types of the second calling interface, wherein the second parameter type is different from the first parameter type;
and acquiring a second calling parameter of the second calling interface matched with the second parameter type.
5. The method according to any of claims 2-4, wherein prior to requesting the second calling interface based on the return parameters of the first calling interface, the method further comprises:
and performing assertion judgment on the return parameter of the first calling interface, and confirming that the return parameter of the first calling interface is true.
6. The method of claim 5, wherein after confirming that the return parameter of the first calling interface is true, the method further comprises:
formatting a return parameter of the first calling interface into a first variable;
and executing a preset Structured Query Language (SQL) statement on the first variable to perform database value judgment on the first variable and confirm that the first variable is correct.
7. The method of claim 5, further comprising:
if the return parameter of the first calling interface is not true, triggering a preset task in the system to be tested, wherein the preset task comprises: resetting the calling parameters of the first calling interface, making a request for the first calling interface again, and obtaining the return parameters of the first calling interface again.
8. A regression testing apparatus, comprising:
the first acquisition module is used for acquiring a plurality of calling interfaces in a system to be tested and the calling sequence of the calling interfaces;
the request module is used for sequentially requesting the plurality of calling interfaces according to the calling sequence of the plurality of calling interfaces;
a second obtaining module, configured to obtain call data of each call interface in the multiple call interfaces, where the call data includes a parameter mapping relationship between the call interfaces;
the generation module is used for generating a calling chain according to the calling sequence of the calling interfaces and the calling data of each calling interface;
and the testing module is used for performing regression testing on the system to be tested through the calling chain.
9. An electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 7.
CN202110915055.5A 2021-08-10 2021-08-10 Regression testing method, device, equipment and storage medium Pending CN113609021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110915055.5A CN113609021A (en) 2021-08-10 2021-08-10 Regression testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110915055.5A CN113609021A (en) 2021-08-10 2021-08-10 Regression testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113609021A true CN113609021A (en) 2021-11-05

Family

ID=78340126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110915055.5A Pending CN113609021A (en) 2021-08-10 2021-08-10 Regression testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113609021A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235759A (en) * 2013-05-15 2013-08-07 百度在线网络技术(北京)有限公司 Method and device for generating test cases
CN106776349A (en) * 2017-02-07 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method to set up and system of interface testing process
CN107066382A (en) * 2017-03-09 2017-08-18 北京航空航天大学 A kind of Space Vehicle System automated testing method based on model
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235759A (en) * 2013-05-15 2013-08-07 百度在线网络技术(北京)有限公司 Method and device for generating test cases
CN106776349A (en) * 2017-02-07 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method to set up and system of interface testing process
CN107066382A (en) * 2017-03-09 2017-08-18 北京航空航天大学 A kind of Space Vehicle System automated testing method based on model
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Similar Documents

Publication Publication Date Title
US9824002B2 (en) Tracking of code base and defect diagnostic coupling with automated triage
US8407672B2 (en) Systems and methods for synchronizing software execution across data processing systems and platforms
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN110673936B (en) Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment
CN105224458A (en) A kind of database method of testing and system
CN106970880A (en) A kind of distributed automatization method for testing software and system
CN111966597B (en) Test data generation method and device
CN113127347A (en) Interface testing method, device, equipment and readable storage medium
CN112631919B (en) Contrast test method, device, computer equipment and storage medium
CN112199355B (en) Data migration method and device, electronic equipment and storage medium
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN112817843B (en) Project management method and system
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN111949518A (en) Method, system, terminal and storage medium for generating fault detection script
CN111651358A (en) Method for generating test case, software testing method, device and server
CN113609021A (en) Regression testing method, device, equipment and storage medium
CN107783896B (en) Optimization method and device of data processing model
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN115587048A (en) Regression testing method, terminal device and computer readable storage medium
CN115080382A (en) Code testing method, device, equipment and medium
CN113849404A (en) Management method, device and storage medium for interface test related information
CN112363933A (en) Automatic verification method and device for word paragraph table, computer equipment and storage medium
Lawanna Filtering test case selection for increasing the performance of regression testing
CN114780444B (en) Code optimization method and device, electronic equipment and storage medium
US9053239B2 (en) Systems and methods for synchronizing software execution across data processing systems and platforms

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