CN112783793B - Automatic interface test system and method - Google Patents

Automatic interface test system and method Download PDF

Info

Publication number
CN112783793B
CN112783793B CN202110176786.2A CN202110176786A CN112783793B CN 112783793 B CN112783793 B CN 112783793B CN 202110176786 A CN202110176786 A CN 202110176786A CN 112783793 B CN112783793 B CN 112783793B
Authority
CN
China
Prior art keywords
data
test
interface
serial number
transaction
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.)
Active
Application number
CN202110176786.2A
Other languages
Chinese (zh)
Other versions
CN112783793A (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110176786.2A priority Critical patent/CN112783793B/en
Publication of CN112783793A publication Critical patent/CN112783793A/en
Application granted granted Critical
Publication of CN112783793B publication Critical patent/CN112783793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/3684Test management for test design, e.g. generating new test cases
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides an automatic interface test system and a method, wherein the system comprises the following components: the data driving device is used for obtaining interface data, environment data and archive data according to test requirements, constructing flow arrangement data through the interface data and a preset decision tree data structure, and generating test case data through splicing the flow arrangement data, the environment data and the archive data with a preset transaction serial number configuration rule; the case execution device is connected with the data driving device and is used for analyzing the test case data to generate a corresponding test code, and calling the application server through the test code to initiate a transaction request; the automatic baffle device is connected with the application server and is used for acquiring a corresponding transaction serial number according to the transaction request; and verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through the sandbox application service to obtain a business receipt after the verification is passed, and feeding back the business receipt to the application server.

Description

Automatic interface test system and method
Technical Field
The invention relates to the field of automatic testing, which can be applied to the financial field and other fields, in particular to an automatic interface testing system and method.
Background
With the rapid development of internet technology, the technology platform with a strong high-end is a basic capability which each enterprise must have, following the steps of the times. It also means that the enterprise system must make short-period iterative updates, system upgrades. The iterative upgrade of the system necessarily causes significant testing pressure to the tester. The testing of the increment function and the regression of the stock function can cause a great deal of cost investment for enterprises, and simultaneously can slow down the technological innovation speed. Obviously, the automatic test has the characteristics of reducing repeated mechanical test work of testers, improving test precision, simulating scenes (such as concurrency) which are difficult to test manually, accumulating test assets, reducing personnel cost and the like, and becomes an indispensable part of the technical capability of enterprises.
In the current automatic interface testing field, a local environment of a tester adopts a script or coding mode to generate service codes, and the method has a plurality of defects by executing verification of a completion case:
1. the requirement on the capability of the testers is high, the testers are required to have high coding capability, and meanwhile, coding also inevitably has the problem of the testers, so that the case execution result is inaccurate;
2. the automation code cannot be called as a part of a test case, the iterative upgrading of the application can lead to frequent modification of the automation service code, logic confusion of the case code is inevitably caused, the case code is difficult to manage, and finally, the automation tool needs to expend a great deal of effort to maintain
3. The test cases are locally executed, the test assets cannot be collected, and the system cannot be conveniently analyzed for the stability in the period.
Disclosure of Invention
The invention aims to provide an automatic interface test system and method, which solve the problems of short application service iteration period, shortage of tester resources, high requirement of the current automatic test on the technical capability of testers, difficult management of case assets and the like.
In order to achieve the above objective, the present invention provides an automated interface testing system, which comprises a data driving device, a case execution device, an application server and an automated baffle device; the data driving device is used for obtaining interface data, environment data and archive data according to test requirements, constructing flow arrangement data through the interface data and a preset decision tree data structure, and generating test case data through splicing the flow arrangement data, the environment data, the archive data and a preset transaction serial number configuration rule; the case execution device is connected with the data driving device and is used for analyzing the test case data to generate a corresponding test code, and calling an application server to initiate a transaction request through the test code; the automatic baffle device is connected with the application server and is used for acquiring a corresponding transaction serial number according to the transaction request; and verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to obtain a business receipt after the verification is passed, and feeding back the business receipt to the application server.
In the above automated interface test system, preferably, the data driving device includes a data management module and a flow arrangement module; the data management module is used for carrying out data modeling according to the test behaviors of the user and constructing an environment database, an archive database, an interface database and a flow arrangement database; receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information; the flow arranging module adopts a decision tree data structure, a concurrency and aggregation scene is set through node attributes of all nodes in the decision tree data structure, and the flow arranging module is used for constructing flow arranging data through the interface data and the node attributes corresponding to the interface data in the decision tree data structure.
In the above automated interface test system, preferably, the data management module synchronizes the interface parameters of the application server through a swagger suite, and constructs the interface database according to the interface parameters and the user test behavior.
In the above automated interface test system, preferably, the case execution device includes a data analysis module, a code generation module, and an execution module; the data analysis module is used for analyzing the test case data to obtain configuration parameters of the test case; the code generation module is used for generating corresponding test codes according to the configuration parameters; and the execution module is used for calling an application server to initiate a transaction request according to the test code.
In the above automated interface test system, preferably, the code generating module generates a corresponding test code through a variability plugin according to the configuration parameter.
In the above automated interface test system, preferably, the automated baffle device includes a path detection module, a serial number detection module, and a sandbox application service module; the path detection module is used for analyzing an execution path of the transaction request, and providing the transaction request to the serial number detection module when the execution path accords with a preset execution path; the serial number detection module is used for acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module after verification is passed; the sandbox application service module is used for processing the transaction request, generating a business receipt according to a processing result and feeding back the business receipt to the application server.
In the above automated interface test system, preferably, the system further includes a result analysis module, where the result analysis module is connected to the application server, and is configured to compare the service receipt received by the application server with a preset feedback result, and obtain a test result according to the comparison result; and matching the test case data with the failed test result with a preset mark category, and checking whether the test result is false report according to the matching result.
The invention also provides an automatic interface testing method, which comprises the following steps: obtaining interface data, environment data and archive data according to test requirements, and constructing flow arranging data through the interface data and a preset decision tree data structure; generating test case data by splicing the flow arranging data, the environment data, the archive data and a preset transaction serial number configuration rule; analyzing the test case data to generate a corresponding test code, and initiating a transaction request through the test code; and acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to acquire a business receipt after verification is passed.
In the above automated interface testing method, preferably, obtaining interface data, environment data and archive data according to a test requirement, and constructing flow layout data by using the interface data and a preset decision tree data structure includes: performing data modeling according to the user test behaviors, and constructing an environment database, an archive database, an interface database and a flow arrangement database; receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information; setting concurrency and aggregation scenes by using node attributes of all nodes in the decision tree data structure, and constructing flow arranging data by using the interface data and the node attributes corresponding to the interface data in the decision tree data structure.
In the above automated interface testing method, preferably, the constructing an environment database, an archive database, an interface database, and a flow arrangement database according to data modeling performed by a user testing behavior includes: and synchronizing the interface parameters of the application server through a swagger suite, and constructing the interface database according to the interface parameters and the user test behaviors.
In the above automated interface testing method, preferably, analyzing the test case data to generate a corresponding test code, and initiating a transaction request by the test code includes: analyzing the test case data to obtain configuration parameters of the test case; generating a corresponding test code through a consistency plugin according to the configuration parameters; and calling an application server to initiate a transaction request according to the test code.
In the above automated interface testing method, preferably, obtaining a corresponding transaction serial number according to the transaction request, verifying the transaction serial number by presetting a transaction serial number configuration rule, and processing the transaction request by a sandbox application service to obtain a service receipt after verification is passed includes: analyzing an execution path of the transaction request; when the execution path accords with a preset execution path, acquiring a corresponding transaction serial number according to the transaction request; verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module to process the transaction request after the verification is passed; and generating a business receipt according to the processing result.
In the above automated interface testing method, preferably, the method further comprises: comparing the business receipt with a preset feedback result, and obtaining a test result according to the comparison result; and when the test result is failure, acquiring test case data corresponding to the test result, matching the test case data with a preset mark category, and checking whether the test result is false alarm according to the matching result.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the computer program.
The present invention also provides a computer readable storage medium storing a computer program for executing the above method.
The beneficial technical effects of the invention are as follows: the user case is maintained in a collocation mode, so that the use experience effect of a tester on an automatic test tool is prevented from being limited due to the coding capacity of the tester; abstract user test behavior, converting the abstract user test behavior into an automatic driving data model, enabling interface definition and business flow in a test flow to serve as a sharing module of a plurality of test scenes, enabling a tester to pay attention to a tested interface, and automatically adapting the overall test flow; adopting a distributed architecture, and using a decision tree related algorithm to dynamically and intelligently control a case execution sequence, an interface concurrency amount, interface serialization, aggregate execution on a certain interface related to a plurality of concurrent cases and the like in a case execution process; the whole operation flow adopts a configuration mode, does not need to develop codes, and reduces the use threshold of a user on tools.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of an automated interface test system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an automated interface testing system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data driving device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a case execution device according to an embodiment of the present invention;
FIG. 5 is a schematic view of an automated baffle device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an application structure of an automatic interface test system according to an embodiment of the present invention;
FIG. 7 is a flow chart of an automated interface testing method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The following will describe embodiments of the present invention in detail with reference to the drawings and examples, thereby solving the technical problems by applying technical means to the present invention, and realizing the technical effects can be fully understood and implemented accordingly. It should be noted that, as long as no conflict is formed, each embodiment of the present invention and each feature of each embodiment may be combined with each other, and the formed technical solutions are all within the protection scope of the present invention.
Additionally, the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that herein.
Referring to fig. 1, the present invention provides an automated interface testing system, which includes a data driving device, a case execution device, an application server, and an automated baffle device; the data driving device is used for obtaining interface data, environment data and archive data according to test requirements, constructing flow arrangement data through the interface data and a preset decision tree data structure, and generating test case data through splicing the flow arrangement data, the environment data, the archive data and a preset transaction serial number configuration rule; the case execution device is connected with the data driving device and is used for analyzing the test case data to generate a corresponding test code, and calling an application server to initiate a transaction request through the test code; the automatic baffle device is connected with the application server and is used for acquiring a corresponding transaction serial number according to the transaction request; and verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to obtain a business receipt after the verification is passed, and feeding back the business receipt to the application server. The components of the automatic interface test system may be separately located at different positions or may be integrated on an integrated device, and those skilled in the art may select setting and use according to actual needs, which is not limited in the present invention.
In general, the automated interface test system provided by the present invention may comprise five boards: data management, process planning, case execution, sandbox management, and outcome analysis, the process relationships may be as shown with reference to fig. 2. Specifically, in actual work, the data driving device can use mysql as a storage medium, a tester forms a flow arrangement with related attributes through an execution sequence of a maintenance interface, and the tester forms a test case through selecting the flow arrangement, environment data and archive data; when a tester manually/regularly triggers the case execution through an automation control console, a case executor analyzes case data, assembles the case data, generates an automatic test code logic through a variability plug-in, stores and caches the automatic test code logic, calls an application server according to rules to initiate a request, and the application server is in butt joint with a sandbox module, the sandbox judges the transaction flow direction through the rule of the automatically uploaded serial number, and returns a result response piece application system according to the expected result of the tester if the serial number accords with the configuration rule of the automatic serial number; furthermore, the staff knows that the case execution device can assert through testing the expected returned result and the actual result returned by the application, and generates a result report for case analysis statistics; those skilled in the art can set the present invention according to actual needs, and the present invention is not limited thereto.
Referring to fig. 3, in an embodiment of the present invention, the data driving apparatus may include a data management module and a flow arrangement module; the data management module is used for carrying out data modeling according to the test behaviors of the user and constructing an environment database, an archive database, an interface database and a flow arrangement database; receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information; the flow arranging module adopts a decision tree data structure, a concurrency and aggregation scene is set through node attributes of all nodes in the decision tree data structure, and the flow arranging module is used for constructing flow arranging data through the interface data and the node attributes corresponding to the interface data in the decision tree data structure.
In the above embodiment, the data management module synchronizes the interface parameters of the application server through a swagger suite, and constructs the interface database according to the interface parameters and the user test behavior; in actual work, the data management module can perform data modeling according to test behaviors of testers, and decouple case data, so that the range of influence on cases due to service system transformation is reduced. The case data are divided into: environmental data, archive data, interface data, and process orchestration data. After the data modeling is carried out, the problem that case data needs to be correspondingly adjusted due to changes of application environments, application user files and application business processes can be solved through a simple configuration mode.
In another embodiment, the process scheduling module adopts a decision tree data structure mode, and controls cases to execute various concurrency and aggregation scenes through node attributes of all nodes; the module achieves the arrangement of the business process by maintaining the dependency relationship between the execution sequence of the interface and the data of the interface; when the application system generates flow change, the tester does not need to modify the case data, and only needs to adjust the flow arrangement sequence of the original case.
Referring to fig. 4, in an embodiment of the present invention, the case execution device may include a data parsing module, a code generating module, and an executing module; the data analysis module is used for analyzing the test case data to obtain configuration parameters of the test case; the code generation module is used for generating corresponding test codes according to the configuration parameters; and the execution module is used for calling an application server to initiate a transaction request according to the test code. The code generation module generates corresponding test codes through a consistency plugin according to the configuration parameters. In actual work, the case execution device can be set to execute test cases in a plurality of modes such as manual, timing trigger or environment deployment trigger, and the like, and the execution module can add serial marks, concurrency quantity, interface execution priority order and interface dormancy time on any one interface according to application requirements because the service system relates to the requirements of interface concurrency upper limit, case execution duration and the like, and perform interface collection on interfaces with similar timing tasks and support cases to specific interfaces.
Referring to fig. 5, in an embodiment of the present invention, an automated barrier device includes a path detection module, a serial number detection module, and a sandbox application service module; the path detection module is used for analyzing an execution path of the transaction request, and providing the transaction request to the serial number detection module when the execution path accords with a preset execution path; the serial number detection module is used for acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module after verification is passed; the sandbox application service module is used for processing the transaction request, generating a business receipt according to a processing result and feeding back the business receipt to the application server. Therefore, the automatic baffle device is utilized to improve the stability of the test result, and reduce the influence of a downstream system on the test result. The automatic baffle device does not need code development, can simulate the receipt of the downstream application system only by configuring response messages according to the serial number rule, and meanwhile, the manual joint debugging with the downstream joint debugging of a tester cannot be influenced by the butt joint sandbox.
Referring to fig. 6, the system may further include a result analysis module, connected to the application server, configured to compare the service receipt received by the application server with a preset feedback result, and obtain a test result according to the comparison result; and matching the test case data with the failed test result with a preset mark category, and checking whether the test result is false report according to the matching result. In actual work, after the case execution is finished, the result analysis module can provide a result display page for a tester, the tester can visually check the execution passing rate of the case, the failure case and the false report case, meanwhile, the import and export of the case result are supported, meanwhile, the report module adds an intelligent learning function, the tester records the failure case caused by similar environmental factors through marking, the result is false report, and after the execution of the subsequent cases of the same type is finished, the tool records the false report of the same type. When the method is applied specifically, the case execution results can be stored in json format, the application can read and analyze the execution results conveniently, the module gathers and overall manages the test results to form test result assets, and the stability of a follow-up statistical system can provide measurement data conveniently.
Referring to fig. 7, the present invention further provides an automated interface testing method, which includes:
s701, obtaining interface data, environment data and archive data according to test requirements, and constructing flow arrangement data through the interface data and a preset decision tree data structure;
s702, generating test case data by splicing the flow arranging data, the environment data, the archive data and a preset transaction serial number configuration rule;
s703, analyzing the test case data to generate a corresponding test code, and initiating a transaction request through the test code;
s704, acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to acquire a business receipt after verification is passed.
In the above embodiment, step S701 further includes: performing data modeling according to the user test behaviors, and constructing an environment database, an archive database, an interface database and a flow arrangement database; receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information; setting concurrency and aggregation scenes by using node attributes of all nodes in the decision tree data structure, and constructing flow arranging data by using the interface data and the node attributes corresponding to the interface data in the decision tree data structure. The interface database can synchronize the interface parameters of the application server through a swagger suite, and is constructed according to the interface parameters and the user testing behavior.
In another embodiment of the present invention, parsing the test case data to generate a corresponding test code, initiating a transaction request through the test code includes: analyzing the test case data to obtain configuration parameters of the test case; generating a corresponding test code through a consistency plugin according to the configuration parameters; and calling an application server to initiate a transaction request according to the test code. Thus, in an embodiment of the present invention, obtaining a corresponding transaction serial number according to the transaction request, verifying the transaction serial number by presetting a transaction serial number configuration rule, and processing the transaction request to obtain a service receipt by a sandbox application service after verification is passed may include: analyzing an execution path of the transaction request obtained at the application server; when the execution path accords with a preset execution path, acquiring a corresponding transaction serial number according to the transaction request; verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module to process the transaction request after the verification is passed; and generating a business receipt according to the processing result.
In another embodiment of the present invention, the method further comprises: comparing the business receipt with a preset feedback result, and obtaining a test result according to the comparison result; and when the test result is failure, acquiring test case data corresponding to the test result, matching the test case data with a preset mark category, and checking whether the test result is false alarm according to the matching result.
The beneficial technical effects of the invention are as follows: the user case is maintained in a collocation mode, so that the use experience effect of a tester on an automatic test tool is prevented from being limited due to the coding capacity of the tester; abstract user test behavior, converting the abstract user test behavior into an automatic driving data model, enabling interface definition and business flow in a test flow to serve as a sharing module of a plurality of test scenes, enabling a tester to pay attention to a tested interface, and automatically adapting the overall test flow; adopting a distributed architecture, and using a decision tree related algorithm to dynamically and intelligently control a case execution sequence, an interface concurrency amount, interface serialization, aggregate execution on a certain interface related to a plurality of concurrent cases and the like in a case execution process; the whole operation flow adopts a configuration mode, does not need to develop codes, and reduces the use threshold of a user on tools.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the computer program.
The present invention also provides a computer readable storage medium storing a computer program for executing the above method.
As shown in fig. 8, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, a power supply 170. It is noted that the electronic device 600 need not include all of the components shown in fig. 8; in addition, the electronic device 600 may further include components not shown in fig. 8, to which reference is made to the related art.
As shown in fig. 8, the central processor 100, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 100 receives inputs and controls the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 100 can execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides an input to the central processor 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, or the like. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. Memory 140 may also be some other type of device. Memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage 142, the application/function storage 142 for storing application programs and function programs or a flow for executing operations of the electronic device 600 by the central processor 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. A communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and to receive audio input from the microphone 132 to implement usual telecommunication functions. The audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 130 is also coupled to the central processor 100 so that sound can be recorded locally through the microphone 132 and so that sound stored locally can be played through the speaker 131.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (13)

1. An automated interface testing system, wherein the system comprises a data driving device, a case execution device, an application server and an automated baffle device;
the data driving device is used for obtaining interface data, environment data and archive data according to test requirements, constructing flow arrangement data through the interface data and a preset decision tree data structure, and generating test case data through splicing the flow arrangement data, the environment data, the archive data and a preset transaction serial number configuration rule;
the case execution device is connected with the data driving device and is used for analyzing the test case data to generate a corresponding test code, and calling an application server to initiate a transaction request through the test code;
the automatic baffle device is connected with the application server and is used for acquiring a corresponding transaction serial number according to the transaction request; verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to obtain a business receipt after the transaction serial number passes the verification, and feeding back the business receipt to the application server;
the automatic baffle device comprises a path detection module, a serial number detection module and a sandbox application service module;
the path detection module is used for analyzing an execution path of the transaction request, and providing the transaction request to the serial number detection module when the execution path accords with a preset execution path;
the serial number detection module is used for acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module after verification is passed;
the sandbox application service module is used for processing the transaction request, generating a business receipt according to a processing result and feeding back the business receipt to the application server.
2. The automated interface test system of claim 1, wherein the data driven device comprises a data management module and a flow orchestration module;
the data management module is used for carrying out data modeling according to the test behaviors of the user and constructing an environment database, an archive database, an interface database and a flow arrangement database; receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information;
the flow arranging module adopts a decision tree data structure, a concurrency and aggregation scene is set through node attributes of all nodes in the decision tree data structure, and the flow arranging module is used for constructing flow arranging data through the interface data and the node attributes corresponding to the interface data in the decision tree data structure.
3. The automated interface test system of claim 2, wherein the data management module synchronizes interface parameters of the application server through a swagger suite and constructs the interface database based on the interface parameters and user test behavior.
4. The automated interface test system of claim 1, wherein the case execution device comprises a data parsing module, a code generating module, and an execution module;
the data analysis module is used for analyzing the test case data to obtain configuration parameters of the test case;
the code generation module is used for generating corresponding test codes according to the configuration parameters;
and the execution module is used for calling an application server to initiate a transaction request according to the test code.
5. The automated interface test system of claim 4, wherein the code generation module generates the corresponding test code via a variability plug-in according to the configuration parameters.
6. The automated interface test system of claim 1, further comprising a result analysis module, wherein the result analysis module is connected to the application server and configured to compare the service receipt received by the application server with a preset feedback result, and obtain a test result according to the comparison result; and matching the test case data with the failed test result with a preset mark category, and checking whether the test result is false report according to the matching result.
7. An automated interface testing method, the method comprising:
obtaining interface data, environment data and archive data according to test requirements, and constructing flow arranging data through the interface data and a preset decision tree data structure;
generating test case data by splicing the flow arranging data, the environment data, the archive data and a preset transaction serial number configuration rule;
analyzing the test case data to generate a corresponding test code, and initiating a transaction request through the test code;
acquiring a corresponding transaction serial number according to the transaction request, verifying the transaction serial number through a preset transaction serial number configuration rule, and processing the transaction request through a sandbox application service to acquire a service receipt after verification is passed;
the corresponding transaction serial numbers are obtained according to the transaction requests, the transaction serial numbers are verified through preset transaction serial number configuration rules, and when verification is passed, the transaction requests are processed through sandbox application service to obtain service receipts, wherein the service receipts comprise:
analyzing an execution path of the transaction request;
when the execution path accords with a preset execution path, acquiring a corresponding transaction serial number according to the transaction request;
verifying the transaction serial number through a preset transaction serial number configuration rule, and providing the transaction request to the sandbox application service module to process the transaction request after the verification is passed;
and generating a business receipt according to the processing result.
8. The automated interface testing method of claim 7, wherein obtaining interface data, environment data, and archive data according to test requirements, constructing flow orchestration data from the interface data and a preset decision tree data structure comprises:
performing data modeling according to the user test behaviors, and constructing an environment database, an archive database, an interface database and a flow arrangement database;
receiving configuration information according to the test requirement, and obtaining corresponding environment data, interface data and archive data from the environment database, the interface database and the archive database through the configuration information;
setting concurrency and aggregation scenes by using node attributes of all nodes in the decision tree data structure, and constructing flow arranging data by using the interface data and the node attributes corresponding to the interface data in the decision tree data structure.
9. The automated interface testing method of claim 8, wherein constructing the environmental database, the archive database, the interface database, and the flow orchestration database according to the user testing behavior comprises: and synchronizing the interface parameters of the application server through a swagger suite, and constructing the interface database according to the interface parameters and the user test behaviors.
10. The automated interface testing method of claim 7, wherein parsing the test case data to generate a corresponding test code, initiating a transaction request through the test code comprises:
analyzing the test case data to obtain configuration parameters of the test case;
generating a corresponding test code through a consistency plugin according to the configuration parameters;
and calling an application server to initiate a transaction request according to the test code.
11. The automated interface testing method of claim 7, further comprising:
comparing the business receipt with a preset feedback result, and obtaining a test result according to the comparison result;
and when the test result is failure, acquiring test case data corresponding to the test result, matching the test case data with a preset mark category, and checking whether the test result is false alarm according to the matching result.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 7 to 11 when executing the computer program.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 7 to 11.
CN202110176786.2A 2021-02-09 2021-02-09 Automatic interface test system and method Active CN112783793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110176786.2A CN112783793B (en) 2021-02-09 2021-02-09 Automatic interface test system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110176786.2A CN112783793B (en) 2021-02-09 2021-02-09 Automatic interface test system and method

Publications (2)

Publication Number Publication Date
CN112783793A CN112783793A (en) 2021-05-11
CN112783793B true CN112783793B (en) 2024-02-02

Family

ID=75761310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110176786.2A Active CN112783793B (en) 2021-02-09 2021-02-09 Automatic interface test system and method

Country Status (1)

Country Link
CN (1) CN112783793B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434404B (en) * 2021-06-24 2024-03-19 北京同创永益科技发展有限公司 Automatic service verification method and device for verifying reliability of disaster recovery system
CN113535565B (en) * 2021-07-19 2022-10-04 工银科技有限公司 Interface use case generation method, device, equipment and medium
CN114385258B (en) * 2021-12-08 2023-09-26 北京云测信息技术有限公司 Automatic test method, device, electronic equipment and storage medium
CN114218114B (en) * 2021-12-22 2024-04-12 四川启睿克科技有限公司 Full-automatic test data generation method based on interface flow arrangement
CN117389873A (en) * 2023-10-12 2024-01-12 厦门国际银行股份有限公司 Automatic testing method, device and equipment for interface service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614770A (en) * 2018-04-09 2018-10-02 中国工商银行股份有限公司 Automatic test asserts method, apparatus, storage medium and equipment
CN111159049A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Automatic interface testing method and system
CN112035363A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 Automatic interface testing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190188119A1 (en) * 2017-12-14 2019-06-20 Cognizant Technology Solutions India Pvt. Ltd. System and a method for providing automated performance detection of application programming interfaces

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614770A (en) * 2018-04-09 2018-10-02 中国工商银行股份有限公司 Automatic test asserts method, apparatus, storage medium and equipment
CN111159049A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Automatic interface testing method and system
CN112035363A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 Automatic interface testing method and device

Also Published As

Publication number Publication date
CN112783793A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN112783793B (en) Automatic interface test system and method
CN108399114B (en) System performance testing method and device and storage medium
CN106446412B (en) Model-based test method for avionics system
CN106933729A (en) A kind of method of testing and system based on cloud platform
CN103164328A (en) Method and device and system for regression testing of service function
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN110543301A (en) Method and device for generating jenkins code file
CN112650688A (en) Automated regression testing method, associated device and computer program product
US20190361801A1 (en) Method and system for cloud-based automated software testing
CN115422065A (en) Fault positioning method and device based on code coverage rate
CN112882941A (en) Integrated test system and method based on micro-service architecture
CN113095782A (en) Automatic approval decision-making method and device
CN113254326A (en) Method and system for releasing firmware codes of solid state disk by utilizing Jenkins
CN116244202A (en) Automatic performance test method and device
CN113419957A (en) Rule-based big data offline batch processing performance capacity scanning method and device
CN114647591A (en) Delay assertion processing method and device in automatic test
CN114091687A (en) Method and device for automatic delivery and deployment of machine learning model
CN114840421A (en) Log data processing method and device
CN114637688A (en) Coverage rate statistical method and device based on version branches
CN113535575A (en) Benchmark testing method and device for basic environment of software and hardware product
CN113986759A (en) Business processing flow acquisition method, business architecture flow verification method and system
CN113344708A (en) Large-scale system production and exercise application evaluation method and system
CN113342600A (en) Method and device for monitoring program dependent plug-in
CN113515447A (en) System automation test method and device
CN110737426A (en) Program block creating method, program block creating device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant