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

Method and apparatus for testing service components

A technology of service components and service methods, applied in the field of testing service components, can solve problems such as large workload, increase the burden on application developers, and test difficulties, and achieve the effect of simplifying the testing process, reducing the cost of test development, and improving the efficiency of testing.

Active Publication Date: 2022-04-12
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art: (1) There are many open frameworks of the existing web system, and different open frameworks require developers to provide HTTP interfaces of corresponding technologies. Components can be tested, and related codes required for testing need to be developed; when there are a large number of service components and each service component contains several service methods, because the existing technology test scheme is not universal, it will bring a huge workload, adding The Burden of Big App Developers
(2) On the other hand, in the prior art, when sending parameters for testing, the parameters are directly passed in the URL. During the process of passing parameters, URL encoding is required to prevent garbled characters, and special characters need to be escaped, especially for nested It is very inconvenient to manually compile parameters; in addition, all parameters are manually input during testing, and the caller must know the format information of the parameters, which brings great difficulties to the test

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 apparatus for testing service components
  • Method and apparatus for testing service components
  • Method and apparatus for testing service components

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0081] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0082] figure 1 is a schematic diagram of main steps of a method for testing a service component according to an embodiment of the present invention.

[0083] Such as figure 1 As shown, the method for testing service components provided by the embodiment of the present invention includes:

[0084] S10, the client requests service component information and service method...

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

Embodiments of the present invention provide a method and device for testing a service component, which can reduce the test cost of the service component and achieve better test results. According to the first aspect of an embodiment of the present invention, a method for testing a service component is provided, including: requesting service component information and service method information from the server; generating contract parameters according to the service component name and service method name selected by the user request information and send it to the server; generate contract test information and send it to the server according to the contract parameter information returned by the server; receive the service of calling the corresponding service component from the server according to the contract test information The test result returned after the method.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for testing service components. Background technique [0002] In a large-scale web system, the system provides or relies on different types of service components. Service components refer to a collection of codes with certain service functions, such as querying user order information, querying product price information, sending messages, and exporting report data. etc. In these scenarios, service components need to be testable, so as to keep abreast of the runtime status and runtime results of the service. [0003] In the prior art, when testing a service component, it is necessary to develop a corresponding HTTP interface for the specific service method of the service component to be tested in the web system, and call the service method of the service component through the HTTP interface service to perform the test. [0004] In the process of realizing th...

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/3668
Inventor 刘小云
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD