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

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, you need to pay a lot of repetitive work, and the designed test cases have a high degree of redundancy, and the relationship is relatively high. complex

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

test Embodiment D

[0042] Below to figure 2 The processing flow of the present invention is described in detail as an example, and it can be understood that this description is for example purposes only, and the embodiments according to the present invention are not limited thereto. figure 2 In this method, first obtain the source code A of the software to be tested, analyze the source code A, and generate the flow chart B based on the interface. The user writes the test case to automatically generate the configuration file, specifying the interface function C to be tested. Generate an interface test case D according to the interface-based flow chart B and the specified interface function C that needs to be tested. The test case automatic generation framework generates the test case execution result F according to the interface test case D and the user input parameter data E.

[0043] The specific steps are as follows. It should be understood that the following execution process is for examp...

test Embodiment 4

[0067] Step S250: Obtain the interface function specified by the user, automatically generate the framework according to the test case generated in step S240, and generate the interface test case based on the interface function specified by the user and the flow chart based on the interface. Design the input parameter data for each interface function, and get the expected output according to the input parameters. Generate test cases based on the user's profile. Execute the test case, judge whether the output of the interface to be tested meets expectations, and obtain the test result.

[0068] Specifically, the corresponding nodes are queried in the interface-based flow chart, and according to the relevant information recorded by the nodes, starting from the function nodes to be tested, using the method of depth-first traversal, according to the linked list pointing to the corresponding interface node in each function According to the data, all possible calling processes of t...

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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products