Coverage rate dynamic tracking method and device based on function call paths

A function call path, dynamic tracking technology, applied in software testing/debugging and other directions, can solve the problems of incomplete test path and huge path set, and achieve the effect of avoiding explosive growth and improving feasibility

Inactive Publication Date: 2013-12-25
BEIJING INFORMATION SCI & TECH UNIV +1
View PDF0 Cites 41 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] The technical problem to be solved by the present invention is to provide a method and device for dynamic tracking of coverage rate based on function call path, which is used to solve the problem that the path set of the traditional path coverage method is huge and cannot fully test each path

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
  • Coverage rate dynamic tracking method and device based on function call paths
  • Coverage rate dynamic tracking method and device based on function call paths
  • Coverage rate dynamic tracking method and device based on function call paths

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0073] The principles and features of the present invention are described below in conjunction with the accompanying drawings, and the examples given are only used to explain the present invention, and are not intended to limit the scope of the present invention.

[0074] Such as figure 1 As shown, this embodiment provides a method for dynamic tracking of coverage based on function call paths, including:

[0075] Step 1. Perform instrumentation preprocessing on the source code under test to obtain a list of function objects and a list of control keyword objects;

[0076] Step 2, obtain the function call basic path set of the source code;

[0077] Step 3, execute the test case, and run the source code inserted in step 1 to obtain a dynamic path composed of the stub data flow of the execution path of the source code;

[0078] Step 4, according to the information provided by the function object list and the control keyword object list, split the dynamic path obtained in step 3,...

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 relates to a coverage rate dynamic tracking method and device based on function call paths. The method includes: performing pile insertion pretreatment on a to-be-tested source code to obtain a function object list and a control keyword object list; obtaining a basic function call path set of the source code; executing a test case, and operating the source code with pile insertion to obtain a dynamic path formed by pile point data streams of the execution path of the source code; separating the dynamic path to obtain function call path subsets covered by the test case; matching the function call path subsets with the basic function call path set; using all the function call path subsets as a dynamic path set, and optimizing the dynamic path set; calculating the rate of the optimized dynamic path set accounting for the basic function call path set so as to obtain the coverage rate. The method has the advantages that path coverage particle size is expanded from statement to function, and the problem that traditional path coverage is huge, and each path cannot be tested completely.

Description

technical field [0001] The invention relates to the technical field of coverage analysis of software testing, in particular to a method and device for dynamically tracking coverage rate based on a function calling path. Background technique [0002] Below are some nomenclature explanations in this area, and its scope of use is limited to the present invention: [0003] Function call relationship: The function call relationship is based on the function as the basic unit, and is obtained by analyzing the logical relationship between functions in the source program. [0004] Function call basic path set: It is a set of all function call paths obtained by analyzing the source code according to the function call relationship, that is, all function call paths included in the function call relationship graph G, expressed as B(S,C)= {P 1 ,P 2 ,...,P n}, where S is the source code, C is the function call relationship criterion, and P i is the function call path. [0005] Insert...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 牟永敏
Owner BEIJING INFORMATION SCI & TECH UNIV
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