Interface automation testing method, device, equipment and computer-readable storage medium

Through the interface automated testing method, the updated test engine is used to generate and run test cases, which solves the inefficiency problem caused by different test cases in interface regression testing, and achieves the effect of quickly locating problems and improving efficiency.

CN111737140BActive Publication Date: 2024-08-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010597341.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-28
Publication Date
2024-08-27
Estimated Expiration
2040-06-28

AI Technical Summary

Technical Problem

The current interface regression testing method generates different test cases each time, resulting in different test results and requiring separate analysis, resulting in low error discovery efficiency and long regression testing time.

Method used

An interface automated testing method is proposed, which receives the interface protocol test request, obtains the target version protocol, determines whether there is a baseline version protocol, updates the test engine, generates target test cases, runs the test cases to obtain the target test results, and compares the baselines Test results quickly locate problems.

Benefits of technology

It improves the efficiency of error detection in test results, reduces the workload of manual review, and improves the efficiency of automated interface testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737140B
    Figure CN111737140B
Patent Text Reader

Abstract

The present invention relates to the technical field of financial technology (Fintech), and the present invention discloses an interface automation testing method, device, equipment and computer-readable storage medium, the method comprising: upon receiving an interface protocol test request, obtaining a target version protocol to be tested corresponding to the interface protocol test request; if there is a baseline version protocol associated with the target version protocol, comparing the target version protocol with the baseline version protocol to obtain protocol update information; obtaining a baseline test engine corresponding to the baseline version protocol, updating the baseline test engine according to the protocol update information, and obtaining a target test engine; generating a target test case according to the target test engine, and running the target test case to obtain a target test result of the target version protocol. The present invention improves the efficiency of regression testing by protocol version comparison testing, without the need for testers to review test results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to an interface automation testing method, device, equipment and a computer-readable storage medium. Background Art

[0002] With the rapid development of Internet technology, especially Internet financial technology (Fintech), more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are being applied in the financial field, and the functions of financial business platforms are becoming more and more.

[0003] Financial business platforms usually set up a large number of data interfaces to realize financial business data interaction. When the interface development of the financial business platform is completed, interface testing is required. Since there are many data interfaces, there are also many test cases for interface testing. Currently, test cases are mainly written manually, which is troublesome, the test case generation time is long, and the interface testing efficiency is low. Based on this, some developers have proposed an automatic test case generation solution. The automatic generation of test cases shortens the test case writing time and improves the interface testing efficiency to a certain extent. However, for frequent regression testing, since the test cases automatically generated each time are different, the test results obtained each time are different, and the test results need to be analyzed each time. The error discovery efficiency in the test results is low, and the regression testing time is long. Summary of the invention

[0004] The main purpose of the present invention is to propose an interface automation testing method, device, equipment and computer-readable storage medium, aiming to solve the technical problems of the current interface regression testing method, in which different test results are obtained each time using different test cases, each time a separate test result analysis is required, the error discovery efficiency in the test results is low, and the regression testing time is long.

[0005] To achieve the above object, the present invention provides an interface automation testing method, which comprises the following steps:

[0006] Upon receiving an interface protocol test request, obtaining a target version protocol to be tested corresponding to the interface protocol test request;

[0007] If there is a baseline version protocol associated with the target version protocol, compare the target version protocol with the baseline version protocol to obtain protocol update information;

[0008] Acquire a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine;

[0009] A target test case is generated according to the target test engine, and the target test case is run to obtain a target test result of the target version protocol.

[0010] Optionally, after the step of obtaining the target version protocol to be tested corresponding to the interface protocol test request when the interface protocol test request is received, the method includes:

[0011] Determining whether there is a baseline version protocol associated with the target version protocol;

[0012] If the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine and a MOCK test engine;

[0013] A target test case is generated according to the target test engine, and the target test case is run to obtain a target test result of the target version protocol.

[0014] Optionally, if the baseline version protocol associated with the target version protocol does not exist, the step of analyzing the target version protocol to generate a target test engine includes:

[0015] If the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to obtain a business scenario identifier of the target version protocol;

[0016] Query the preset data platform, obtain the business test rules corresponding to the business scenario identifier, and aggregate the business test rules to generate a business rule engine;

[0017] Traversing the protocol attributes of the target version protocol, and diverging to generate a basic field engine according to pre-configured divergence rules and field types, field lengths, and field enumerations in the protocol attributes;

[0018] Pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generate a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships;

[0019] The business rule engine, the basic field engine and the MOCK test engine are combined to generate a target test engine.

[0020] Optionally, the step of pulling the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generating a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships includes:

[0021] Pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and obtain the target downstream protocols to be MOCKed downstream of the target version protocol according to the protocol upstream and downstream relationships;

[0022] Obtain a Cartesian divergence target field preset in the target downstream protocol, perform a Cartesian product on the target downstream protocol according to the target field, and generate a successful MOCK set and a failed MOCK set;

[0023] Make a Cartesian product between the successful MOCK sets to obtain a successful MOCK rule, and make a Cartesian product between the failed MOCK set and an element in the successful MOCK set to obtain a failed MOCK rule;

[0024] The success class MOCK rules and the failure class MOCK rules are aggregated to generate the MOCK test engine.

[0025] Optionally, the step of obtaining a baseline test engine corresponding to the baseline version protocol, updating the baseline test engine according to the protocol update information, and obtaining a target test engine includes:

[0026] Obtain a baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and / or a MOCK test engine;

[0027] Querying a preset data platform, obtaining an update scenario identifier in the protocol update information and an update test rule corresponding to the update scenario identifier from the preset data platform, adding the update test rule to the business rule engine, and obtaining an updated business rule engine;

[0028] Traversing the newly added attributes of the protocol update information, updating the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtaining an updated basic field engine;

[0029] Perform a Cartesian product of the protocol update information and the MOCK rules in the MOCK test engine to update the MOCK test engine, thereby obtaining an updated MOCK test engine;

[0030] The updated business rule engine, the updated basic field engine and the updated MOCK test engine are combined to obtain a target test engine.

[0031] Optionally, the step of generating a target test case according to the target test engine and running the target test case to obtain a target test result of the target version protocol includes:

[0032] Obtain the business rule engine, basic field engine and MOCK test engine in the target test engine;

[0033] Extracting business engine rules from the business rule engine, extracting field engine rules from the basic field engine, and extracting MOCK engine rules from the MOCK test engine;

[0034] Generate a target test case according to the business engine rules, the field engine rules and the MOCK engine rules, and run the target test case to obtain the target test result of the target version protocol.

[0035] Optionally, the step of generating a target test case according to the business engine rule, the field engine rule and the MOCK engine rule, and running the target test case to obtain a target test result of the target version protocol includes:

[0036] Obtain the basic case of the business engine rule, call the preset automated testing platform to process the basic case to generate a business message, and intercept the business message to generate a business type test case;

[0037] Obtain the field engine rule, call the business engine rule that must be processed by the preset automated test platform to generate a basic message, intercept the basic message, modify the basic message according to the field engine rule, and generate a field type test case;

[0038] Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases;

[0039] A target test case is generated by performing a Cartesian product of the business type test case, the field type test case and the MOCK type test case, and the target test case is run to obtain a target test result of the target version protocol.

[0040] Optionally, after the step of generating a target test case according to the target test engine and running the target test case to obtain a target test result of the target version protocol, the method includes:

[0041] Obtaining a preset business serial number corresponding to the target test case, and associating the target test result of the target version protocol with the preset business serial number for storage;

[0042] Upon receiving a test result comparison request, using the preset service serial number as a primary key, obtaining a target test result corresponding to the target version protocol and a baseline test result corresponding to the baseline version protocol;

[0043] The target test result and the baseline test result are compared to remove redundant data, and comparison abnormality information is output.

[0044] In addition, to achieve the above object, the present invention also provides an interface automation testing device, the interface automation testing device comprising:

[0045] A request receiving module, used for obtaining the target version protocol to be tested corresponding to the interface protocol test request upon receiving the interface protocol test request;

[0046] A protocol comparison module, configured to compare the target version protocol with the baseline version protocol to obtain protocol update information if there is a baseline version protocol associated with the target version protocol;

[0047] An engine update module, used to obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine;

[0048] The test running module is used to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.

[0049] In addition, to achieve the above-mentioned purpose, the present invention also provides an interface automation testing device, which includes: a memory, a processor, and an interface automation testing program stored in the memory and executable on the processor, and the interface automation testing program, when executed by the processor, implements the steps of the interface automation testing method described above.

[0050] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which an interface automation testing program is stored, and when the interface automation testing program is executed by a processor, the steps of the interface automation testing method described above are implemented.

[0051] The present invention provides an interface automation testing method, device, equipment and computer-readable storage medium. In the embodiment of the present invention, when an interface protocol test request is received, the target version protocol to be tested corresponding to the interface protocol test request is obtained; it is determined whether there is a baseline version protocol associated with the target version protocol, and if there is a baseline version protocol associated with the target version protocol, it is determined to be a regression test, and the target version protocol is compared with the baseline version protocol to obtain protocol update information; the baseline test engine corresponding to the baseline version protocol is obtained, and the baseline test engine is updated according to the protocol update information to obtain the target test engine; a target test case is generated according to the target test engine, and the target test case is run to obtain the target test result of the target version protocol, that is, in this embodiment, by updating the test engine and using the updated test The test engine updates the test cases. Compared with the current interface regression test, the current interface regression test creates test cases each time. Since each test case is a new test case, the test results obtained based on the test case are also new test results. The test result analysis is required each time, and the efficiency of error discovery in the test results is low. The test cases of the present application are updated according to the target protocol version. The test results obtained by the target protocol version are similar to the test results obtained by the baseline version protocol. The test results of the test cases before and after the same update can be compared, which can quickly locate the problem and improve the efficiency of error discovery in the test results. The manual review is not required, which reduces the workload of manual review by testers and improves the efficiency of interface automation testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0053] Figure 2 This is a flow chart of the first embodiment of the interface automation testing method of the present invention;

[0054] Figure 3 A schematic diagram of a specific scenario created by the MOCK test engine in the first embodiment of the interface automation test method of the present invention;

[0055] Figure 4 This is a flow chart of the second embodiment of the interface automation testing method of the present invention;

[0056] Figure 5 A schematic diagram of a scenario in which a business rule engine is updated in the second embodiment of the interface automation testing method of the present invention;

[0057] Figure 6 This is a schematic diagram of a scenario in which a basic field engine is updated in the second embodiment of the interface automation testing method of the present invention;

[0058] Figure 7 A schematic diagram of the process of updating the MOCK test engine in the second embodiment of the interface automation test method of the present invention;

[0059] Figure 8 This is a schematic diagram of a scenario of result comparison in the fourth embodiment of the interface automation testing method of the present invention;

[0060] Fig. 9 This is a schematic diagram of functional modules of an embodiment of an interface automation testing device of the present invention.

[0061] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0062] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0063] The existing interface testing solution is a continuous integration CI testing platform (Continuous Integration Testing Platform: also known as an automated testing platform, which formulates test case inputs and expected checkpoints, and can trigger test cases for execution manually or automatically). The testing solution of this platform provides the generation of automated test cases and automated plans, requires manual construction of automated test cases in tree form, provides an assertion mechanism, supports built-in functions and expressions to calculate assertion results, and supports comparison of expected and actual database queries.

[0064] The CI test platform is associated with a protocol message sending tool. The protocol message sending tool requires manual assembly of interface messages for execution, and manual inspection of the operation results and the interaction between the background and the test report is required to be output as a record for subsequent tests. The CI test platform is associated with a baffle platform. This platform is used to simulate the return messages of upstream and downstream systems, also called a baffle system. The first use of the baffle system requires manual deployment to the upstream system, and the MOCK baffle rules are set on the page where the upstream system is located. The simulated baffle is triggered to take effect by enabling or disabling the rules.

[0065] Such an interface test scheme has a high test case writing cost: the existing CI test scenario coverage is insufficient, and the existing large number of stock test cases are difficult to supplement. Each scenario of the existing baffle platform needs to be configured separately, and it is time-consuming and labor-intensive to construct baffles for a large number of abnormal scenarios during testing. Test case assertions are complex to write and easy to miss; test cases are frequently regressed, and test comparison results require manual intervention and review. A large number of test cases put people in a state of fatigue analysis, which is not conducive to the efficient implementation of regression testing. Based on the deficiencies of the interface test scheme in the prior art, the interface automation testing method, device, equipment and computer-readable storage medium of the present invention are proposed.

[0066] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0067] The interface automation test device in the embodiment of the present invention may be a PC or a server.

[0068] like Figure 1 As shown, the interface automation test equipment may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0069] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0070] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an interface automation test program.

[0071] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the interface automation test program stored in the memory 1005 and perform the operations in the following interface automation test method.

[0072] Based on the above hardware structure, an embodiment of the interface automation testing method of the present invention is proposed.

[0073] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of an interface automation testing method of the present invention, the method comprising:

[0074] Step S10, when receiving an interface protocol test request, obtaining a target version protocol to be tested corresponding to the interface protocol test request;

[0075] In this embodiment, the interface automation testing method is applied to the interface automation testing equipment. The interface automation testing equipment is the hardware carrier of the interface automation testing computer program. The automation testing equipment in this embodiment can be set up in different financial institutions.

[0076] The interface automation test device receives an interface test request, wherein the triggering method of the interface test request is not specifically limited, that is, the interface test request may be actively triggered by the user, for example, the user clicks the "Interface Test" virtual button in the display interface of the interface automation test device to manually trigger the interface test request; in addition, the interface test request may also be automatically triggered by the interface automation test device, for example, the tester pre-sets in the interface test device: when an interface version update is detected, the interface test request is automatically triggered, the interface automation test device monitors the status of the interface in real time, and when the interface automation test device detects the release of a new interface protocol version, the interface automation test device automatically triggers the interface test request.

[0077] When the interface automation test equipment receives an interface protocol test request, the interface automation test equipment obtains the target version protocol to be tested corresponding to the interface protocol test request, wherein the content of the target version protocol is not specifically limited, that is, the target version protocol can be the first version of the interface protocol, or it can be the second version of the interface protocol and its later updated version of the interface protocol.

[0078] Step S20, determining whether there is a baseline version protocol associated with the target version protocol;

[0079] After the interface automation test equipment obtains the target version protocol to be tested, the interface automation test equipment obtains the version identifier of the target version protocol, and the interface automation test equipment determines whether the target version protocol is the first protocol version based on the version identifier. When the target version protocol is the first protocol version, the interface automation test equipment determines that there is no baseline version protocol associated with the target version protocol, and the interface automation test equipment needs to directly create a test case based on the target version protocol; when the target version protocol is not the first protocol version, the interface automation test equipment determines that there is a baseline version protocol associated with the target version protocol, and the interface automation test equipment can update the test case of the baseline version protocol to generate a test case corresponding to the target version protocol, wherein the baseline version protocol is a "snapshot" of each artifact version in the project repository at a specific period of time, which provides a formal standard, and subsequent work is based on this standard, and this standard can only be changed after authorization. After an initial baseline is established, each subsequent change to it will be recorded as a difference until the next baseline version protocol is built.

[0080] The technical solution in this embodiment is to reduce the operations of testers in reviewing test results. Therefore, the interface automation testing equipment determines whether there is a baseline version protocol associated with the target version protocol. If there is a baseline version protocol associated with the target version protocol, the test case is updated according to the baseline version protocol, and the test is performed using the updated test case to obtain the test results. In this way, the test results can be directly compared without manual review.

[0081] For ease of understanding, this embodiment first describes the interface test of a baseline version protocol that is not associated with a target version protocol. That is, this embodiment first describes the steps of performing an interface automation test on the initial version protocol by the interface automation test device when the target version protocol is the initial version protocol. Specifically:

[0082] Step S30, if the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine and a MOCK test engine;

[0083] If there is no baseline version protocol associated with the target version protocol, the interface automation test equipment analyzes the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine, and a MOCK test engine. Business rule engine (Business Rule Engine): provides a configuration mechanism based on the business requirements of some special cases, and generates a test case pool according to the preset configuration. Basic field engine (Interface Field Rule Engine): automatically generates a basic field verification test case pool based on the attribute length, mandatory, enumeration and other properties of all fields of the interface. MOCK engine (Mock Rule Engine): MOCK service is a baffle tool proposed for network, code, and RMB services. The MOCK engine is a set of solutions for automatically generating abnormal scenario test cases based on the MOCK service; specifically, it includes:

[0084] Step a1: if the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to obtain a business scenario identifier of the target version protocol;

[0085] Step a2, querying the preset data platform, obtaining the business test rules corresponding to the business scenario identifier, and summarizing the business test rules to generate a business rule engine;

[0086] Step a3, traversing the protocol attributes of the target version protocol, and diverging to generate a basic field engine according to pre-configured divergence rules and field types, field lengths, and field enumerations in the protocol attributes;

[0087] Step a4, pulling the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generating a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships;

[0088] Step a5, combining the business rule engine, the basic field engine and the MOCK test engine to generate a target test engine.

[0089] If there is no baseline version protocol associated with the target version protocol, the interface automation test device analyzes the target version protocol and obtains the business scenario identifier of the target version protocol. In step a2 of this embodiment, the interface automation test device generates a business rule engine based on the business scenario identifier, including: the interface automation test device queries the preset data maintenance platform (the preset data maintenance platform refers to a pre-set business data management platform, which contains business scenario identifiers corresponding to each interface, business scenario information related to the business scenario identifier, and business test rules corresponding to each business scenario information. The preset data maintenance platform is specifically used to automatically trigger the call rule when the next batch is cut and the daily cut is synchronized after the batch execution is completed and the test case is verified, and the platform captures the data of the batch that meets the required form in real time and manages the data), obtains the business test rules corresponding to the business scenario identifier, and summarizes the business test rules to generate a business rule engine.

[0090] That is, the interface automation test equipment manually configures an automation test basic case on the automation test platform to maintain action scheduling and parameter transfer between actions. The business rule engine batch generates a business rule engine pool (1*n) through the basic cases in the automation test platform and the data platform scenario set. After the data platform scenario of the protocol to be tested is updated, the business engine is automatically updated synchronously and added to the business engine pool to generate a business rule engine.

[0091] For example, the business rule engine automatically generates engine data based on the Yangshu platform scenario and stores it in the engine pool; the Yangshu platform scenario changes trigger automatic engine updates, and support manual maintenance. The rules are divided into three categories: must pass, success, and failure. The must pass rules are used to generate field type test cases and MOCK type test cases. The business engine pool includes fields such as the engine rule identifier, the Yangshu platform scenario identifier, the automated testing platform basic rule identifier, the rule summary, and the status. For example, the rule summary is taken from the Yangshu platform scenario, such as the Yangshu platform scenario "931", and the summary is "settled by order - single, 0T loan, stay at 0T+1 day".

[0092] In step a3 of this embodiment, the interface automation test device generates a basic field engine, including: the interface automation test device traverses the protocol attributes of the target version protocol, and diverges to generate a basic field engine according to pre-configured divergence rules and field types, field lengths, and field enumerations in the protocol attributes.

[0093] For example, 1. If the field is of STRING type: if there is a default value, it will generate equal to the default value, not equal to the default value, empty string, NULL; if there is an enumeration value, it will generate equal to each enumeration value, non-enumeration value, empty string, NULL; if there is no default value and enumeration value, it will generate empty string, NULL, equal length, and overlength; 2. If the field is of DECIMAL type: it will generate empty string, NULL value; it will generate negative numbers and random numbers of equal lengths as maxLength (maximum precision length) and delLength (minimum number length); 0; 0.0; 0.00; maxLength equal length and delLength equal length Random number; random number equal to maxLength and extra long random number; random number equal to maxLength and extra long delLength; 3. If the field is of TIME type: emit YYYYMMddHHmmss and some illegal quantities according to system time; 4. If the field is of NUMBER type: empty; negative number and random number equal to maxLength; 0; random number equal to maxLength; random number extra long maxLength; letters + random number equal to maxLength; 5. If the field is of MsgFieldArray type: emit empty; one set of data; two sets of data; store the emitted rules into the field engine pool.

[0094] In step a4 of this embodiment, the interface automation test equipment generates a MOCK test engine. The MOCK engine automatically generates an engine pool that saves engine rules based on the upstream and downstream relationships and attribute values ​​of the protocol; the MOCK engine pool includes fields such as engine rule ID, MOCK message header, MOCK message body, rule summary, and status. The summary is the downstream service ID and the service status to be mocked, such as the MOCK message header "{"02100040":"response.errCode='0000';response.retStatus='S';response.retList=”;","02300298":"response.errCode='9999';response.retStatus='F';response.retList=”;"" ,MOCK message body "{"02100040":{"retCode":"30790000","retMsg":"MOCKSUCC"},"02300298":{"retCode":"30790002","retMsg":"MOCKFAIL"}}", summary {"02100040":"succ","02300298":"fail"}, which means that 02100040 protocol returns successfully and 02300298 service returns failed. The steps generated by the MOCK test engine include:

[0095] Step a41, pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and obtain each target downstream protocol to be MOCKed downstream of the target version protocol according to the protocol upstream and downstream relationships;

[0096] Step a42, obtaining the target field for Cartesian divergence configured in the preset configuration in the target downstream protocol, performing Cartesian product on the target downstream protocol according to the target field, and generating a successful MOCK set and a failed MOCK set;

[0097] Step a43, making a Cartesian product between the successful MOCK sets to obtain a successful MOCK rule, and making a Cartesian product between the failed MOCK set and an element in the successful MOCK set to obtain a failed MOCK rule;

[0098] Step a44, aggregating the success class MOCK rules and the failure class MOCK rules to generate the MOCK test engine.

[0099] For example, 1. The interface automation test equipment pre-configures which fields in the downstream protocol need Cartesian divergence, and the successful enumeration set and failed enumeration set of each attribute. Figure 3As shown in the figure, protocol 1 contains attributes A and B, where A:{0}, B:{a} are successful enumeration value sets, and A:{1}, B:{b,c} are failed enumeration value sets; 2. The interface automation test equipment obtains the downstream protocol that needs MOCK according to the upstream and downstream relationship (1:n) of the protocol to be tested; 3. The interface automation test equipment performs Cartesian product on each downstream protocol according to the divergent field configuration to generate its own successful and failed MOCK sets, such as Figure 3 As shown, the Cartesian product {0}*{a}={0,a} is made between the successful sets of interface 1, and the Cartesian product {1}*{b,c}={1,b},{1,c} is made between the failed sets; 4. The Cartesian product of the successful type sets between each downstream protocol is made to generate the successful class MOCK rule, which is written into the engine pool; as shown Figure 3 The successful MOCK sets of interface 1 and interface 2 are Cartesian products to generate {0,a,d},{0,a,e}; 4. Each downstream protocol failure class set only needs to be combined with the first passed data set of all other protocols and written into the engine pool. Figure 3 The Cartesian product of the failed MOCK set of interface 1 and the first successful MOCK set of interface 2 is generated into {1,b,d},{1,c,d}, and the successful MOCK rules and the failed MOCK rules are summarized to generate the MOCK test engine; the interface automation test equipment combines the business rule engine, the basic field engine and the MOCK test engine to generate the target test engine.

[0100] The interface automation test equipment drives the target test engine to generate test cases for interface automation testing. Specifically:

[0101] Step S40, generating a target test case according to the target test engine, and running the target test case to obtain a target test result of the target version protocol.

[0102] The business rule engine in the interface automation test equipment drives the automatic generation of business type test cases; the basic field engine drives the automatic generation of protocol field type test cases; the MOCK engine drives the automatic generation of MOCK type test cases; the target test engine selects the three major engine data for Cartesian product to generate target test cases, that is, the interface automation test equipment extracts business type test cases, field type test cases and MOCK type test cases from the engine pool corresponding to the target test engine, and splices the business type test cases, field type test cases and MOCK type test cases to form target test cases, and the interface automation test equipment runs the target test cases to obtain the target test results of the target version protocol. In this embodiment, the interface automation test equipment creates test cases when the target protocol version is the initial protocol version, making the interface automation test more efficient.

[0103] Further, refer to Figure 4, Figure 4 This is a flow chart of the second embodiment of the interface automation testing method of the present invention.

[0104] Based on the first embodiment of the interface automation test method of the present invention, a second embodiment of the interface automation test method of the present invention is proposed; this embodiment is the step after step S20 in the first embodiment, and the difference between this embodiment and the above implementation is that:

[0105] Step S50: If there is a baseline version protocol associated with the target version protocol, compare the target version protocol with the baseline version protocol to obtain protocol update information.

[0106] If there is a baseline version protocol associated with the target version protocol, the interface automation test device compares the target version protocol with the baseline version protocol to obtain protocol update information, and the interface automation test device updates the test engine according to the protocol update information, specifically:

[0107] Step S60, obtaining a baseline test engine corresponding to the baseline version protocol, updating the baseline test engine according to the protocol update information, and obtaining a target test engine.

[0108] The interface automated test device obtains a baseline test engine corresponding to the baseline version protocol, and the interface automated test device updates the baseline test engine according to the protocol update information to obtain a target test engine, specifically including:

[0109] Step b1, obtaining a baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and / or a MOCK test engine;

[0110] Step b2, querying a preset data platform, obtaining an update scenario identifier in the protocol update information and an update test rule corresponding to the update scenario identifier from the preset data platform, adding the update test rule to the business rule engine, and obtaining an updated business rule engine;

[0111] Step b3, traversing the newly added attributes of the protocol update information, updating the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtaining an updated basic field engine;

[0112] Step b4, performing a Cartesian product between the protocol update information and the MOCK rules in the MOCK test engine to update the MOCK test engine and obtain an updated MOCK test engine;

[0113] Step b5, combining the updated business rule engine, the updated basic field engine and the updated MOCK test engine to obtain a target test engine.

[0114] That is, the interface automated testing device obtains the baseline test engine corresponding to the baseline version protocol, the baseline test engine includes: business rule engine, basic field engine and / or MOCK test engine, the interface automated testing device updates the business rule engine, basic field engine and / or MOCK test engine respectively, and refers to Figure 5 , Figure 5 The present invention is a schematic diagram of a scenario in which the business rule engine is updated in the second embodiment of the interface automation testing method of the present invention; step b1 of updating the business rule engine in this embodiment includes: the interface automation testing device queries a preset maintenance data platform, obtains an update scenario identifier in the protocol update information, and an update test rule corresponding to the update scenario identifier from the preset maintenance data platform, and the interface automation testing device adds the update test rule to the business rule engine to obtain an updated business rule engine.

[0115] Reference Figure 6 , Figure 6 This is a schematic diagram of the scenario of updating the basic field engine in the second embodiment of the interface automation testing method of the present invention. In this embodiment, the steps for the interface automation testing device to update the basic field engine include: 1. Synchronize the protocol management platform (the protocol management module uses a timed polling mechanism to pull the latest version of the protocol and upstream and downstream relationships of the protocol management platform in real time, automatically synchronize to the protocol interface management module, and provide personalized protocol configuration functions. Subsequent engine generation and update rely on the definition of protocol attributes and the upstream and downstream relationships of the protocol. The protocol management module includes interface configuration management and upstream and downstream interface management) new version of the protocol. 2. Compare the two new and old versions of the target version protocol and the baseline version protocol to obtain newly added attributes, newly added attribute enumerations, type changes, and length changes; 3. According to the background definition rules based on the newly added attributes, newly added enumerations, type changes and other information, the new engine rules are automatically diverged, and added to the engine pool to obtain an updated business rule engine.

[0116] Reference Figure 7 , Figure 7 This is a flow chart of the MOCK test engine update in the second embodiment of the interface automation test method of the present invention; in this embodiment, the steps of the interface automation test device updating the MOCK test engine include: 1. Compare the new and old downstream protocols, identify and store the updated changes: add new enumerations, add new fields, add new upstream and downstream result ports, and delete without processing; for example, a. If a new enumeration is added: use the original Cartesian product data set and the new enumeration to re-Cartesian product, and add it to the engine pool. Figure 3The A field of interface 1 adds successful enumeration 2, and the successful MOCK collection adds enumeration 2 and the successful MOCK collection of field B to generate {2, a}. The newly added MOCK collection executes the MOCK engine generation logic to generate engine rules. b. If a new field is added: use the original Cartesian product data set and the enumeration values ​​of the newly added field to re-cartesian product and add it to the engine pool. Figure 3 Interface 1 adds a C field, and the original successful or failed MOCK set is Cartesian-producted with the C field success or failure enumeration. The reorganized Cartesian product combination updates the elements in the original MOCK set, for example: {0,a} is {0,a,w}, etc., and the remaining rules are added to the MOCK set. After the Cartesian product of the updated MOCK set, the rules in the original MOCK engine are updated, and the new rules are added to the engine. c. If a new protocol is added: determine whether the upstream and downstream protocols participate in MOCK. If so, re-walk the MOCK engine generation logic to obtain an updated MOCK test engine.

[0117] The interface automation test device combines the updated business rule engine, the updated basic field engine and the updated MOCK test engine to obtain a target test engine, so as to perform interface automation testing through the target test engine, specifically:

[0118] Step S70, generating a target test case according to the target test engine, and running the target test case to obtain a target test result of the target version protocol.

[0119] The business rule engine in the interface automation test equipment drives the automatic generation of business type test cases; the basic field engine drives the automatic generation of protocol field type test cases; the MOCK engine drives the automatic generation of MOCK type test cases; the target test engine selects the three major engine data for Cartesian product to generate target test cases, that is, the interface automation test equipment extracts business type test cases, field type test cases and MOCK type test cases from the engine pool corresponding to the target test engine, and splices the business type test cases, field type test cases and MOCK type test cases to form target test cases, and the interface automation test equipment runs the target test cases to obtain the target test results of the target version protocol.

[0120] In an embodiment of the present invention, when an interface protocol test request is received, a target version protocol to be tested corresponding to the interface protocol test request is obtained; it is determined whether there is a baseline version protocol associated with the target version protocol; if there is a baseline version protocol associated with the target version protocol, it is determined to be a regression test, and the target version protocol is compared with the baseline version protocol to obtain protocol update information; a baseline test engine corresponding to the baseline version protocol is obtained, and the baseline test engine is updated according to the protocol update information to obtain a target test engine; a target test case is generated according to the target test engine, and the target test case is run to obtain a target test result of the target version protocol, that is, in this embodiment, By updating the test engine and using the updated test engine to update the test cases, compared with the current interface regression test, the current interface regression test creates test cases each time. Since each test case is a new test case, the test results obtained based on the test case are also new test results. The test cases in the embodiment of the present invention are updated according to the target protocol version. The test results obtained by the target protocol version are similar to the test results obtained by the baseline version protocol. The test results of the test cases before and after the same update can be compared, which can quickly locate the problem and improve the efficiency of error discovery. The manual review is not required, which reduces the workload of manual review by testers and improves the efficiency of interface automation testing.

[0121] Furthermore, based on the above-mentioned embodiment of the interface automation testing method of the present invention, a third embodiment of the interface automation testing method of the present invention is proposed.

[0122] This embodiment is a refinement of step S40 in the first embodiment and / or step S70 in the second embodiment. This embodiment provides a specific implementation method of generating a target test case according to the target test engine and running the target test case to obtain a target test result of the target version protocol, including:

[0123] Obtain the business rule engine, basic field engine and MOCK test engine in the target test engine;

[0124] Extracting business engine rules from the business rule engine, extracting field engine rules from the basic field engine, and extracting MOCK engine rules from the MOCK test engine;

[0125] Generate a target test case according to the business engine rules, the field engine rules and the MOCK engine rules, and run the target test case to obtain the target test result of the target version protocol.

[0126] The interface automation device obtains the business rule engine, the basic field engine and the MOCK test engine in the target test engine; the interface automation device extracts the business engine rules from the business rule engine, the field engine rules from the basic field engine, and the MOCK engine rules from the MOCK test engine; the interface automation device generates a target test case according to the business engine rules, the field engine rules and the MOCK engine rules, and runs the target test case to obtain the target test result of the target version protocol, specifically, including:

[0127] Obtain the basic case of the business engine rule, call the preset automated testing platform to process the basic case to generate a business message, and intercept the business message to generate a business type test case;

[0128] Obtain the field engine rule, call the business engine rule that must be processed by the preset automated test platform to generate a basic message, intercept the basic message, modify the basic message according to the field engine rule, and generate a field type test case;

[0129] Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases;

[0130] A target test case is generated by performing a Cartesian product of the business type test case, the field type test case and the MOCK type test case, and the target test case is run to obtain a target test result of the target version protocol.

[0131] That is, the interface automation test equipment generates a basic case for obtaining business engine rules, calls the preset automation test platform to process the basic case to generate business messages, intercepts the business messages to generate business type test cases, including: 1. Obtaining the automation test platform basic case of the business engine rules and the scenario identifier of the data platform, calling the automation test platform, intercepting the message generated by the automation test platform into the test case pool, and generating a business type test case.

[0132] The process of generating test cases for basic field types of interface automation testing equipment: 1. Get the field engine rules. 2. Get the must-pass business engine rules. Call the CI platform and intercept the message generated by the CI platform; 3. According to the field engine rules, tamper with message A to obtain the use case message A', which falls into the use case pool to generate a basic field type test case. For example, the test case id and name are the must-pass business engine and the corresponding field engine id and summary are spliced ​​separately. For example, the use case id is "B0000000001_F15759718157471", and the use case name is "Settlement by order-single, 0T loan, stay within 0T+1 day, APP_TYPE enumeration value range".

[0133] The interface automation test equipment MOCK type test case generation process: 1. Obtain MOCK engine rules; 2. Obtain the must-pass business engine rules. Call the CI platform and intercept the messages generated by the CI platform. Fall into the use case pool. 3. After all mock use cases are generated, use the use case "preset business serial number" as the if condition to splice the various mock messages in the MOCK engine to generate the MOCK configuration. Push the MOCK configuration to the mockserver platform. The interface automation test equipment performs a Cartesian product of the business type test case, field type test case, and MOCK type test case to generate a target test case, and runs the target test case to obtain the target test result of the target version protocol. In this embodiment, the target test case is generated according to the target test engine, and the tester does not need to manually write the target test case, which improves the efficiency of interface automation testing.

[0134] Furthermore, based on the above-mentioned embodiment of the interface automation testing method of the present invention, a fourth embodiment of the interface automation testing method of the present invention is proposed.

[0135] This embodiment is a step after step S40 in the first embodiment and step S70 in the second embodiment. The difference between this embodiment and the above embodiments is that:

[0136] Obtaining a preset business serial number corresponding to the target test case, and associating the target test result of the target version protocol with the preset business serial number for storage;

[0137] Upon receiving a test result comparison request, using the preset service serial number as a primary key, obtaining a target test result corresponding to the target version protocol and a baseline test result corresponding to the baseline version protocol;

[0138] The target test result and the baseline test result are compared to remove redundant data, and comparison abnormality information is output.

[0139] The interface automation testing equipment obtains a preset business serial number corresponding to a target test case, and stores the target test result of the target version protocol in association with the preset business serial number; upon receiving a test result comparison request, the preset business serial number is used as a primary key to obtain the target test result corresponding to the target version protocol and the baseline test result corresponding to the baseline version protocol; the target test result is compared with the baseline test result to remove redundant data, and comparison exception information is output.

[0140] Specifically, refer to Figure 8 , Figure 8 The schematic diagram of the scenario of result comparison in the fourth embodiment of the interface automation test method of the present invention; the interface automation test equipment obtains the target message and target DB of the target version protocol; the interface automation test equipment obtains the baseline message and baseline target DB of the baseline version protocol. The result comparison is divided into message comparison and DB comparison. The message and DB comparison are use case level comparisons. The use case execution results are traced back according to the message and DB comparison results. The message comparison only performs consistency comparison on the use case return message, and configures the use case "preset business serial number" and the primary key association relationship of each table. The full library table primary key is used as the query condition in the DB comparison SQL to generate a full library table query statement that is independent of the subsystem dimension scenario. The DB results of each use case use the "preset business serial number" as the input parameter to obtain a use case level backup of the full library table results. The executed test plan is checked for consistency with the return message of the baseline version to obtain consistent records, inconsistent records, and baseline version missing comparison records. Inconsistent difference records may be noise, such as timestamp and other fields. A noise statistical analysis function is provided to facilitate manual maintenance of the noise field list; in this embodiment, the business serial number is preset as the primary key, the test result comparison is performed, and the abnormal information of the test interface result is output, which does not require manual review by testers and improves the efficiency of regression testing.

[0141] Reference Fig. 9 , Fig. 9 A schematic diagram of functional modules of an embodiment of an interface automation test device of the present invention. In the embodiment of the interface automation test device of the present invention, the interface automation test device comprises:

[0142] A request receiving module, used for obtaining the target version protocol to be tested corresponding to the interface protocol test request upon receiving the interface protocol test request;

[0143] A protocol comparison module, configured to compare the target version protocol with the baseline version protocol to obtain protocol update information if there is a baseline version protocol associated with the target version protocol;

[0144] An engine update module, used to obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine;

[0145] The test running module is used to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.

[0146] In one embodiment, the interface automation testing device comprises:

[0147] A protocol determination module, used to determine whether there is a baseline version protocol associated with the target version protocol;

[0148] An engine generation module, configured to analyze the target version protocol to generate a target test engine if the baseline version protocol associated with the target version protocol does not exist, wherein the target test engine includes a business rule engine, a basic field engine, and a MOCK test engine;

[0149] The test running module is used to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.

[0150] In one embodiment, the engine generation module includes:

[0151] an analyzing and acquiring unit, configured to analyze the target version protocol and acquire a business scenario identifier of the target version protocol if the baseline version protocol associated with the target version protocol does not exist;

[0152] The first generating unit is used to query the preset data platform, obtain the business test rules corresponding to the business scenario identifier, and summarize the business test rules to generate a business rule engine;

[0153] A second generating unit, configured to traverse the protocol attributes of the target version protocol, and generate a basic field engine by diverging according to a pre-configured divergence rule and a field type, a field length, and a field enumeration in the protocol attributes;

[0154] The third generating unit is used to pull the protocol content information and the upstream and downstream relationship of the target version protocol from the preset protocol management platform, and generate a MOCK test engine according to the protocol content information and the upstream and downstream relationship of the protocol;

[0155] The fourth generating unit is used to combine the business rule engine, the basic field engine and the MOCK test engine to generate a target test engine.

[0156] In one embodiment, the third generating unit is further used for:

[0157] Pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and obtain the target downstream protocols to be MOCKed downstream of the target version protocol according to the protocol upstream and downstream relationships;

[0158] Obtain a Cartesian divergence target field preset in the target downstream protocol, perform a Cartesian product on the target downstream protocol according to the target field, and generate a successful MOCK set and a failed MOCK set;

[0159] Make a Cartesian product between the successful MOCK sets to obtain a successful MOCK rule, and make a Cartesian product between the failed MOCK set and an element in the successful MOCK set to obtain a failed MOCK rule;

[0160] The success class MOCK rules and the failure class MOCK rules are aggregated to generate the MOCK test engine.

[0161] In one embodiment, the engine update module includes:

[0162] An engine acquisition unit, configured to acquire a baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and / or a MOCK test engine;

[0163] A first updating unit is used to query a preset maintenance data platform, obtain an update scenario identifier in the protocol update information and an update test rule corresponding to the update scenario identifier from the preset maintenance data platform, add the update test rule to the business rule engine, and obtain an updated business rule engine;

[0164] A second updating unit, configured to traverse the newly added attributes of the protocol update information, update the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtain an updated basic field engine;

[0165] A third updating unit, configured to perform a Cartesian product between the protocol update information and the MOCK rule in the MOCK test engine to update the MOCK test engine, and obtain an updated MOCK test engine;

[0166] The engine combination unit is used to combine the updated business rule engine, the updated basic field engine and the updated MOCK test engine to obtain a target test engine.

[0167] In one embodiment, the running test module includes:

[0168] An engine acquisition unit, used to acquire a business rule engine, a basic field engine and a MOCK test engine in the target test engine;

[0169] A rule extraction unit, used to extract business engine rules from the business rule engine, extract field engine rules from the basic field engine, and extract MOCK engine rules from the MOCK test engine;

[0170] A use case generation unit is used to generate a target test case according to the business engine rule, the field engine rule and the MOCK engine rule, and run the target test case to obtain the target test result of the target version protocol.

[0171] In one embodiment, the use case generating unit is further used to:

[0172] Obtain the basic case of the business engine rule, call the preset automated testing platform to process the basic case to generate a business message, and intercept the business message to generate a business type test case;

[0173] Obtain the field engine rule, call the business engine rule that must be processed by the preset automated test platform to generate a basic message, intercept the basic message, modify the basic message according to the field engine rule, and generate a field type test case;

[0174] Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases;

[0175] A target test case is generated by performing a Cartesian product of the business type test case, the field type test case and the MOCK type test case, and the target test case is run to obtain a target test result of the target version protocol.

[0176] In one embodiment, the interface automation testing device comprises:

[0177] An acquisition and saving module is used to acquire a preset business serial number corresponding to the target test case, and associate the target test result of the target version protocol with the preset business serial number and save it;

[0178] A result acquisition module is used to, upon receiving a test result comparison request, use the preset business serial number as a primary key to acquire a target test result corresponding to the target version protocol and a baseline test result corresponding to the baseline version protocol;

[0179] The result comparison module is used to compare the target test result with the baseline test result to remove redundant data and output comparison abnormality information.

[0180] In an embodiment of the present invention, when an interface protocol test request is received, a target version protocol to be tested corresponding to the interface protocol test request is obtained; whether there is a baseline version protocol associated with the target version protocol is determined; if there is a baseline version protocol associated with the target version protocol, it is determined to be a regression test, and the target version protocol is compared with the baseline version protocol to obtain protocol update information; a baseline test engine corresponding to the baseline version protocol is obtained, and the baseline test engine is updated according to the protocol update information to obtain a target test engine; a target test case is generated according to the target test engine, and the target test case is run to obtain a target test result of the target version protocol, that is, in this embodiment, the test engine is updated and the test case is updated using the updated test engine. Compared with the current interface regression test, the current interface regression test creates a test case each time. Since each test case is a new test case, the test result obtained based on the test case is also a new test result, while the test case of the present application is updated according to the target protocol version, and the test result obtained by the target protocol version is similar to the test result obtained by the baseline version protocol, so that the tester can quickly locate the problem, reduce the workload of the tester's manual review, and further improve the efficiency of the interface automation test.

[0181] The methods executed by the above-mentioned program modules can refer to the various embodiments of the interface automation testing method of the present invention, and will not be described in detail here.

[0182] The present invention also provides a computer-readable storage medium.

[0183] The computer-readable storage medium of the present invention stores an interface automation test program, and when the interface automation test program is executed by a processor, the steps of the interface automation test method described above are implemented.

[0184] Among them, the method implemented when the interface automation test program running on the processor is executed can refer to the various embodiments of the interface automation test method of the present invention, and will not be repeated here.

[0185] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0186] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0188] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An interface automation testing method, characterized in that: The interface automation testing method comprises the following steps: Upon receiving an interface protocol test request, obtaining a target version protocol to be tested corresponding to the interface protocol test request; If there is a baseline version protocol associated with the target version protocol, compare the target version protocol with the baseline version protocol to obtain protocol update information; Acquire a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine; Generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol; Obtaining a preset business serial number corresponding to the target test case, and associating the target test result of the target version protocol with the preset business serial number for storage; Upon receiving a test result comparison request, using the preset service serial number as a primary key, obtaining a target test result corresponding to the target version protocol and a baseline test result corresponding to the baseline version protocol; The target test result and the baseline test result are compared to remove redundant data, and comparison abnormality information is output.

2. The interface automation testing method according to claim 1, characterized in that: After the step of obtaining the target version protocol to be tested corresponding to the interface protocol test request upon receiving the interface protocol test request, the method includes: Determining whether there is a baseline version protocol associated with the target version protocol; If the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine and a MOCK test engine; A target test case is generated according to the target test engine, and the target test case is run to obtain a target test result of the target version protocol.

3. The interface automation testing method according to claim 2, characterized in that: If the baseline version protocol associated with the target version protocol does not exist, the step of analyzing the target version protocol to generate a target test engine includes: If the baseline version protocol associated with the target version protocol does not exist, analyzing the target version protocol to obtain a business scenario identifier of the target version protocol; Query the preset data platform, obtain the business test rules corresponding to the business scenario identifier, and aggregate the business test rules to generate a business rule engine; Traversing the protocol attributes of the target version protocol, and diverging to generate a basic field engine according to pre-configured divergence rules and field types, field lengths, and field enumerations in the protocol attributes; Pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generate a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships; The business rule engine, the basic field engine and the MOCK test engine are combined to generate a target test engine.

4. The interface automation testing method according to claim 3, characterized in that: The step of pulling the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generating a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships, includes: Pull the protocol content information and protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and obtain the target downstream protocols to be MOCKed downstream of the target version protocol according to the protocol upstream and downstream relationships; Obtain a Cartesian divergence target field preset in the target downstream protocol, perform a Cartesian product on the target downstream protocol according to the target field, and generate a successful MOCK set and a failed MOCK set; Make a Cartesian product between the successful MOCK sets to obtain a successful MOCK rule, and make a Cartesian product between the failed MOCK set and an element in the successful MOCK set to obtain a failed MOCK rule; The success class MOCK rules and the failure class MOCK rules are aggregated to generate the MOCK test engine.

5. The interface automation testing method according to claim 1, characterized in that: The step of obtaining a baseline test engine corresponding to the baseline version protocol, updating the baseline test engine according to the protocol update information, and obtaining a target test engine includes: Obtain a baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and / or a MOCK test engine; Querying a preset data platform, obtaining an update scenario identifier in the protocol update information and an update test rule corresponding to the update scenario identifier from the preset data platform, adding the update test rule to the business rule engine, and obtaining an updated business rule engine; Traversing the newly added attributes of the protocol update information, updating the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtaining an updated basic field engine; Perform a Cartesian product of the protocol update information and the MOCK rules in the MOCK test engine to update the MOCK test engine, thereby obtaining an updated MOCK test engine; The updated business rule engine, the updated basic field engine and the updated MOCK test engine are combined to obtain a target test engine.

6. The interface automation testing method according to claim 1 or 2, characterized in that: The step of generating a target test case according to the target test engine and running the target test case to obtain a target test result of the target version protocol includes: Obtain the business rule engine, basic field engine and MOCK test engine in the target test engine; Extracting business engine rules from the business rule engine, extracting field engine rules from the basic field engine, and extracting MOCK engine rules from the MOCK test engine; Generate a target test case according to the business engine rules, the field engine rules and the MOCK engine rules, and run the target test case to obtain the target test result of the target version protocol.

7. The interface automation testing method according to claim 6, characterized in that: The step of generating a target test case according to the business engine rule, the field engine rule and the MOCK engine rule, and running the target test case to obtain a target test result of the target version protocol includes: Obtain the basic case of the business engine rule, call the preset automated testing platform to process the basic case to generate a business message, and intercept the business message to generate a business type test case; Obtain the field engine rule, call the business engine rule that must be processed by the preset automated test platform to generate a basic message, intercept the basic message, modify the basic message according to the field engine rule, and generate a field type test case; Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases; A target test case is generated by performing a Cartesian product of the business type test case, the field type test case and the MOCK type test case, and the target test case is run to obtain a target test result of the target version protocol.

8. An interface automation testing device, characterized in that: The interface automation testing device comprises: A request receiving module, used for obtaining the target version protocol to be tested corresponding to the interface protocol test request when receiving the interface protocol test request; A protocol comparison module, configured to compare the target version protocol with the baseline version protocol to obtain protocol update information if there is a baseline version protocol associated with the target version protocol; An engine update module, used to obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine; A test running module, used to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol; An acquisition and saving module is used to obtain a preset business serial number corresponding to the target test case, and associate the target test result of the target version protocol with the preset business serial number and save it; A result acquisition module is used to, upon receiving a test result comparison request, use the preset business serial number as a primary key to acquire a target test result corresponding to the target version protocol and a baseline test result corresponding to the baseline version protocol; The result comparison module is used to compare the target test result with the baseline test result to remove redundant data and output comparison abnormality information.

9. An interface automation test device, characterized in that: The interface automation testing device comprises: a memory, a processor, and an interface automation testing program stored in the memory and executable on the processor. When the interface automation testing program is executed by the processor, the steps of the interface automation testing method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an interface automation testing program, and when the interface automation testing program is executed by the processor, the steps of the interface automation testing method according to any one of claims 1 to 7 are implemented.