CN112905460A - Device and method for simulating three-party receipt by automatic interface test - Google Patents

Device and method for simulating three-party receipt by automatic interface test Download PDF

Info

Publication number
CN112905460A
CN112905460A CN202110174901.2A CN202110174901A CN112905460A CN 112905460 A CN112905460 A CN 112905460A CN 202110174901 A CN202110174901 A CN 202110174901A CN 112905460 A CN112905460 A CN 112905460A
Authority
CN
China
Prior art keywords
sandbox
transaction
application server
receipt
transaction number
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.)
Granted
Application number
CN202110174901.2A
Other languages
Chinese (zh)
Other versions
CN112905460B (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 CN202110174901.2A priority Critical patent/CN112905460B/en
Publication of CN112905460A publication Critical patent/CN112905460A/en
Application granted granted Critical
Publication of CN112905460B publication Critical patent/CN112905460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An apparatus and method for simulating three-party receipt for automated interface testing, the apparatus comprising: the application server receives test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data; generating a corresponding request message and a serial number according to the test transaction data and providing the request message and the serial number to the sandbox; the sandbox comprises an analysis module, a sandbox gateway and a sandbox application server; the analysis module inquires and maps out a corresponding transaction number according to the received serial number, and selects and sends the transaction number to the sandbox gateway or a downstream application server according to a comparison result of a pre-positioned number field of the transaction number and a preset number range; the sandbox gateway analyzes and receives the transaction number according to the number rule of the automatic test platform, and provides the transaction number to the sandbox application server; and the sandbox application server generates a corresponding service receipt message according to the received transaction number, and feeds the service receipt message back to the application server.

Description

Device and method for simulating three-party receipt by automatic interface test
Technical Field
The invention relates to the field of automatic testing, which can be applied to the financial field and the big data field, in particular to a device and a method for testing and simulating three-party receipt through an automatic interface.
Background
In the system research and development process, problems such as downstream application, network and authority cannot be solved in a short time, meanwhile, the automatic test tool test aims at logic inspection of the application to be tested, and if the downstream is called, a large number of case error problems caused by the downstream environment can occur, so that the test result is inaccurate.
At present, after the application service is connected with a sandbox tool, joint debugging can not be carried out with a downstream system at the same time, a great amount of business code logic is compiled by technical personnel of the sandbox, management of sandbox mock assets is difficult to achieve, and meanwhile, after the application system is upgraded, a great amount of development content needs to be made on the sandbox, so that the technical personnel spend a great amount of time on development, but the stability of sandbox business can not be guaranteed.
Disclosure of Invention
The invention aims to provide a device and a method for simulating three-party receipt by testing an automation interface, which are used for wrapping a tested application in a totally-enclosed environment, adding logic judgment by a sandbox to judge non-automatic transaction, directly calling downstream and not influencing real scene test of a service.
To achieve the above object, the present invention provides an apparatus for simulating three-party receipt for testing an automation interface, the apparatus comprising: application servers, sandboxes, and downstream application services; the application server is used for receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data; generating a corresponding request message and a corresponding serial number according to the test transaction data, and providing the request message and the serial number to the sandbox; the sandbox comprises an analysis module, a sandbox gateway and a sandbox application server; the analysis module is used for inquiring and mapping out the corresponding transaction number according to the received serial number, and sending the request message and the transaction number to the sandbox gateway or the downstream application server according to a comparison result of a pre-positioned number field of the transaction number and a preset number range; the sandbox gateway is used for analyzing and receiving the transaction number according to a number rule of an automatic test platform, and providing the transaction number to the sandbox application server when the transaction number accords with the number rule; the sandbox application server is used for generating a corresponding service receipt message according to the received transaction number and feeding the service receipt message back to the application server; and the downstream application service is used for processing the received request message, generating a corresponding service receipt message and feeding back the service receipt message to the application server.
In the device for testing and simulating three-party receipt through the automatic interface, preferably, the analysis module includes a query unit, and the query unit is configured to organize a query statement according to the serial number, and query a database of the application server through the query statement to obtain the corresponding transaction number.
In the device for simulating three-party receipt by testing the automation interface, preferably, the sandbox application server comprises an intercepting module, wherein the intercepting module is used for intercepting the pre-positioning data in the serial number and obtaining the service type and the receipt code of the test transaction data according to the pre-positioning data; matching the service type with a prestored receipt item to obtain the content of the receipt; and organizing and generating a corresponding service receipt message through the receipt code and the receipt content.
In the device for simulating three-party receipt by testing the automation interface, preferably, the sandbox gateway comprises a rule comparison module, and the rule comparison module is used for analyzing and receiving the transaction number according to the number rule of the automation testing platform; when the transaction number accords with the numbering rule, the transaction number is provided to the sandbox application server; and when the transaction number does not accord with the numbering rule, providing the transaction number to the downstream application server.
The invention also provides a method for testing and simulating three-party receipt by the automatic interface, which comprises the following steps: receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data through an application server; generating a corresponding request message and a corresponding serial number according to the test transaction data, and providing the request message and the serial number to a sandbox; the sandbox inquires and maps the corresponding transaction number according to the serial number; when the pre-positioned number field of the transaction number accords with a preset number range, analyzing and receiving the transaction number according to a number rule of an automatic test platform; and when the transaction number accords with the numbering rule, generating a corresponding service receipt message according to the transaction number, and feeding back the service receipt message to the application server.
In the method for simulating three-party receipt through automated interface testing, preferably, the step of mapping the corresponding transaction number by the sandbox according to the serial number query comprises: and organizing a query statement according to the serial number, and querying a database of the application server through the query statement to obtain the corresponding transaction number.
In the method for simulating three-party receipt through automated interface testing, preferably, the step of generating a corresponding service receipt message according to the transaction number includes: intercepting the pre-positioning data in the serial number, and acquiring the service type and the receipt code of the test transaction data according to the pre-positioning data; matching the service type with a prestored receipt item to obtain the content of the receipt; and organizing and generating a corresponding service receipt message through the receipt code and the receipt content.
In the method for simulating a three-party receipt by testing an automation interface, preferably, the method further includes: when the pre-positioned number field of the transaction number does not accord with a preset number range, the request message and the transaction number are sent to an application server; and when the transaction number does not accord with the numbering rule, providing the transaction number to the downstream application server.
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, wherein the processor implements the 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 invention effectively solves the problem that an application system does not need to change code logic, completes mock to the interface modes of downstream rpc, HTTP, api and the like, and can make a tester to manufacture a receipt message in any scene through serial number rules and configuration; the simulated receipt configuration rule is simple, and the rpc, the http and the api adopt the same type of configuration mode, so that the operation flow is simplified; the method can realize abnormal scenes which are difficult to simulate in various real scenes but really exist in business scenes; the automatic test cases and the manual test cases are effectively separated through the serial number rule, and the sandbox can simulate the three-party receipt and call three parties to trade and pass through; the establishment of the serial number rule facilitates the cleaning of subsequent automatic data.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an apparatus for simulating a three-party receipt by testing an automation interface according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a sandbox gateway according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an application structure of an apparatus for simulating a three-party receipt by an automatic interface test according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for simulating a three-party receipt for an automated interface test according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, unless otherwise specified, the embodiments and features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
Additionally, the steps illustrated in the flow charts 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 flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
Referring to fig. 1, an apparatus for simulating a three-party receipt for testing an automation interface according to the present invention includes: application servers, sandboxes, and downstream application services; the application server is used for receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data; generating a corresponding request message and a corresponding serial number according to the test transaction data, and providing the request message and the serial number to the sandbox; the sandbox comprises an analysis module, a sandbox gateway and a sandbox application server; the analysis module is used for inquiring and mapping out the corresponding transaction number according to the received serial number, and sending the request message and the transaction number to the sandbox gateway or the downstream application server according to a comparison result of a pre-positioned number field of the transaction number and a preset number range; the sandbox gateway is used for analyzing and receiving the transaction number according to a number rule of an automatic test platform, and providing the transaction number to the sandbox application server when the transaction number accords with the number rule; the sandbox application server is used for generating a corresponding service receipt message according to the received transaction number and feeding the service receipt message back to the application server; and the downstream application service is used for processing the received request message, generating a corresponding service receipt message and feeding back the service receipt message to the application server.
In the above embodiment, the analysis module may include a query unit, and the query unit is configured to organize a query statement according to the serial number, and query a database of the application server through the query statement to obtain the corresponding transaction number. For example, an SQL query application server database is used to match the ID sent by the automation platform, i.e. the transaction number, so that the subsequent rule bit determination can be performed according to the ID (the sandbox can use 20-bit rule ID). In another embodiment, the sandbox application server comprises an intercepting module, wherein the intercepting module is used for intercepting the pre-positioning data in the serial number and obtaining the service type and the receipt code of the test transaction data according to the pre-positioning data; matching the service type with a prestored receipt item to obtain the content of the receipt; and organizing and generating a corresponding service receipt message through the receipt code and the receipt content.
Referring to fig. 2, in an embodiment of the present invention, the sandbox gateway includes a rule comparing module, and the rule comparing module is configured to analyze and receive the transaction number according to a number rule of an automated testing platform; when the transaction number accords with the numbering rule, the transaction number is provided to the sandbox application server; and when the transaction number does not accord with the numbering rule, providing the transaction number to the downstream application server.
Specifically, referring to fig. 3, in actual work, the application server data may be provided with the data to be tested and the transaction number by a manual tester or an automated testing platform, and the application server interfaces with the sandbox, modifies the configuration of the request downstream, and assigns the URL to the domain name of the sandbox; then, the information is provided to a sandbox, namely a sharing module (not shown), a sandbox gateway and a sandbox application service according to normal business logic processing, because an application request downstream must be provided with a unique ID field for identifying the request, and the field can be in one-to-one correspondence with the ID of the request sent by the automation platform, an analysis module of the sandbox receives the request, inquires an application database, maps the unique ID sent automatically, and if the ID meets the specification of the automation platform, sandbox business processing is carried out; and if the transaction is not carried out on the automatic platform, the transaction is routed to the downstream for service processing according to the requirement of the tester. The sandbox judges whether the transaction is processed by an automation platform, and the sandbox comprises 2 steps: judging the serial number and processing the rule; usually, an SQL query is used to query the application server database, match the ID sent by the automation platform, and then perform rule bit determination according to the ID. (the sandbox uses 20-bit rule ID), wherein when the sandbox carries out receipt processing, the sandbox mainly utilizes data of each bit of the transaction number, namely the business processing bit of the transaction number is 9-18 bits and respectively represents online, batch and other abnormal receipt bits, and the sandbox intercepts according to the bit number, positions the receipt message in configuration and carries out receipt according to the format.
Referring to fig. 4, the present invention further provides a method for simulating a three-party receipt by testing an automation interface, the method comprising:
s401, receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data through an application server;
s402, generating a corresponding request message and a serial number according to the test transaction data, and providing the request message and the serial number to a sandbox;
s403, the sandbox inquires and maps the corresponding transaction number according to the serial number;
s404, when the pre-positioning number field of the transaction number accords with a preset number range, analyzing and receiving the transaction number according to a number rule of an automatic test platform;
s405, when the transaction number accords with the numbering rule, generating a corresponding service receipt message according to the transaction number, and feeding the service receipt message back to the application server.
In the method for simulating three-party receipt through automated interface testing, preferably, the step of mapping the corresponding transaction number by the sandbox according to the serial number query comprises: and organizing a query statement according to the serial number, and querying a database of the application server through the query statement to obtain the corresponding transaction number.
In the above embodiment, generating a corresponding service receipt message according to the transaction number includes: intercepting the pre-positioning data in the serial number, and acquiring the service type and the receipt code of the test transaction data according to the pre-positioning data; matching the service type with a prestored receipt item to obtain the content of the receipt; and organizing and generating a corresponding service receipt message through the receipt code and the receipt content. In another embodiment, the method further comprises: when the pre-positioned number field of the transaction number does not accord with a preset number range, the request message and the transaction number are sent to an application server; and when the transaction number does not accord with the numbering rule, providing the transaction number to the downstream application server.
The invention effectively solves the problem that an application system does not need to change code logic, completes mock to the interface modes of downstream rpc, HTTP, api and the like, and can make a tester to manufacture a receipt message in any scene through serial number rules and configuration; the simulated receipt configuration rule is simple, and the rpc, the http and the api adopt the same type of configuration mode, so that the operation flow is simplified; the method can realize abnormal scenes which are difficult to simulate in various real scenes but really exist in business scenes; the automatic test cases and the manual test cases are effectively separated through the serial number rule, and the sandbox can simulate the three-party receipt and call three parties to trade and pass through; the establishment of the serial number rule facilitates the cleaning of subsequent automatic data.
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, wherein the processor implements the 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. 5, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in fig. 5; furthermore, the electronic device 600 may also comprise components not shown in fig. 5, which may be referred to in the prior art.
As shown in fig. 5, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling 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 relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 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 to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 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 portion 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 application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The 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, 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 receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. An apparatus for simulating a three-party receipt for automated interface testing, the apparatus comprising: application servers, sandboxes, and downstream application services;
the application server is used for receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data; generating a corresponding request message and a corresponding serial number according to the test transaction data, and providing the request message and the serial number to the sandbox;
the sandbox comprises an analysis module, a sandbox gateway and a sandbox application server;
the analysis module is used for inquiring and mapping out the corresponding transaction number according to the received serial number, and sending the request message and the transaction number to the sandbox gateway or the downstream application server according to a comparison result of a pre-positioned number field of the transaction number and a preset number range;
the sandbox gateway is used for analyzing and receiving the transaction number according to a number rule of an automatic test platform, and providing the transaction number to the sandbox application server when the transaction number accords with the number rule;
the sandbox application server is used for generating a corresponding service receipt message according to the received transaction number and feeding the service receipt message back to the application server;
and the downstream application service is used for processing the received request message, generating a corresponding service receipt message and feeding back the service receipt message to the application server.
2. The device for testing and simulating three-party receipt according to claim 1, wherein the analysis module comprises a query unit, and the query unit is configured to organize a query statement according to the serial number and query a database of the application server through the query statement to obtain the corresponding transaction number.
3. The apparatus of claim 1, wherein the sandbox application server comprises an intercepting module, the intercepting module is configured to intercept the pre-positioning data in the serial number, and obtain the service type and the response piece code of the test transaction data according to the pre-positioning data; matching the service type with a prestored receipt item to obtain the content of the receipt; and organizing and generating a corresponding service receipt message through the receipt code and the receipt content.
4. The device for automated interface testing of simulated three-way response pieces according to claim 1, wherein the sandbox gateway includes a rule comparison module for analyzing the received transaction number according to a numbering rule of an automated testing platform; when the transaction number accords with the numbering rule, the transaction number is provided to the sandbox application server; and when the transaction number does not accord with the numbering rule, providing the transaction number to the downstream application server.
5. A method for simulating a three-party response piece for automated interface testing, the method comprising:
receiving test transaction data requested by a tester or an automatic test platform and a transaction number which is configured according to a preset rule and corresponds to the test transaction data through an application server; generating a corresponding request message and a corresponding serial number according to the test transaction data, and providing the request message and the serial number to a sandbox;
the sandbox inquires and maps the corresponding transaction number according to the serial number;
when the pre-positioned number field of the transaction number accords with a preset number range, analyzing and receiving the transaction number according to a number rule of an automatic test platform;
and when the transaction number accords with the numbering rule, generating a corresponding service receipt message according to the transaction number, and feeding back the service receipt message to the application server.
6. The method of claim 5, wherein the sandbox mapping the corresponding transaction number according to the serial number query comprises:
and organizing a query statement according to the serial number, and querying a database of the application server through the query statement to obtain the corresponding transaction number.
7. The method of claim 5, wherein generating a corresponding service response piece message according to the transaction number comprises:
intercepting the pre-positioning data in the serial number, and acquiring the service type and the receipt code of the test transaction data according to the pre-positioning data;
matching the service type with a prestored receipt item to obtain the content of the receipt;
and organizing and generating a corresponding service receipt message through the receipt code and the receipt content.
8. The method of claim 5, further comprising:
when the pre-positioned number field of the transaction number does not accord with a preset number range, the request message and the transaction number are sent to an application server;
and when the transaction number does not accord with the numbering rule, providing the transaction number to a downstream application server.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 5 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any of claims 5 to 8.
CN202110174901.2A 2021-02-09 2021-02-09 Device and method for simulating three-party receipt by automatic interface test Active CN112905460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110174901.2A CN112905460B (en) 2021-02-09 2021-02-09 Device and method for simulating three-party receipt by automatic interface test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110174901.2A CN112905460B (en) 2021-02-09 2021-02-09 Device and method for simulating three-party receipt by automatic interface test

Publications (2)

Publication Number Publication Date
CN112905460A true CN112905460A (en) 2021-06-04
CN112905460B CN112905460B (en) 2024-02-09

Family

ID=76122902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110174901.2A Active CN112905460B (en) 2021-02-09 2021-02-09 Device and method for simulating three-party receipt by automatic interface test

Country Status (1)

Country Link
CN (1) CN112905460B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114022278A (en) * 2021-11-05 2022-02-08 光大科技有限公司 Simulated transaction processing method and device
CN114640614A (en) * 2022-04-24 2022-06-17 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314355A (en) * 2020-02-20 2020-06-19 深信服科技股份有限公司 Authentication method, device, equipment and medium of VPN (virtual private network) server
CN111666565A (en) * 2020-06-22 2020-09-15 深圳壹账通智能科技有限公司 Sandbox simulation test method and device, computer equipment and storage medium
CN112182506A (en) * 2020-09-16 2021-01-05 支付宝(杭州)信息技术有限公司 Data compliance detection method, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314355A (en) * 2020-02-20 2020-06-19 深信服科技股份有限公司 Authentication method, device, equipment and medium of VPN (virtual private network) server
CN111666565A (en) * 2020-06-22 2020-09-15 深圳壹账通智能科技有限公司 Sandbox simulation test method and device, computer equipment and storage medium
CN112182506A (en) * 2020-09-16 2021-01-05 支付宝(杭州)信息技术有限公司 Data compliance detection method, device and equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114022278A (en) * 2021-11-05 2022-02-08 光大科技有限公司 Simulated transaction processing method and device
CN114022278B (en) * 2021-11-05 2024-04-02 光大科技有限公司 Analog transaction processing method and device
CN114640614A (en) * 2022-04-24 2022-06-17 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product
CN114640614B (en) * 2022-04-24 2024-02-02 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product

Also Published As

Publication number Publication date
CN112905460B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN110941563B (en) Automatic script testing method and device
CN109376088B (en) Automatic test system and automatic test method
CN112905460B (en) Device and method for simulating three-party receipt by automatic interface test
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN108111364B (en) Service system testing method and device
CN111897738B (en) Automatic testing method and device based on atomic service
CN113051163A (en) Unit testing method, unit testing device, electronic equipment and storage medium
CN114024870B (en) Network connectivity detection method and system
CN113553260B (en) Test method, test apparatus, device, and medium
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
CN111698310B (en) Multi-test environment scheduling method and device based on SWIFT network
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN111414303A (en) Auxiliary system and method for script performance test
CN111078527B (en) Auxiliary system and method for pressure testing of server
CN114647591A (en) Delay assertion processing method and device in automatic test
CN114218904A (en) Configurable report export design method and system
CN113760715A (en) Method and device for testing system
CN112988603B (en) Big data test case generation method and device
CN111225075A (en) Configuration method and device for Internet of things directional access service
CN117033191A (en) Test case parameterization method and system based on parameter attribute classification
CN116208529A (en) HTTP transaction interface testing method and system based on offline feedback
CN113051176B (en) Automatic test data processing method and device, electronic equipment and storage medium
CN114244830B (en) File gateway application nonfunctional testing method and system
CN114595446A (en) Method for realizing dynamically configurable interface joint debugging sandbox
CN115729832A (en) Method and device for maintaining system ledger and verifying indexes

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