Method and device for automatic generation of robustness test case of API interface

An API interface and robustness testing technology, which is applied in the field of automatic generation of robustness test cases, can solve problems such as dependence on labor, waste of manpower, and low efficiency, and achieve the effects of improving efficiency, saving labor costs, and speeding up writing speed

Inactive Publication Date: 2013-08-28
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF7 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the shielding of business differences, there are more regularities in the robust testing of generality, wh

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 automatic generation of robustness test case of API interface
  • Method and device for automatic generation of robustness test case of API interface
  • Method and device for automatic generation of robustness test case of API interface

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

[0032] Refer below figure 1 Describe the method for automatically generating a robustness test case for an API interface according to an embodiment of the present invention, comprising the following steps:

[0033] Step S110: Obtain the source code of the API interface to be tested.

[0034] Step S120: Perform static analysis on the source code to obtain a static scanning result, and obtain the function name, parameter name, parameter type and return value of the function in the API interface from the static scanning result.

[0035] S...

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 device for automatic generation of a robustness test case of an API interface. The method for the automatic generation of the robustness test case of the API interface comprises the following steps that the source code of an API interface to be tested is obtained; static analysis is conducted on the source code to obtain a static scanning result, and the function name, the parameter name, the parameter type and a return value of the function in the API interface are obtained from the static scanning result; a basic data set is built, wherein the basic data set comprises a plurality of basic data types and relevant data corresponding to each basic data type; the testing data of the API interface are generated according to the parameter type and the basic data set of the function in the API interface; a test case of the API interface is generated according to the testing data. The method and device for the automatic generation of the robustness test case of the API interface uses a computer to replace manpower, generates test cases automatically, saves manpower cost, and improves efficiency. The invention further discloses a device for the automatic generation of the robustness test case of the API interface.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a method and device for automatically generating robustness test cases for API interfaces. Background technique [0002] Software testing uses testing tools to conduct functional and performance testing of software products according to testing plans and processes. Software testing is the process of running or testing a system by manual or automatic means to verify whether the system meets the specified requirements. [0003] Today's test code is generally written manually by testers. Although there are already unit testing frameworks like gtest and btest, they do not automatically generate real test code. For example, the gtest test framework can write C++ test cases on different platforms, such as Linux, Mac OS X, Windows, Cygwin, Windows CE and Symbian, but only the framework is proposed, and test codes need to be written manually. [0004] To complete the testing ...

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
Inventor 陈菊花杨咏臻丁世远
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) 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