Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for realizing restful interface simulation test service based on netty

A technology that simulates testing and interfaces, applied in the field of web development, can solve problems such as different development schedules between front and back ends, and achieve the effect of improving development efficiency, improving robustness, and achieving coverage.

Active Publication Date: 2022-07-05
INTERNET DOMAIN NAME SYST BEIJING ENG RES CENT
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But in practice, some business scenarios are not easy to construct. It would be a perfect solution to simulate the corresponding scenarios. Therefore, there is a demand for simulating interface responses.
[0004] On the other hand, limited by the different schedules of front-end and back-end development
Sometimes the business logic of the back-end interface has not yet been developed, but the front-end needs to use the interface urgently

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for realizing restful interface simulation test service based on netty
  • Method and device for realizing restful interface simulation test service based on netty
  • Method and device for realizing restful interface simulation test service based on netty

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] refer to figure 1 As shown, Embodiment 1 of the present invention provides a method for implementing Restful interface simulation test service based on Netty, and the method is applied to the interface simulation test server, wherein the interface simulation test server is based on the Netty-Server framework as a whole, and abstracts on the framework Entity components such as request server (RequestExpect), response server (ResponseExpect), and Mock class (MockFunction) are included. The method includes:

[0039] Step S1: The interface simulation test server receives an interface call request from the front end, and matches the interface call request to determine whether it is a preset request content and format.

[0040] Specifically, the request server (RequestExpect) processes the interface invocation request from the front end, mainly for path matching and parameter matching, and through matching, the interface invocation request can be accurately matched to the bus...

Embodiment 2

[0084] Embodiment 2 of the present invention provides a service device for implementing Restful interface simulation testing based on Netty, including:

[0085] a request processor, configured to receive an interface call request from the front end, and perform matching detection of paths and parameters on the interface call request, so that the interface call request satisfies the business code logic required by the back end;

[0086] a response processor, configured to process the interface response and generate a response result according to business requirements after the interface invocation request is confirmed to be legal;

[0087] The Netty server is used to send the response result to the front end.

[0088] The request processor and the response processor both provide their own API interfaces, use the API provided by the request processor to write the Mock interface, and use the API provided by the response processor to write the response content corresponding to the...

Embodiment 3

[0091] Embodiment 3 of the present invention provides a computer device, the internal structure of which can be as follows image 3 shown. The computer device includes a processor, memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with other terminals or services over a network connection. When the computer program is executed by the processor, a method for realizing Restful interface simulation test service based on Netty is realized. Wherein, the computer device may be a server,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present application provides a method, apparatus and computer equipment for implementing Restful interface simulation test service based on Netty. The method includes: receiving an interface invocation request from a front end by a simulated test server; performing matching detection on the interface invocation request for a request path and a request parameter, so that the interface invocation request satisfies the business code logic required by the backend; the After the interface call request is confirmed to be legal, the interface response processing is performed; the Netty server sends the processed response result to the front end. The method of the present application improves the front-end and back-end business development efficiency and the complete coverage test requirements of business scenarios.

Description

technical field [0001] The present application relates to the technical field of web development, and in particular, to a method, apparatus, computer equipment and storage medium for realizing Restful interface simulation test service based on Netty. Background technique [0002] With the development of the times, modern web applications are becoming more and more complex. The corresponding development will require more manpower. In order to better support the needs of large-scale collaborative development. People have proposed a development model with the front and back ends separated. Thereby, the developers are divided into: front-end and back-end, two relatively independent development teams. The general mode is that the front end completes the corresponding function by calling the interface provided by the back end. By defining the relevant interfaces on the front and back ends, the front and back ends can be developed independently, and development resources can be...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3676G06F11/3684G06F11/3688
Inventor 郭汉磊高雷卢文哲邢志杰毛伟
Owner INTERNET DOMAIN NAME SYST BEIJING ENG RES CENT
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More