Method and device for generating incoming parameter object of test interface application

A technology for testing interfaces and class objects, applied in the Internet field, can solve problems such as setting errors, not being available, and wrong settings, so as to avoid the problem of conversion errors.

Pending Publication Date: 2020-05-22
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] However, the inventor found after research that no matter which of the above two methods is adopted, there are problems: the first method requires professional technicians to write computer script language codes, mainly for the purpose of setting the input parameters of each interface. Class object, which requires technicians to have the programming foundation of computer language
In addition, if there are too many fields in the input parameter object, due to technical problems during writing, there will also be problems of missing or wrong settings
The second method, although it does not require professional technicians to write computer scripting language codes, due to the conversion setting flaws of the JSON conversion tool, for the custom type fields of input parameter objects, because their field values ​​​​are often a set, and in The field values ​​filled in the corresponding fields in the JSON string Demo cannot correspond to a set when converted, so the converted field values ​​are all empty values ​​(null), and no specific values ​​can be obtained, resulting in the setting of test cases for interface applications mistake

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 generating incoming parameter object of test interface application
  • Method and device for generating incoming parameter object of test interface application
  • Method and device for generating incoming parameter object of test interface application

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples.

[0024] In the embodiment of the present invention, in order to simply and correctly generate the input parameter object of the test interface application without the participation of professionals, the input parameter model is set, and when the input parameter object for the test interface application is generated, the set parameter is invoked. An input class model, the input class model assigns field values ​​corresponding to each field according to the field type of each field in the obtained class file, and generates an input class object. Furthermore, when it is determined that the field type of the field is a custom type, the input class model instantiates the field as an input class object, and all field values ​​contained in the input class object...

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 and a device for generating an incoming parameter object of a test interface application. When an in-parameter class object in a test case for a test interface application is generated, the set in-parameter class model is called for endowing each field with a field value corresponding to each field by the in-parameter class model according to the field type of eachfield in the obtained class file to generate the in-parameter class object. Furthermore, when it is determined that the field type of the field is a user-defined type, the parameter-in-class model instantiates the field into a parameter-in-class object, and all field values contained in the parameter-in-class object are sequentially given to the field. Therefore, due to the setting and calling ofthe parameter class model, only the class file in the test case needs to be compiled without compiling the generation process code of the in-parameter class object, and the problem of conversion errors caused by directly adopting a Json conversion tool for conversion is avoided, so that the in-parameter class object of the test interface application is simply and correctly generated without the participation of professionals.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a method and a device for generating an input parameter object of a test interface application. Background technique [0002] With the development of information technology, the Internet has penetrated into all aspects of daily life. Behind the normal operation of an Internet system, a lot of testing is required to ensure the robustness of the work assurance system. The unit test method is used to test each minimum testable functional unit of the Internet system, which is indispensable in the process of testing the Internet system by developers or testers. It can cover each test case scenario and help it quickly locate Issues with individual testable functional units in the system. Among the many functional unit tests of the Internet system, one is the test for the interface application. Specifically, the test case of the interface application to be tested by the system is...

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 Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3684
Inventor 余欢
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products