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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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,...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com



