Method and device for generating test cases

A use case and interface testing technology, applied in software testing/debugging and other directions, can solve the problems of complex relationships and high test case redundancy, achieve low redundancy, improve function coverage and branch coverage, and reduce duplication of labor. Effect

Active Publication Date: 2013-08-07
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF3 Cites 29 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the basic library test of this type of system, if you want to cover every interface function in the system and achieve a certain branch coverage rate,

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 test cases
  • Method and device for generating test cases
  • Method and device for generating test cases

Examples

Experimental program
Comparison scheme
Effect test

Example

[0042] Below figure 2 As an example, the processing flow of the present invention will be described in detail. It should be understood that this description is for illustrative purposes only, and the embodiments according to the present invention are not limited thereto. figure 2 In, first obtain the source code A of the software to be tested, analyze the source code A, and generate a flowchart B based on the interface. Users write test cases to automatically generate configuration files and specify the interface function C to be tested. According to the interface-based flowchart B and the specified interface function C to be tested, an interface test case D is generated. The test case automatic generation framework generates test case execution result F according to interface test case D and user input parameter data E.

[0043] The specific steps are as follows. It can be understood that the following execution flow is only for exemplary purposes, and the embodiments accordin...

Example

[0066] Specifically, according to the flowchart of the interface in step S220 and the configuration file of the function call in step S230, the automatic test case generation framework is generated by combining the flowchart and the configuration information of the function. Automatic test case generation framework such as Figure 4 Shown. The test case automatic generation framework receives the specified function to be tested 1, according to the flow of the interface figure 2 And function call configuration file 3 to generate function test cases 4 for various situations.

[0067] Step S250: Obtain the interface function specified by the user, automatically generate a framework according to the test case generated in step S240, generate the interface test case based on the interface function and the flow chart of the interface. Design input parameter data for each interface function, and get the expected output according to the input parameters. Generate test cases based on th...

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 for generating test cases. The method includes the following steps: obtaining source codes of software to be tested; analyzing the source codes to generate a flow chart based on an interface; obtaining configuration files input by users, and the interface test cases are generated according to the flow chart based on the interface and the configuration files. The method for generating test cases can increase coverage rate, process various abnormal tests, and reduce liquid risks of products. The invention further discloses a device for generating test cases.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a test case generation method and device. Background technique [0002] After the development of the software product is completed, in order to ensure that the software system can fulfill the functions expected, the software needs to be tested. Software testing uses testing tools to test the functions and performance of products according to the testing plan and process. Generally, use cases need to be written during the testing process, and various use scenarios and situations of the software are tested through use cases to ensure the correct and safe operation of the system. Test cases can be manually written, and now there are some automated use case generation software, which can help reduce manual labor and improve work efficiency. [0003] However, for a system with a complex structure, there are many interface functions, and there are many dependencies between i...

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