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

API automated testing method and system based on data driving

An automated testing and data-driven technology, which is applied in electrical digital data processing, software testing/debugging, error detection/correction, etc., can solve the problem that test cases cannot cover function points, developers have a large development workload, and cannot meet system security requirements and other issues to achieve the effect of shortening the test cycle, calling stable and robust, and configuring flexibly and conveniently

Active Publication Date: 2018-11-27
TAIHUA WISDOM IND GRP CO LTD
View PDF8 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. Most testers do not have a development foundation. When testing function-based API interfaces, they do not know how to test, or test cases cannot cover function points
Time-consuming and labor-intensive testing, the test cycle is too long
[0005] 2. The function-based front-end test (or UI automation test) cannot meet the security requirements of the system. From a technical point of view, it is possible to skip the front-end verification and go to the background to simulate the request data by capturing packets and other means.
[0006] 3. Developers have a heavy development workload and write interface programs, so they cannot perform functional verification in detail

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
  • API automated testing method and system based on data driving
  • API automated testing method and system based on data driving
  • API automated testing method and system based on data driving

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] Such as Figure 1-2 as shown, figure 1 is a flow chart of a data-driven API automated testing method provided by an embodiment of the present invention, figure 2 It is a flow chart for generating test case data provided by the embodiment of the present invention. Such as Figure 1-2 As shown, the embodiment of the present invention provides a data-driven API automated testing method, including:

[0031] S1: Execute the main entrance of the API test;

[0032] S2: Configure parameters for the API and fill in basic information;

[0033] S3: Generate test case data according to the test case constraint rules of the API;

[0034] S4: execute test case data;

[0035] S5: Generate a test report according to the template file;

[0036] S6: the process ends;

[0037] Among them, generating test case data according to the test case constraint rules of the API includes:

[0038] S3.1: Read the basic information in the configuration file;

[0039] S3.2: Initialization; ...

Embodiment 2

[0097] See figure 1 , figure 2 , image 3 , image 3 It is a flow chart of executing test case data provided by the embodiment of the present invention. The embodiment of the present invention provides a data-driven API automated testing method, including:

[0098] S1: Execute the main entrance of the API test;

[0099] S2: Configure parameters for the API and fill in the basic information; specifically, configure the parameters for the API and fill in the basic information, including: parameter configuration according to the human-computer interaction interface, or parameter configuration based on the configuration file; or according to the API's demand interface File parsing is performed after the document template is filled.

[0100] S3: Generate test case data according to the test case constraint rules of the API;

[0101] S4: execute test case data;

[0102] S5: Generate a test report according to the template file; where, before generating the test report accord...

Embodiment 3

[0142] See Figure 4 , Figure 4 It is a frame diagram of a data-driven API automated testing system provided by an embodiment of the present invention. Such as Figure 4 As shown, the present invention also provides a data-driven API automated testing system, including: entry module 1, configuration module 2, test case generation module 3, API test engine module 4, report generation module 5,

[0143] The entry module 1 is used to execute the API test main entry;

[0144] The configuration module 2 is used to configure parameters for the API and fill in basic information;

[0145] The test case generation module 3 is used to generate test case data according to the test case constraint rules of the API;

[0146] The API test engine module 4 is used to execute the test case data;

[0147] Described report generation module 5 is used for generating test report according to template file;

[0148] end of process;

[0149] Wherein, the test case generation module 3 generat...

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 an API automated testing method and system based on data driving. The method comprises the steps that an API is executed to test a main entrance; parameter configuration and basic information filling-in are carried out on the API; according to test case constraint rules of the API, test case data is generated; the test case data is executed; and according to a template file, a test report is generated. The provided API automated testing method has the advantages that the reusability is very strong, the time of personnel writing test cases manually can be greatly shortened, the time cost is saved, the test cycle is shortened, the use is simple, the configuration is flexible and convenient, the manual operation is reduced, the efficiency is improved, the workload of developers is reduced, the deflect problem is found in the shortest time, so that a developed interface module is more stable and robust when called.

Description

technical field [0001] The present invention relates to the field of software testing, in particular to a data-driven API automated testing method and system. Background technique [0002] In the process of software development, after the API interface of the program is developed, it is usually manually debugged or tested by the developer himself with tools. The content of the test is only to verify whether the forward function and reverse return value of the interface are correct, and far It is far from guaranteed whether there are problems with the interface developed by oneself. Nowadays, in the software system development of large-scale projects, the logic complexity of the background is much higher. How to ensure the correct data exchange and transmission between system modules and the logical dependencies between systems have become a very important task. link. [0003] In most of the scenarios in the traditional testing field that focus on functional testing, there ...

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 TAIHUA WISDOM IND GRP CO LTD
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