Test method and system based on software defect mode
A software defect and defect mode technology, applied in software testing/debugging, etc., can solve problems such as software failures, security vulnerabilities, insufficient test accuracy, and false negatives, and achieve short test time, high degree of automation, and reduced errors. reported effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0126] Example 1: During the traversal of the control flow graph, each state of the defect state machine instance is associated with a precondition, which consists of a series of variables and their value ranges. If the value range of a variable in the precondition of a certain state is empty, it means that the state is an impossible state, that is, an unreachable path has been found. Some testing tools in the past may report defects on unreachable paths However, the DTS system of the present invention can identify the defect on the unreachable path, and will not report it as a defect, thus reducing false positives. As in this example, refer to Figure 5 , a piece of program code under test and the state changes of the corresponding control flow graph node defect state machine are as follows, where n1~n8 are eight nodes:
[0127] int logLevel;
[0128] …
[0129] PrintWriter log = null;
[0130] if(logLevel>0) log = new PrintWriter(...);
[0131] if(logLevel>3)log.printl...
example 2
[0141] Example 2: As shown in this example, each use case will generate a null pointer reference fault, if the corresponding part of the source code is replaced with the comment code, the null pointer fault will not be generated. In the entry, v represents the case where x is a local variable, and f represents the case after changing x to a member variable. One v means that the fault is reported correctly, two v means that the fault is reported before and after the code replacement, and one of them is a false positive; the f is similar, one f means that the fault is correctly reported, and two fs represent that the code is reported before and after the replacement Faults, one of which is a false positive; blank means no fault was reported. The use case is as follows:
[0142] int intra(int level){int intra4(boolean b){int interl(boolean b){
[0143] Object x=null; Object x=null; Object x=null;
[0144] if(level>0) Object y=null; if(b / *!b* / )
[0145] x...
example 3
[0175] Example 3: In this example, the results of defect testing of Tomcat4.1.24 using different testing tools are shown in Table 2:
[0176]
[0177] Table 2
[0178] As can be seen from Table 2, it is obvious that when using the DTS system test, compared with other existing test tools, the DTS system using the method of the present invention has a high accuracy rate and defect detection rate, and a lower error rate. rate.
[0179]The DTS system that has used the method of the present invention, its advantage also lies in:
[0180] The test time is short. For the same program to be tested, since the test speed of the program static analysis mode itself is faster than that of the program dynamic analysis, that is, the test time is relatively short. Can test multiple types of software defect patterns at the same time, and the test of multiple types of software defect patterns can share a lot of information, such as variable values, which shortens the test time; the DTS sy...
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