CN116561013B - Testing method and device based on target service framework, electronic equipment and medium - Google Patents

Testing method and device based on target service framework, electronic equipment and medium Download PDF

Info

Publication number
CN116561013B
CN116561013B CN202310806303.1A CN202310806303A CN116561013B CN 116561013 B CN116561013 B CN 116561013B CN 202310806303 A CN202310806303 A CN 202310806303A CN 116561013 B CN116561013 B CN 116561013B
Authority
CN
China
Prior art keywords
service
protocol
test
framework
web
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
CN202310806303.1A
Other languages
Chinese (zh)
Other versions
CN116561013A (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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202310806303.1A priority Critical patent/CN116561013B/en
Publication of CN116561013A publication Critical patent/CN116561013A/en
Application granted granted Critical
Publication of CN116561013B publication Critical patent/CN116561013B/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/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

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

Abstract

The invention provides a testing method, a testing device, testing equipment, a storage medium and a program product based on a target service framework, relates to the technical field of computers, and can be applied to the technical field of finance. The method comprises the following steps: in response to receiving the test service request, determining a protocol corresponding to the test service request; calling a service matched with a protocol in a target service framework based on a preset protocol scheduling rule; sending a test service request to a processing module in a target service framework based on Web test service so as to perform test service processing and obtain result information; and sending the result information based on the Web test service.

Description

Testing method and device based on target service framework, electronic equipment and medium
Technical Field
The invention relates to the technical field of computers, and can be applied to the technical field of finance, in particular to a testing method, a testing device, testing equipment, testing media and testing program products based on a target service framework.
Background
JSON RPC is a stateless and lightweight remote procedure call transport protocol whose delivery content is predominantly through JSON. Since JSON is a text data format (non-binary data), JSON RPC services can be implemented either by RPC or web (HTTP) calling their services. When using web services, existing methods typically employ some three-way tool to send HTTP requests to RPC services for testing. However, relying on three-way tools can lead to reduced testing efficiency. Such as in some closed environments where three-way tools cannot be installed; such as the problem of incompatibility of different three-way tools.
Disclosure of Invention
In view of the above-described problems, the present invention provides a target service framework-based testing method, apparatus, device, medium, and program product for determining a protocol corresponding to a test service request by responding to receiving the test service request; calling a service matched with a protocol in a target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; sending a test service request to a processing module in a target service framework based on Web test service so as to perform test service processing and obtain result information; and sending result information based on the Web test service, so that automatic test service can be realized, the whole process does not need to rely on a three-party tool or log in any three-party service, and the development and test efficiency is improved.
According to a first aspect of the present invention, there is provided a testing method based on a target service framework, including: in response to receiving a test service request, determining a protocol corresponding to the test service request; calling a service matched with the protocol in the target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; transmitting the test service request to a processing module in the target service framework based on the Web test service so as to perform test service processing and obtain result information; and transmitting the result information based on the Web test service.
According to an embodiment of the present invention, the method further comprises: embedding the Web test service into the remote procedure call service framework.
According to an embodiment of the present invention, the Web test service includes a front-end test page and a back-end service, and the embedding the Web test service into the remote procedure call service framework includes: sending the backend service to the remote procedure call service framework; and sending the related files of the front-end test page to the executable files of the remote procedure call service framework.
According to an embodiment of the present invention, the protocol includes: the remote call protocol and/or the hypertext transfer protocol, and the service matched with the protocol further comprises a remote call business service.
According to an embodiment of the present invention, the preset protocol scheduling rule includes: calling the remote call business service under the condition that the protocol is determined to be the remote call protocol; and invoking the Web test service if the protocol is determined to be the hypertext transfer protocol.
According to an embodiment of the present invention, the method further comprises: a protocol portal is configured for receiving a remote call protocol and/or a hypertext transfer protocol.
A second aspect of the present invention provides a testing apparatus based on a target service framework, comprising: the determining module is used for determining a protocol corresponding to the test service request in response to receiving the test service request; the calling module is used for calling the service matched with the protocol in the target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; the first sending module is used for sending the test service request to the processing module in the target service framework based on the Web test service so as to perform test service processing and obtain result information; and the second sending module is used for sending the result information based on the Web test service.
A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the target service framework-based testing method described above.
A fourth aspect of the present invention also provides a computer readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described target service framework based test method.
The fifth aspect of the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described target service framework based testing method.
According to the testing method based on the target service framework, a protocol corresponding to the testing service request is determined by responding to the received testing service request; calling a service matched with a protocol in a target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; sending a test service request to a processing module in a target service framework based on Web test service so as to perform test service processing and obtain result information; and sending result information based on the Web test service, so that automatic test service can be realized, the whole process does not need to rely on a three-party tool or log in any three-party service, and the development and test efficiency is improved.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a target service framework-based testing method, apparatus, device, medium and program product according to an embodiment of the invention;
FIG. 2 schematically illustrates a flow diagram of a method of testing a target-based service framework in accordance with an embodiment of the present invention;
FIG. 3 schematically illustrates a flow chart of an implementation of a target service framework based test method according to another embodiment of the invention;
FIG. 4 schematically shows a block diagram of a testing apparatus based on a target service framework according to an embodiment of the invention; and
fig. 5 schematically shows a block diagram of an electronic device adapted to implement a target service framework based testing method according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The term interpretation to which the present invention relates includes the following.
JSON: a lightweight text data format.
RPC: and calling a remote procedure, and calling a service provided remotely in a network mode.
web service: in one type of HTTP service, a user may operate on a web page through a browser and send a request to a server.
The embodiment of the invention provides a testing method and a testing device based on a target service framework, which are used for determining a protocol corresponding to a testing service request in response to receiving the testing service request; calling a service matched with a protocol in a target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; sending a test service request to a processing module in a target service framework based on Web test service so as to perform test service processing and obtain result information; and sending the result information based on the Web test service.
FIG. 1 schematically illustrates an application scenario diagram of a target service framework-based testing method, apparatus, device, medium and program product according to an embodiment of the invention.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the testing method based on the target service framework according to the embodiment of the present invention may be generally executed by the server 105. Accordingly, the testing device based on the target service framework provided in the embodiment of the present invention may be generally disposed in the server 105. The target service framework based testing method provided by the embodiment of the present invention may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the testing apparatus based on the target service framework provided by the embodiment of the present invention may also be provided in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The target service framework-based test method of the disclosed embodiment will be described in detail below with reference to fig. 2 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a method of testing based on a target service framework according to an embodiment of the invention.
As shown in fig. 2, the embodiment includes operations S210 to S240, and the testing method based on the target service framework may be performed by a server.
In the technical scheme of the invention, the processes of data acquisition, collection, storage, use, processing, transmission, provision, disclosure, application and the like all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In response to receiving the test service request, a protocol corresponding to the test service request is determined in operation S210.
It will be appreciated that a user may initiate a test service request, for example, to access a web service on a browser. Specifically, if the user clicks the API interface displayed on the page and modifies the parameters, the request can be initiated to perform the test.
In operation S220, a service matching the protocol in the target service framework is invoked based on a preset protocol scheduling rule.
It will be appreciated that the protocol scheduling rules are used to determine the invoked service.
For example, the protocols may include remote call protocols (RPCs), hypertext transfer protocols (HTTP), and the like.
For example, the services may include Web test services, remote invocation business services, and the like.
For example, the protocol scheduling rules include: calling a remote call business service under the condition that the protocol is determined to be a remote call protocol; and invoking the Web test service if the protocol is determined to be the hypertext transfer protocol.
The protocols, services, and protocol scheduling rules may be configured as desired by those skilled in the art, and are not limited in this regard.
In operation S230, a test service request is sent to a processing module in the target service framework based on the Web test service to perform test service processing, thereby obtaining result information.
In operation S240, result information is transmitted based on the Web test service.
For example, the protocol corresponding to the test service request is the HTTP protocol. And calling Web test service in the target service framework based on a preset protocol scheduling rule. After receiving the test service request, the Web test service forwards the test service request to a processing module in the target service framework, and after receiving the test service request, the processing module performs service processing, such as test service processing, to obtain result information. And sends the result information to the Web test service. So that the Web test service returns the received result information to the Web front end.
It will be appreciated that depending on the three-way tool, in some closed environments where the three-way tool cannot be installed, testing may be inconvenient. In addition, different developers may use different three-party tools, which is unfavorable for communication and communication, thereby reducing the test efficiency.
According to the testing method based on the target service framework, a protocol corresponding to the testing service request is determined by responding to the received testing service request; calling a service matched with a protocol in a target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; sending a test service request to a processing module in a target service framework based on Web test service so as to perform test service processing and obtain result information; and sending result information based on the Web test service, so that an automatic test service can be realized, namely, the automatic test can be performed by opening a Web page on a browser based on the Web test service in a remote procedure call service framework. The whole process does not need to rely on a three-party tool, does not need to install the three-party tool and does not need to log in any three-party service, thereby improving the development and test efficiency.
The testing method based on the target service framework further comprises the following steps: the Web test service is embedded into a remote procedure call service framework.
For example, the Web test service includes a front-end test page and a back-end service, and embedding the Web test service into the remote procedure call service framework includes: transmitting the back-end service to a remote procedure call service framework; and sending the related files of the front-end test page to an executable file of the remote procedure call service framework.
Fig. 3 schematically shows a flow chart of an execution of a method of testing based on a target service framework according to another embodiment of the invention. Referring to fig. 3, the target service framework 300 may include a remote procedure call service framework. The remote procedure call service framework may include a protocol portal, a remote call business service, a Web test service, and a processing module. The remote call client, the remote call business service and the processing module are an RPC business process, and data are transmitted through an RPC protocol. The Web front end, the Web test service and the processing module can realize the service flow of the automatic test of the RPC service, and data is transmitted through the HTTP protocol.
And the processing module is used for receiving parameters (such as JSON format), processing the service and returning processing results (such as JSON format).
And remotely calling the business service, which is used for providing an RPC interface to the outside, receiving the request of the RPC client and forwarding the request to the processing module for processing.
The Web test service is built in a remote procedure call service framework and is used for providing a Web test page externally, receiving a request of a Web front end and forwarding the request to the processing module for processing.
A protocol portal for receiving a request.
It should be noted that, for the Web test service, the Web test service is a micro Web service, which can be implemented by the following ways: 1. developing front-end test pages (html pages, JS scripts and other front-end files); 2. developing a back-end service (a remote procedure call service framework supports the HTTP protocol, so that the back-end service of the Web test service can be directly implemented based on the remote procedure call service framework); 3. the Web test service back-end service is embedded into a remote procedure call service framework; 4. the front-end test page related files are packaged and embedded into the RPC service, such as the related files of the front-end pages are packaged into the binary executable files of the RPC service.
For a better understanding of the present invention, the following examples are set forth to illustrate the invention, but are not to be construed as limiting the invention.
Step 1, a user realizes a business service and a business processing module, completes development of RPC service, starts the service, and enables built-in web test service through configuration parameters;
step 2, inputting addresses (ip plus port and url, such as 127.0.0.1:7777/demo) of services in the browser, and entering a web test interface;
step 3, selecting an API interface on the web test page, clicking and sending, and initiating a test (the step can directly use default request parameters provided by the page or initiate the test after modifying the request parameters);
step 4, after receiving the request initiated by the web front end, the web test service forwards the request to the business service module;
step 5, after receiving the request, the business processing service module processes the business and sends the result back to the web test service;
and step 6, after the web test service receives the result of the service processing module, the result is sent back to the web front end.
It should be noted that in step 3, an API interface list of the RPC service may be displayed on the web page, and a default request parameter is provided for each API interface. The API interface list and default request parameters are automatically generated based on the proto file of the user. Specifically, the user writes the proto file, defines the API interface of the RPC service, and the request parameters and the format of the response result (the request and the response are in JSON format, which fields are needed to be indicated, which types of fields are needed to be indicated), then uses the code generating tool provided by the RPC framework to generate corresponding codes according to the proto file, and the API interface list and the default request parameters are automatically generated when analyzing the proto file. With the API interface list and default request parameters, a user can simply click on the page to realize automatic testing.
It should be noted that, the built-in web service can control whether to be started or not through the configuration parameters, so that the web test service can be started for testing only in the testing stage, and the web test service is closed after the service is online, so that excessive interfaces are prevented from being exposed, and safety is improved.
The testing method based on the target service framework further comprises the following steps: a protocol portal is configured for receiving a remote invocation protocol and/or a hypertext transfer protocol.
Protocol entry: may be used to receive requests from RPC clients or web front ends, forward the requests to corresponding services according to different protocols (RPC or HTTP), such as data transmitted by the RPC protocol to RPC traffic services, and data transmitted by the HTTP protocol to web test services.
The protocol portal is used to receive remote invocation protocols and/or hypertext transfer protocols, so there may be only one protocol portal.
By supporting the two protocols of RPC and HTTP on the same port, the RPC business service and the web test service share the same port, which has the advantage of more convenient deployment and use. It will be appreciated that a two port implementation may also be employed, with one port being occupied by each of the RPC traffic service and web test.
Furthermore, the RPC business service and the web test service can share the same business processing module, so that the test result (business processing result) is not affected, and the request forwarding level can be reduced. It will be appreciated that the request received by the web test service may also be forwarded to the RPC traffic service, and thus may be forwarded more than once.
Based on the testing method based on the target service frame, the invention also provides a testing device based on the target service frame. The device will be described in detail below in connection with fig. 4.
Fig. 4 schematically shows a block diagram of a test apparatus based on a target service framework according to an embodiment of the present invention.
As shown in fig. 4, the testing apparatus 400 based on the target service framework of this embodiment includes a determining module 410, a calling module 420, a first transmitting module 430, and a second transmitting module 440.
A determining module 410, configured to determine, in response to receiving a test service request, a protocol corresponding to the test service request; a calling module 420, configured to call a service matching the protocol in the target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service; a first sending module 430, configured to send the test service request to a processing module in the target service framework based on the Web test service, so as to perform test service processing, and obtain result information; and a second transmitting module 440 for transmitting the result information based on the Web test service.
In some embodiments, the apparatus further comprises: and the embedding module is used for embedding the Web test service into the remote procedure call service framework.
In some embodiments, the Web test service includes a front-end test page and a back-end service, and the embedding the Web test service into the remote procedure call service framework includes: sending the backend service to the remote procedure call service framework; and sending the related files of the front-end test page to the executable files of the remote procedure call service framework.
In some embodiments, the protocol comprises: the remote call protocol and/or the hypertext transfer protocol, and the service matched with the protocol further comprises a remote call business service.
In some embodiments, the preset protocol scheduling rules include: calling the remote call business service under the condition that the protocol is determined to be the remote call protocol; and invoking the Web test service if the protocol is determined to be the hypertext transfer protocol.
In some embodiments, the apparatus further comprises: and the configuration module is used for configuring a protocol inlet, and the protocol inlet is used for receiving a remote call protocol and/or a hypertext transfer protocol.
Any of the determining module 410, the calling module 420, the first transmitting module 430, and the second transmitting module 440 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the invention, at least one of the determination module 410, the invocation module 420, the first transmission module 430, and the second transmission module 440 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the determining module 410, the invoking module 420, the first sending module 430, and the second sending module 440 may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement a target service framework based testing method according to an embodiment of the invention.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present invention includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 501 may also include on-board memory for caching purposes. The processor 501 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flow according to an embodiment of the invention.
In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are stored. The processor 501, ROM502, and RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM502 and/or the RAM 503. Note that the program may be stored in one or more memories other than the ROM502 and the RAM 503. The processor 501 may also perform various operations of the method flow according to embodiments of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 500 may further comprise an input/output (I/O) interface 505, the input/output (I/O) interface 505 also being connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: 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), 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 the context of this document, 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. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM502 and/or RAM 503 and/or one or more memories other than ROM502 and RAM 503 described above.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. When the computer program product runs in a computer system, the program code is used for enabling the computer system to realize the testing method based on the target service framework provided by the embodiment of the invention.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 511 via the communication portion 509. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the invention and/or in the claims may be combined in various combinations and/or combinations even if such combinations or combinations are not explicitly recited in the invention. In particular, the features recited in the various embodiments of the invention and/or in the claims can be combined in various combinations and/or combinations without departing from the spirit and teachings of the invention. All such combinations and/or combinations fall within the scope of the invention.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the invention is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.

Claims (8)

1. A testing method based on a target service framework, comprising:
in response to receiving a test service request, determining a protocol corresponding to the test service request;
calling a service matched with the protocol in the target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service;
transmitting the test service request to a processing module in the target service framework based on the Web test service so as to perform test service processing and obtain result information; and
transmitting the result information based on the Web test service;
the preset protocol scheduling rule comprises the following steps:
calling a remote call business service under the condition that the protocol is determined to be a remote call protocol; and
and calling the Web test service under the condition that the protocol is determined to be the hypertext transfer protocol.
2. The method of claim 1, further comprising:
embedding the Web test service into the remote procedure call service framework.
3. The method of claim 2, wherein the Web test service comprises a front-end test page and a back-end service, the embedding the Web test service into the remote procedure call service framework comprising:
sending the backend service to the remote procedure call service framework; and
and sending the related files of the front-end test page to the executable files of the remote procedure call service framework.
4. The method of claim 1, wherein the protocol comprises: the remote call protocol and/or the hypertext transfer protocol, and the service matched with the protocol further comprises the remote call business service.
5. The method of claim 1, further comprising:
a protocol portal is configured for receiving a remote call protocol and/or a hypertext transfer protocol.
6. A target service framework-based testing apparatus, comprising:
the determining module is used for determining a protocol corresponding to the test service request in response to receiving the test service request;
the calling module is used for calling the service matched with the protocol in the target service framework based on a preset protocol scheduling rule; the target service framework comprises a remote procedure call service framework, and the service matched with the protocol comprises Web test service;
the first sending module is used for sending the test service request to the processing module in the target service framework based on the Web test service so as to perform test service processing and obtain result information; and
the second sending module is used for sending the result information based on the Web test service;
the preset protocol scheduling rule comprises the following steps:
calling a remote call business service under the condition that the protocol is determined to be a remote call protocol; and
and calling the Web test service under the condition that the protocol is determined to be the hypertext transfer protocol.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
8. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-5.
CN202310806303.1A 2023-07-04 2023-07-04 Testing method and device based on target service framework, electronic equipment and medium Active CN116561013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310806303.1A CN116561013B (en) 2023-07-04 2023-07-04 Testing method and device based on target service framework, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310806303.1A CN116561013B (en) 2023-07-04 2023-07-04 Testing method and device based on target service framework, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN116561013A CN116561013A (en) 2023-08-08
CN116561013B true CN116561013B (en) 2023-09-26

Family

ID=87496756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310806303.1A Active CN116561013B (en) 2023-07-04 2023-07-04 Testing method and device based on target service framework, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116561013B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117520210B (en) * 2024-01-05 2024-04-16 芯瞳半导体技术(山东)有限公司 System software testing method, target machine and remote testing central control machine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080047248A (en) * 2006-11-23 2008-05-28 한국전자통신연구원 Security testing apparatus and method of remote remote procedure call software
CN110430275A (en) * 2019-08-09 2019-11-08 中国工商银行股份有限公司 Data processing method, system, calculates equipment and medium at device
CN110798380A (en) * 2019-10-23 2020-02-14 北京奇艺世纪科技有限公司 Data acquisition method, system, device, test equipment and test server
CN111382058A (en) * 2018-12-29 2020-07-07 北京字节跳动网络技术有限公司 Service testing method and device, server and storage medium
CN112181813A (en) * 2020-09-17 2021-01-05 的卢技术有限公司 Interface automation test method, system and computer readable storage medium
CN116069577A (en) * 2023-01-31 2023-05-05 浪潮通用软件有限公司 Interface testing method, equipment and medium for RPC service

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2514796A (en) * 2013-06-04 2014-12-10 Ibm Web service testing
US9921945B2 (en) * 2015-04-06 2018-03-20 Adp, Llc Automatic verification of JSON data
US20170286267A1 (en) * 2016-04-01 2017-10-05 Google Inc. Fast and efficient continuous integration test system for large scale services
US10423472B2 (en) * 2017-05-17 2019-09-24 American Megatrends International, Llc System and method for providing extended javascript object notation (JSON) remote procedure call (RPC) with mediator
US20200110584A1 (en) * 2018-10-04 2020-04-09 Electronic Arts Inc. Automated code generation for functional testing of software applications
US11829283B2 (en) * 2021-07-30 2023-11-28 Oracle International Corporation REST Api validation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080047248A (en) * 2006-11-23 2008-05-28 한국전자통신연구원 Security testing apparatus and method of remote remote procedure call software
CN111382058A (en) * 2018-12-29 2020-07-07 北京字节跳动网络技术有限公司 Service testing method and device, server and storage medium
CN110430275A (en) * 2019-08-09 2019-11-08 中国工商银行股份有限公司 Data processing method, system, calculates equipment and medium at device
CN110798380A (en) * 2019-10-23 2020-02-14 北京奇艺世纪科技有限公司 Data acquisition method, system, device, test equipment and test server
CN112181813A (en) * 2020-09-17 2021-01-05 的卢技术有限公司 Interface automation test method, system and computer readable storage medium
CN116069577A (en) * 2023-01-31 2023-05-05 浪潮通用软件有限公司 Interface testing method, equipment and medium for RPC service

Also Published As

Publication number Publication date
CN116561013A (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US11689626B2 (en) Transport channel via web socket for ODATA
CN116561013B (en) Testing method and device based on target service framework, electronic equipment and medium
CN113434241A (en) Page skipping method and device
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN110377273B (en) Data processing method, device, medium and electronic equipment
CN114237651A (en) Installation method and device of cloud native application, electronic equipment and medium
CN113360377B (en) Test method and device
CN112015383A (en) Login method and device
CN112882895A (en) Health examination method, device, computer system and readable storage medium
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN111125503B (en) Method and apparatus for generating information
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development
CN114237765A (en) Functional component processing method and device, electronic equipment and medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113596164A (en) Data access method, device, system, equipment and medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
CN109803017B (en) File intercommunication method and device, computing equipment and computer readable storage medium
CN111131354B (en) Method and apparatus for generating information
CN111125676B (en) Joint authorization method and device
CN113051090A (en) Interface processing method and device, interface calling method and device, system and medium
CN116701018A (en) Data processing method, data acquisition method, device, equipment and storage medium
CN114117449A (en) Hidden parameter mining-based test method and device, electronic equipment and 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