Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for detecting and locating exception throwing processing defects

A technology for locating exceptions and exceptions, applied in the field of testing, can solve problems such as difficulty in verifying the correctness of exception handling modules, and difficulty in correctness of exception handling codes

Active Publication Date: 2021-04-30
NANJING UNIV
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, it is very difficult to verify the correctness of exception handling modules in Android applications, especially when it comes to exception handling codes related to operations related to external resources, it is even more difficult to measure the correctness of exception handling codes

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
  • A method and device for detecting and locating exception throwing processing defects

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The present invention will be described in further detail in combination below.

[0039] A method for detecting and locating exception throwing processing defects of the present invention includes the following steps: an insertion processing step, an exception type extraction step, a suspicious exception trigger test step and a context combination exception trigger test step. The aforementioned step S1 of obtaining the program to be tested and the test script indicates that the input of the present invention is the program to be tested and the test script. The instrumentation processing step, the exception type extraction step, the suspicious exception trigger test step and the context combination exception trigger test step correspond to the aforementioned steps S2, S3, S4 and S5 respectively.

[0040] The test script is used to test the program to be tested. The program under test can be executed by the machine under the control of the test script. Those skilled in ...

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 discloses a method and a device for detecting and locating exception throwing processing defects. In this method, the program to be tested is firstly instrumented, and the control code is inserted before the method that may throw an exception, so that after the program to be tested is executed, the information of the instrumented method and the call information are output through the control code, and the matching of the configuration information triggered by the exception is determined. Whether to throw an exception and what kind of exception is thrown. Then, according to the list of instrumented methods, a collection of exception types that may be triggered is obtained. Then, according to the exception type set, a suspicious exception trigger test is performed on each exception type to obtain a suspicious method exception information set. Finally, the exception throwing defect location information is obtained by performing the context combination exception trigger test on each suspicious method exception information in the suspicious method exception information set. The present invention greatly reduces the scope of abnormal throwing and processing defect positioning through the filtering of suspicious abnormality triggering tests, thereby greatly improving the positioning efficiency.

Description

technical field [0001] The invention relates to testing technology, in particular to testing of exception throwing processing defects. Background technique [0002] Exception handling (Exception Handling) is a mechanism in high-level programming languages ​​to deal with abnormal conditions that occur in software or information systems. Exception handling is usually a measure taken to prevent unknown errors. It provides an effective method for dealing with certain types of errors, which can improve programming efficiency and program robustness. In Android applications, there are two ways to handle exceptions. One is to use the throws keyword in the method signature to throw exceptions, and the other is to use try and catch modules to handle exceptions that occur in the program. However, it is very difficult to verify the correctness of the exception handling module of an Android application, especially when it involves exception handling code related to external resource ope...

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 Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3668
Inventor 潘敏学张天陆璐谢琳娜
Owner NANJING UNIV