A defect location method and device based on function call records
A technology of function call and positioning method, which is applied in the field of defect positioning, can solve problems such as reducing the use value of algorithms, and achieve the effect of convenient defect positioning and high positioning accuracy
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com