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

Defect positioning method and device based on function calling records

A technology of function calling and positioning method, applied in the field of defect positioning, can solve problems such as reducing the use value of the algorithm, and achieve the effect of convenient defect positioning and high positioning accuracy

Inactive Publication Date: 2015-07-22
BEIJING INSTITUTE OF TECHNOLOGYGY
View PDF3 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, excessive granularity may force users to read a large number of irrelevant defect codes, reducing the use value of such algorithms

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
  • Defect positioning method and device based on function calling records
  • Defect positioning method and device based on function calling records
  • Defect positioning method and device based on function calling records

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] Such as figure 1 As shown, the defect location method based on function call records includes the following steps:

[0044] Step 1. Execute test cases for the program under test, and generate function call records;

[0045] The function call records can be stored in the form of files, databases, memory or any other identifiable forms. In this embodiment, the records are stored in the usual file form during testing.

[0046] The function call record includes information about the function call of the program under test, such as function signature, incoming parameters, return value, success or failure of test case execution, and the like.

[0047] The one function call record corresponds to one test case execution.

[0048] For example, through figure 2 The procedure shown generates a function call log:

[0049] This example uses AOP technology to generate function call records without modifying the original code through pre-compilation and runtime dynamic proxy with...

test Embodiment t

[0102] For a test case t i , which will execute several functions during the running process, these functions constitute the test case t i The coverage information list Coverage(t i ):

[0103] Coverage(t i )={f i1 , f i2 ,..., f im}

[0104] where f ij (1≤i≤n, 1≤j≤m, i, j are natural numbers, n is the total number of test cases, m is the number of all functions executed by the i-th test case during operation) is the i-th The jth function among the functions executed by the test case during execution.

[0105] for a function f i , the passed test cases and failed test cases that have run the function respectively form a set T p (f i ) and T f (f i ):

[0106] T p (f i )={t|t∈T p ∧ f i ∈Coverage(t)}

[0107] T f (f i )={t|t∈T f ∧f i ∈Coverage(t)}

[0108] Then for each function f i , the number of pass(s) test cases that executed this function, and the number of failed test cases that executed this function fail(s) are:

[0109] pass(s)=|T p (f i )| ...

Embodiment 2

[0224] Such as Figure 4 Shown is a schematic structural diagram of a defect location device based on function call records proposed by the present invention, including a function call record generation module, a function call record reading module, a function call record analysis module, a defect suspicion degree calculation module, and a ranking output module; The function call record analysis module includes a basic suspect value analysis module, a call times difference analysis module, a data transfer difference analysis module and a call relationship difference analysis module;

[0225] The function call record generation module is used to generate a function call record file when the program under test is tested using a test case;

[0226] The function call record reading module is used to read and arrange the function call record from the function call record file, and obtain the relevant information of each function of the program under test when each test case is exec...

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 defect positioning method and device based on function calling records, and belongs to the technical field of software testing. According to the defect positioning method based on function calling records, through the aspect oriented programming (AOP) technology, the function calling records of a tested program are obtained for each test case and summarized and analyzed with the function as the unit, test case covering information, call frequency difference information, data transmission difference information and calling relationship difference information when the functions are executed in a successful or failed test case are obtained, the defect suspension value of each function is worked out through the information, and finally the defect positioning result can be obtained by sequencing the defect suspension values of all the functions. Compared with the prior art, on the premise of not changing the existing test process, defect positioning is carried out conveniently, and a higher positioning accuracy is realized.

Description

technical field [0001] The invention relates to a defect location method, in particular to a method and device for defect location using function call records generated during software testing or execution, and belongs to the technical field of software testing. Background technique [0002] Defects are often unavoidable in software systems. In order to improve the security and reliability of software, the software development team must invest enough resources to find and repair the defects in the software. However, the traditional method of finding defects (such as manual debugging) has the disadvantages of long time consumption, low reliability, and high requirements for reproduction conditions. In order to reduce the cost invested in this process, researchers have been working on developing automated or semi-automated software defect location A number of statistical fault localization (Statistical Fault Localization, SFL) methods have been proposed. This type of method c...

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 INSTITUTE OF TECHNOLOGYGY
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