Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method for generating generalized calls based on dubbo service interface for interface testing

A technology of interface testing and service interface, which is applied in the field of interface testing based on the generation of generalized calls based on Dubbo service interface, achieving high stability and reliability, convenient use, and scientific and reasonable design

Active Publication Date: 2022-07-01
中建电子商务有限责任公司
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, the Jmeter-based Dubbo interface test needs to rely on the third-party tool Jmeter, and needs to manually fill in various parameters of the tested interface, and can only share the test plan through the script configuration file of Jmeter

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
  • A method for generating generalized calls based on dubbo service interface for interface testing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0026] like figure 1 As shown, a method for interface testing based on Dubbo service interface generation and generalization call provided by the present invention includes the following steps:

[0027] Step S1, analyze the Jar file package of the Dubbo service interface, and scan all Jar file packages;

[0028] Step S2, use JAVA reflection technology to scan all remote methods in the Jar file package;

[0029] Step S3, analyzing the type of the remot...

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 invention discloses a method for performing interface testing by generating generalized calls based on Dubbo service interface, including analyzing Jar file package of Dubbo service interface, scanning all Jar file packages; using JAVA reflection technology to scan all remote methods in Jar file package ;Analyze the type of the remote method, and structurally disassemble its generic type; analyze the type of the remote method, find the custom type, and recursively parse its custom type; scan the parsed data structure of steps S2-S4, The scan results are stored as independent versions, and the results of multiple scans are saved in one project; the generalized calling code is generated by bytecode technology and loaded dynamically; the test parameters are automatically generated for interface testing. The invention only needs the Jar file of the Dubbo service interface, does not depend on other third-party services, has higher stability and reliability, generates generalized calling code and simulates data test interface after scanning, and has fast execution and high efficiency.

Description

technical field [0001] The invention belongs to the technical field of interface testing, and in particular relates to a method for performing interface testing by generating generalized calls based on a Dubbo service interface. Background technique [0002] Existing interface tests are usually Jmeter-based Dubbo interface tests, manual Dubbo service consumers or generalized calling logic for Dubbo interface tests, and methods for Dubbo interface perception and testing based on API document generation technologies such as Swagger. Among them, the Jmeter-based Dubbo interface test needs to rely on the third-party tool Jmeter, needs to manually fill in various parameters of the tested interface, and can only share the test plan through the script configuration file of Jmeter. Manually writing Dubbo service consumers or generalized calling logic to test the Dubbo interface requires writing corresponding test code for different service interfaces of different projects. At the sa...

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/3684G06F11/3688
Inventor 干鹏宇
Owner 中建电子商务有限责任公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products