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

Method and device for automatically separating test data and test code of interface

A technology for automated testing and testing code, applied in the network field, can solve the problems of high industry threshold, frequent human intervention, cumbersome and complex interface testing process, etc., to reduce labor costs, save testing resources, and lower the writing threshold.

Inactive Publication Date: 2022-07-08
GUANGZHOU YIFANG INFORMATION TECH CO LTD
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Aiming at the deficiencies of the existing technology, the present invention proposes a method and device for separating the interface automation test data and test code, which solves the defects in the prior art that the interface test process is cumbersome and complicated, the industry threshold is high, and frequent human intervention is required

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 automatically separating test data and test code of interface
  • Method and device for automatically separating test data and test code of interface
  • Method and device for automatically separating test data and test code of interface

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0054] Please refer to Figure 1 to Figure 3 As shown, an embodiment of the present invention discloses a method for separating interface automation test data and test code, including:

[0055] S11, according to the diversity of request elements and the complexity of parameters, create a test data table request_info and a request record table request_record.

[0056] Due to the diversity of request elements and the complexity of parameters, many factors need to be considered in the design of the test data table request_info, please refer to figure 1 ,including but not limited to:

[0057] Request method: get, post, etc.;

[0058] Request type: application / x-www-form-urlencoded, application / json, multipart / form-data;

[0059] Authentication method: login verification (cookie or session), signature verification, etc.;

[0060] Parameter types: path parameters, request parameters, and request parameters can be further divided into: variable parameters (whether there are rules...

no. 2 example

[0071] Please refer to figure 1 , figure 2 and Figure 4 As shown, the embodiment of the present invention discloses another method for separating interface automation test data and test code, including:

[0072] S21, create a test data table request_info and a request record table request_record according to the diversity of the request elements and the complexity of the parameters.

[0073] S21 is the same as the corresponding steps in the first embodiment, and will not be repeated here.

[0074] As an improved solution but not a limitation, this embodiment S21 further includes creating an account configuration table user_info.

[0075] S22, add assignment data to the corresponding field in the test data table request_info according to the test requirement.

[0076] When testing tasks for different interfaces, business testers can add assignment data to the corresponding fields in the test data table request_info according to the test requirements, so that this embodime...

no. 3 example

[0141] Please refer to Figure 5 As shown, the present invention also provides an interface automation test data and test code separation device 100, including a creation module 110, an execution module 120, a verification module 130 and an output module 140, wherein:

[0142] The creation module 110 is connected with the execution module 120, and is used for creating the test data table request_info and the request record table request_record according to the diversity of the request elements and the complexity of the parameters;

[0143] The execution module 120, connected with the verification module 130, is used for traversing the request_info to filter the data that meets the conditions, executing the test request in turn, using the assignment data to perform parameter assignment before a single test request, and performing assignments corresponding to the number of rounds according to different types of parameters operate;

[0144] The verification module 130, connected...

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 an interface automation test data and test code separation method and device, and the method comprises the steps: building a test data table request and a request record table request according to the diversity of request elements and the complexity of parameters; traversing the request to screen data meeting conditions, sequentially executing test requests, performing parameter assignment by adopting assignment data before a single test request, and performing assignment operation of corresponding rounds according to different types of parameters; after a single test request is completed, checking whether a response test result conforms to expectation or not, and writing the request and the response into a request record table; and outputting a test report. The device uses the method. According to the method, the test data and the test code are separated, the data and the code are decoupled, the test data is set more flexibly, and meanwhile, test resources are saved.

Description

technical field [0001] The present invention relates to the field of network technology, in particular to a method and device for separating interface automation test data and test code. Background technique [0002] In the existing interface automation testing process, the separation of test data and test code cannot be achieved, the test process is cumbersome and complex, and the threshold for writing interface automation is high, which requires high professional level of technical personnel, and requires frequent human intervention. , which increases the company's labor cost and makes the testing resources unable to be fully utilized. SUMMARY OF THE INVENTION [0003] Aiming at the deficiencies of the prior art, the present invention proposes a method and device for separating automatic interface test data and test code, which solves the defects of the prior art that the interface testing process is cumbersome and complicated, the industry threshold is high, and frequen...

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
IPC IPC(8): G06F11/36
CPCG06F11/3684G06F11/3688
Inventor 李雷明白剑黄海亮梁瑛玮张海林鲁和平李长杰陈焕然李乐王浩洪行健冷冬丁一
Owner GUANGZHOU YIFANG INFORMATION TECH CO LTD