Method, device and system for interface testing

A technology for interface testing and test configuration, applied in software testing/debugging, error detection/correction, instruments, etc., can solve the problems of debugging cost and time and energy spent on testing data or modification of interface specifications, so as to improve testing efficiency and improve Quality, cost reduction effects

Pending Publication Date: 2020-04-10
SUNING CLOUD COMPUTING CO LTD
View PDF1 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the test data is not adjusted or modified accordingly, resulting in a lot of debugging costs and time and energy spent on the modification of the test data or interface specifications during 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, device and system for interface testing
  • Method, device and system for interface testing
  • Method, device and system for interface testing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0064] In order to achieve the above purpose, specifically, taking the test terminal built by the Python+unitest open source framework as an example, the above solution can be realized through the following steps:

[0065] Step 1. Read the test configuration file corresponding to the interface to be tested, and obtain the target parameter, the parameter value of the target parameter, and the interface file;

[0066] Among them, there are two ways to obtain the parameter value of the target parameter in the present application, namely obtaining a fixed value and obtaining by reading a data file. The way to obtain the parameter value is specified in the test configuration file. When reading the test configuration file corresponding to the interface to be tested, you can get the target parameter and the way to get the parameter value, and then get the parameter value according to the way:

[0067] The method of fixed value means that for some parameters, the value remains basical...

Embodiment 2

[0100] Corresponding to the above examples, such as Figure 5 As shown, the present application provides a method for interface testing, the method comprising:

[0101] 510. Read the test configuration file corresponding to the interface to be tested, and obtain the target parameter and the parameter value of the target parameter;

[0102] Preferably, the target parameters include fixed value parameters and parameters obtained by reading parameter value files.

[0103] Wherein, obtaining the parameter value of the target parameter includes at least:

[0104] 520. Obtain a parameter value file corresponding to the target parameter according to the test configuration file and obtain a parameter value of the target parameter from the parameter value file, where the parameter value file is used to save the parameter value of the target parameter;

[0105] Preferably, the method further includes reading the interface file to obtain the parameter attribute of the target parameter....

Embodiment 3

[0115] Embodiment 3. Corresponding to the above embodiment 2, the present application provides a method for interface testing, and the method includes:

[0116] Step 1, the test terminal reads the test configuration file corresponding to the interface to be tested, and obtains the target parameter and the parameter value of the target parameter;

[0117] Wherein, obtaining the parameter value of the target parameter includes at least:

[0118] Step 2, the test terminal obtains the parameter value file corresponding to the target parameter according to the test configuration file and obtains the parameter value of the target parameter from the parameter value file, and the parameter value file is used to save the target the parameter value of the parameter;

[0119] Step 3, the test terminal generates an interface test case according to the target parameter and the parameter value of the target parameter;

[0120] Step 4, the test terminal generates an interface call request ...

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 provides a method, a device and a system for interface testing. The method comprises the steps of: reading a test configuration file corresponding to a to-be-tested interface, and acquiring a target parameter and a parameter value of the target parameter, wherein the step of acquiring the parameter value of the target parameter at least comprises the sub-steps of acquiring a parameter value file corresponding to the target parameter according to the test configuration file and acquiring the parameter value of the target parameter from the parameter value file, and the parameter value file is used for storing the parameter value of the target parameter; generating an interface test case according to the target parameter and the parameter value of the target parameter; and sending an interface call request generated according to the interface test case to a tested terminal, and acquiring a test result generated and returned by the tested terminal according to the request call interface. Thus, the test configuration file corresponding to the interface is read; the test case corresponding to the interface is automatically generated according to the target parameter and the parameter value of the target parameter; the cost of writing the test case is reduced; and the test efficiency is improved.

Description

technical field [0001] The invention relates to the field of interface testing, in particular to a method, device and system for interface testing. Background technique [0002] At present, with the development of the Internet, a project will open a large number of interfaces for users to call in order to achieve expected functions. In order to ensure that these interfaces can be called normally, these interfaces need to be tested before going live. However, since there are many types of interface protocols, each interface may have a completely different implementation method, and the number of parameters of each interface will vary depending on the complexity of the business, ranging from a few to nearly a hundred . These problems have brought great challenges to testing the correctness of these interfaces and ensuring the coverage of the testing interfaces. [0003] At the same time, in the actual development process of the project, due to changes in the project, it 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/3684G06F11/3688G06F11/3692
Inventor 尚新勇
Owner SUNING CLOUD COMPUTING 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