CN117130933A - Baffle service method, system, equipment and storage medium - Google Patents

Baffle service method, system, equipment and storage medium Download PDF

Info

Publication number
CN117130933A
CN117130933A CN202311156005.9A CN202311156005A CN117130933A CN 117130933 A CN117130933 A CN 117130933A CN 202311156005 A CN202311156005 A CN 202311156005A CN 117130933 A CN117130933 A CN 117130933A
Authority
CN
China
Prior art keywords
baffle
request
data
interface
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311156005.9A
Other languages
Chinese (zh)
Inventor
赖俊宏
苏慧
陈依婧
杨千帆
于跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311156005.9A priority Critical patent/CN117130933A/en
Publication of CN117130933A publication Critical patent/CN117130933A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a baffle service method, a baffle service system, baffle service equipment and a storage medium. Can be applied to the financial field or other fields. The method is applied to the baffle server and comprises the following steps: receiving a request message of at least one requester, wherein the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the request content and the data service mapping relation of the request interface; transmitting the request message of the calling party to a corresponding data service to obtain baffle data; and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party. According to the method, different requests are received by using the baffle service, and baffle data are called from the data service in a unified manner, so that corresponding simulation messages can be provided for the requests of different protocol types.

Description

Baffle service method, system, equipment and storage medium
Technical Field
The present application relates to the field of testing, and in particular, to a baffle service method, system, device, and storage medium.
Background
With the development of information technology, various software products are frequently used in the daily life scene of human beings, various performance tests are required to be frequently carried out in the development process of the software products, and in the test process, the performance test of the products is often carried out by adopting simulated actual scene state data. When testing front-end platforms (e.g., clients, web pages, applets, etc.) of software products, the request response is typically simulated to test the performance response of the front-end platform. However, when different interface data are requested by the product, the format of the request sent by the product is different due to different interface protocol types, so that different analog response data need to be obtained for different requests to complete the test during the test.
Currently, the baffle service is only aimed at a fixed interface service, and therefore, the requirement of providing multi-interface analog data cannot be met at the same time.
Disclosure of Invention
Based on the above problems, the application provides a baffle service method, a system, equipment and a storage medium, which can provide simulation corresponding messages for requests of different protocol types.
The application discloses the following technical scheme:
the first aspect of the application provides a baffle service method, which is applied to a baffle server, and comprises the following steps:
receiving a request message of at least one requester, wherein the request message of the at least one requester corresponds to at least one request interface;
according to the request interface of the request message, analyzing the request message to obtain request content;
generating a request message of a calling party according to the request content and the data service mapping relation of the request interface;
transmitting the request message of the calling party to a corresponding data service to obtain baffle data;
and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party.
In one possible implementation, the method further includes:
configuring at least one interface information supported by a baffle;
and configuring the mapping relation between each interface and at least one data service.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the data service corresponding to at least one object in each interface.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the mapping relation between the data returned by the data service and the fields in the interface return message.
In one possible implementation manner, the encapsulating the baffle data into a return message, and returning the return message to the corresponding requester includes: and according to the mapping relation between the data returned by the configuration data service and the fields in the interface return message, packaging the baffle data into a return message, and returning the return message to the corresponding requester.
A second aspect of the present application provides a barrier service apparatus, comprising:
a request receiving unit, configured to receive a request packet of at least one requester, where the request packet of the at least one requester corresponds to at least one request interface;
the analyzing unit is used for analyzing the request message according to the request interface of the request message to obtain request content;
the calling message generating unit is used for generating a request message of a calling party according to the request content and the data service mapping relation of the request interface;
the baffle data obtaining unit is used for sending the request message of the calling party to a corresponding data service so as to obtain baffle data; and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party.
In one possible implementation, the system further includes: the interface configuration module is used for configuring at least one piece of interface information supported by the baffle; and configuring the mapping relation between each interface and at least one data service.
A third aspect of the present application provides a baffle service system, comprising:
the baffle service module and the data service module;
the baffle service module is used for receiving a request message of at least one requester, and the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the mapping relation between the request content and the data service module of the request interface; transmitting the request message of the calling party to a corresponding data service module; packaging baffle data obtained from the data service module into a return message, and returning the return message to a corresponding requester;
and the data service module is used for returning the requested baffle data to the baffle service module according to the request message of the calling party.
A third aspect of the present application provides a barrier service apparatus, comprising: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the baffle service method of the first aspect of the present application.
A fourth aspect of the present application provides a computer readable storage medium having instructions stored therein which, when executed on a terminal device, cause the terminal device to perform the baffle service method according to the first aspect of the present application.
Compared with the prior art, the application has the following beneficial effects:
the application provides a baffle service method, a baffle service system, baffle service equipment and a storage medium. The method is applied to the baffle server and comprises the following steps: receiving a request message of at least one requester, wherein the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the request content and the data service mapping relation of the request interface; transmitting the request message of the calling party to a corresponding data service to obtain baffle data; and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party. According to the method, different requests are received by using the baffle service, and baffle data are called from the data service in a unified manner, so that corresponding simulation messages can be provided for the requests of different protocol types.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of an example scenario set forth in an embodiment of the present application;
FIG. 2 is a flowchart of a baffle service method according to an embodiment of the present application;
FIG. 3 is a block diagram of a baffle service device according to an embodiment of the present application;
fig. 4 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
First, terms related to the embodiments of the present application will be explained:
baffle service: means for modeling network requests and responses to facilitate testing and debugging; when the tested object needs to interact with the data of other services for testing, the baffle service can be used for replacing the services to return the simulated interaction data.
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the following description is provided for the background of the embodiments of the present application.
As described above, with the development of information technology, various software products are frequently used in human daily life, and in the process of developing software products, various performance tests are required to be frequently performed, and in the process of testing, the performance of the products is often tested by using simulated actual scene state data. When testing front-end platforms (e.g., clients, web pages, applets, etc.) of software products, the request response is typically simulated to test the performance response of the front-end platform. However, when different interface data are requested by the product, the format of the request sent by the product is different due to different types of interface protocols, for example, in a banking system, so that different analog response data need to be obtained for different requests to complete the test.
At present, the baffle service is only aimed at fixed interface service, and no baffle platform exists, so that different message formats of different request modes can be supported, and baffle data can be configured uniformly. Only the specific tools are selected to process the specific requests or the corresponding baffle programs are developed by themselves.
In view of this, the embodiment of the present application provides a baffle service method, a system, a device and a storage medium, and in order to facilitate understanding of the baffle service method provided by the embodiment of the present application, the following description will be made with reference to the scenario example shown in fig. 1. Fig. 1 is a schematic diagram of an example of a scenario provided in an embodiment of the present application.
In practical application of the software product, a user may operate a front-end platform such as a software client, a web page, an applet, etc. loaded on the electronic device, where the front-end platform may request data from a back-end service interface to provide services for the user. Therefore, the tested product in the embodiment of the application can be a front-end platform such as a software client, a webpage, an applet and the like, and the scene example is illustrated by a client test.
In practical application, the client side responds to the operation of the user and sends a request to the server to access the corresponding interface to obtain response data so as to provide services for the user, and the formats of the request messages corresponding to different interfaces are different. When testing the client, the baffle service is used for simulating the scenes of different interface responses.
The baffle service receives a request message of at least one requester sent by a tested client, wherein the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the request content and the data service mapping relation of the request interface; transmitting the request message of the calling party to a corresponding data service to obtain baffle data; and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party. The embodiment of the application can provide corresponding simulation response messages for requests of different protocol types.
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 2 is a flowchart of a baffle service method according to an embodiment of the present application. As shown in fig. 2, the baffle service is applied to a baffle server. The method comprises the following steps:
s201, receiving a request message of at least one requester, wherein the request message of the at least one requester corresponds to at least one request interface.
The baffle server may receive requests sent by a plurality of different requesters, or may receive a plurality of requests sent by the same receiver. Different interface protocol types are different, different interfaces have different request modes, and different request message formats are different.
S202, analyzing the request message according to a request interface of the request message to obtain request content.
The request content may include interface information, request mode, protocol version, etc. The baffle service analyzes the request message to determine the data service mapped by the request interface of the request message, and then the baffle data is called from the corresponding data service.
And resolving the acquired request message according to the corresponding interface configuration, directly returning if the resolution fails, and acquiring the requested data object if the resolution is successful.
S203, generating a request message of a calling party according to the request content and the data service mapping relation of the request interface.
After receiving the request messages in different formats, the baffle service analyzes the request messages to obtain corresponding request contents such as interface information, request modes, protocol versions and the like, and generates a request message of a calling party for calling the data service. The baffle service calls different data services in unison.
In order to meet the actual test requirement, the user can configure the baffle service, and the server responds to the user operation to configure the interface supported by the baffle service, and the specific implementation manner comprises the following steps:
a1, configuring baffle service, setting a baffle service name, and configuring ports used by the baffles according to different request modes or different batches and the like. And when the method is applied, starting corresponding baffle service according to the configured baffle service name.
A2, configuring at least one interface information supported by the baffle. Such as the request mode of the interface, the format of the interface message, the fields of the interface, etc. And associating the corresponding interfaces with the configured baffle service names.
A3, configuring the mapping relation between each interface and at least one data service, comprising:
and configuring the data service corresponding to at least one object in each interface. And/or configuring the mapping relation between the data returned by the data service and the fields in the interface return message. An interface may configure a plurality of corresponding data services and may configure the mapping of results returned by the data services to interface return fields.
S204, the request message of the calling party is sent to the corresponding data service to obtain baffle data.
After the request message is analyzed, request contents such as request interface information, request mode, protocol version and the like are obtained, and the baffle service calls the data service corresponding to the request interface according to the mapping relation.
The data service of the embodiment of the application can be a baffle service of the existing visual interface management platform such as YApi and the like in the market, and can also be an actual interface service. The system can also be a custom data service, for example, a maintenance function can be provided for the client information, and a baffle data service for providing the client information is configured; baffle data of evaluation can be configured, and different evaluation results can be returned according to different clients or amounts and the like.
S205, packaging the baffle data into a return message, and returning the return message to the corresponding requesting party.
The baffle service assembles baffle data acquired from the data service into a response message, and returns the response message to the requester.
And the baffle service receives the data returned by the data service and fills the data into a returned result according to the configuration of the data service corresponding to the interface. If a plurality of data services are corresponding, the data services need to be processed one by one and finally integrated into return data.
In one possible implementation manner, the encapsulating the baffle data into a return message, and returning the return message to the corresponding requester includes: and according to the mapping relation between the data returned by the configuration data service and the fields in the interface return message, packaging the baffle data into a return message, and returning the return message to the corresponding requester.
The embodiment of the application configures the corresponding interface in the baffle service and the source of the data service corresponding to the data in the interface, configures the corresponding data in the data service and provides the service, thus completing the development and configuration of the baffle. Different request modes are supported, and baffle data are uniformly configured. The baffle service is used for receiving different requests and calling baffle data from the data service uniformly, so that corresponding simulated messages can be provided for the requests with different protocol types.
Fig. 3 is a block diagram of a baffle service device according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
a request receiving unit 301, configured to receive a request packet of at least one requester, where the request packet of the at least one requester corresponds to at least one request interface;
the parsing unit 302 is configured to parse the request message according to a request interface of the request message, so as to obtain a request content;
a call message generating unit 303, configured to generate a request message of a caller according to a mapping relationship between a request content and a data service of a request interface;
a baffle data obtaining unit 304, configured to send the request message of the caller to a corresponding data service to obtain baffle data; and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party.
In one possible implementation, the method further includes:
configuring at least one interface information supported by a baffle;
and configuring the mapping relation between each interface and at least one data service.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the data service corresponding to at least one object in each interface.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the mapping relation between the data returned by the data service and the fields in the interface return message.
In one possible implementation manner, the encapsulating the baffle data into a return message, and returning the return message to the corresponding requester includes: and according to the mapping relation between the data returned by the configuration data service and the fields in the interface return message, packaging the baffle data into a return message, and returning the return message to the corresponding requester.
In one possible implementation, the system further includes: the interface configuration module is used for configuring at least one piece of interface information supported by the baffle; and configuring the mapping relation between each interface and at least one data service.
A third aspect of the present application provides a baffle service system, comprising:
the baffle service module and the data service module;
the baffle service module is used for receiving a request message of at least one requester, and the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the mapping relation between the request content and the data service module of the request interface; transmitting the request message of the calling party to a corresponding data service module; packaging baffle data obtained from the data service module into a return message, and returning the return message to a corresponding requester;
and the data service module is used for returning the requested baffle data to the baffle service module according to the request message of the calling party.
In one possible implementation, the method further includes:
configuring at least one interface information supported by a baffle;
and configuring the mapping relation between each interface and at least one data service.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the data service corresponding to at least one object in each interface.
In one possible implementation manner, the configuring the mapping relationship between each interface and at least one data service includes:
and configuring the mapping relation between the data returned by the data service and the fields in the interface return message.
In one possible implementation manner, the encapsulating the baffle data into a return message, and returning the return message to the corresponding requester includes: and according to the mapping relation between the data returned by the configuration data service and the fields in the interface return message, packaging the baffle data into a return message, and returning the return message to the corresponding requester.
The embodiment of the application provides a computer readable storage medium, wherein instructions are stored in the computer readable storage medium, and when the instructions run on terminal equipment, the terminal equipment is caused to execute the baffle service method.
In practical applications, the computer-readable storage medium may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or cloud service system. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 4, a schematic structural diagram of a computer device is provided in an embodiment of the present application. The computer device may be applied as a baffle service device. The computer device 12 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in FIG. 4, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown in fig. 4, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in fig. 4, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the baffle service method provided by the embodiment of the present application.
The baffle service method, the system, the equipment and the storage medium provided by the application can be used in the financial field or other fields, for example, can be used in application scenes of financial software testing in the financial field. Other fields are any field other than the financial field, for example, the test field. The foregoing is merely exemplary, and is not intended to limit the application fields of the baffle service method, system, device, and storage medium provided by the present application.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, with reference to the description of the method embodiments in part. The above-described apparatus and system embodiments are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements illustrated as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The foregoing is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the technical scope of the present application should be included in the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (10)

1. A baffle service method, characterized by being applied to a baffle server, the method comprising:
receiving a request message of at least one requester, wherein the request message of the at least one requester corresponds to at least one request interface;
according to the request interface of the request message, analyzing the request message to obtain request content;
generating a request message of a calling party according to the request content and the data service mapping relation of the request interface;
transmitting the request message of the calling party to a corresponding data service to obtain baffle data;
and packaging the baffle data into a return message, and returning the return message to the corresponding requesting party.
2. The method according to claim 1, wherein the method further comprises:
configuring at least one interface information supported by a baffle;
and configuring the mapping relation between each interface and at least one data service.
3. The method of claim 2, wherein configuring the mapping relationship of each interface to at least one data service comprises:
and configuring the data service corresponding to at least one object in each interface.
4. A method according to claim 3, wherein said configuring the mapping of each interface to at least one data service comprises:
and configuring the mapping relation between the data returned by the data service and the fields in the interface return message.
5. The method of claim 4, wherein encapsulating the baffle data into a return message for return to the corresponding requestor comprises: and according to the mapping relation between the data returned by the configuration data service and the fields in the interface return message, packaging the baffle data into a return message, and returning the return message to the corresponding requester.
6. A baffle service device, comprising:
a request receiving unit, configured to receive a request packet of at least one requester, where the request packet of the at least one requester corresponds to at least one request interface;
the analyzing unit is used for analyzing the request message according to the request interface of the request message to obtain request content;
the calling message generating unit is used for generating a request message of a calling party according to the request content and the data service mapping relation of the request interface;
the baffle data obtaining unit is used for sending the request message of the calling party to a corresponding data service so as to obtain baffle data;
and the message return unit is used for packaging the baffle data into a return message and returning the return message to the corresponding requesting party.
7. The system of claim 6, wherein the system further comprises: the interface configuration module is used for configuring at least one piece of interface information supported by the baffle; and configuring the mapping relation between each interface and at least one data service.
8. A baffle service system, comprising:
the baffle service module and the data service module;
the baffle service module is used for receiving a request message of at least one requester, and the request message of the at least one requester corresponds to at least one request interface; according to the request interface of the request message, analyzing the request message to obtain request content; generating a request message of a calling party according to the mapping relation between the request content and the data service module of the request interface; transmitting the request message of the calling party to a corresponding data service module; packaging baffle data obtained from the data service module into a return message, and returning the return message to a corresponding requester;
and the data service module is used for returning the requested baffle data to the baffle service module according to the request message of the calling party.
9. A baffle service apparatus, comprising: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the baffle service method of any of claims 1-5.
10. A computer readable storage medium having instructions stored therein which, when executed on a terminal device, cause the terminal device to perform the baffle service method of any one of claims 1-5.
CN202311156005.9A 2023-09-08 2023-09-08 Baffle service method, system, equipment and storage medium Pending CN117130933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311156005.9A CN117130933A (en) 2023-09-08 2023-09-08 Baffle service method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311156005.9A CN117130933A (en) 2023-09-08 2023-09-08 Baffle service method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117130933A true CN117130933A (en) 2023-11-28

Family

ID=88859841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311156005.9A Pending CN117130933A (en) 2023-09-08 2023-09-08 Baffle service method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117130933A (en)

Similar Documents

Publication Publication Date Title
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN109857404B (en) SDK interface packaging method and device, storage medium and electronic equipment
CN110955409B (en) Method and device for creating resources on cloud platform
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN109873735B (en) Performance test method and device for H5 page and computer equipment
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN106919511B (en) Application simulation method, simulation application, operation method thereof and simulation system
CN112346794A (en) Interface calling method, device, equipment and medium
CN114253864A (en) Service testing method and device, electronic equipment and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN111752820B (en) gRPC interface pressure test method, computer equipment and storage medium
CN112395098B (en) Application program interface calling method and device, storage medium and electronic equipment
CN111859205A (en) Analytic method and equipment for batch processing tasks
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN112671574B (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN111159033A (en) Software testing method and device
CN115934537A (en) Interface test tool generation method, device, equipment, medium and product
CN117130933A (en) Baffle service method, system, equipment and storage medium
CN115309657A (en) Method, device, medium and program product for providing test case
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN112506781A (en) Test monitoring method, test monitoring device, electronic device, storage medium, and program product

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