Chapter 4 Defect Management
u What is a defect?
u Defect Find Technology
u code review
u Defect prediction
4.1 What is a defect?
Defects refer to errors existing in the program, such as syntax errors, punctuation errors, or an incorrect program statement, is something that meets user requirements, which can represent, description and statistics. Objective things.
Some people call defects as bugs, which is incorrect. When becoming bug, it is desirable that those annoying small bugs should take them or ignore them. This will make some important problems as trivial small things, which will develop a wrong attitude. Defects are not like a BUG, more like a timed bomb. Everyone may feel some exaggerated words, most of the fine defects do not cause serious consequences. However, unfortunately, a small part of it seems that the defects can cause serious problems. Although it is still not a serious problem for you now, it will soon become an important issue.
The complexity of design errors and the impact of the defects caused by the defects, and some minor coding errors may cause serious system problems. In fact, most software defects come from programmers' negligence.
In order to reduce defects, defect management must be conducted, and the introduced defects have been introduced, and the causes of these defects have been made, and they learn how to avoid repeating the same mistake in the future.
Defect classification. When analyzing defects, it is helpful to classify defects. Through the defect classification, it can quickly find which defective problem, then concentrate on preventing and excluding this type of defect, which is the key to defect management. Concentrately concentrate on several types of defects that are most likely to cause problems, once these defects are controlled, several defects that are further found in further findings. Table 4.1 is ChillaRege and his IBM Research Institute's work results.
Don't eager to subdivibize each type of 10 types, until you have collected a large number of defective data. At that time, it was most useful to see where it needs more detailed and supplement.
Table 4.1 Defect Classification
Type number
type name
description
10
Documentation
Note, information
20
grammar
Spelling, punctuation, typing, instruction format
30
Wedding package
Change management, library, version control
40
Value
Description, reintegration, scope, limit
50
interface
Procedure call and reference, input and output, user format
60
an examination
Error information, inappropriate check
70
data
Structure, content
80
function
Logic, pointer, loop, recursive, calculation, function defect
90
system
Configuration, time, memory
100
surroundings
Design, compile, test, other support system issues
Remarks:
The number of statistical defects. Use the defect record log to record the defects that remain in the product when you complete the initial design or encoding. It is easy to score defects, but to manage defects, accurate data on defects must be collected. If you forgive the defect, it will only be deceived. If you do this, don't expect to increase.
Table 4.2 Defect Record Log
date
serial number
Types of
Introduction phase
Exclusion phase
Change time
Repair defect
description:
4.2 Defect Find Technology
Why do you have to discover defects as soon as possible? Don't expect a simple patchwork full-defective procedure, and it can be a qualified product. Once a defective program is produced, it will always be defective. Although you can fix all known issues and let it pass all tests, it is still a lot of defective programs. If the engineer can take a defective work, he will produce low quality products. "We are busy, in the future", this attitude is impossible to produce quality products. Discover and repair the cost of defects. In a typical project, the product is divided into a lot of small modules, which is not responsible for the universal engineers. After the module design, implementation, compile, engineers make initial unit testing; After the unit test, multiple modules constitute some large components for integration testing; after various levels of component testing, these components are integrated into product design; final To integrate product into the system for system testing. With the size and complexity of the system, unit testing, integrated testing, component testing, product testing, system testing type, duration, complexity have different, but almost all sizes of software products require this process.
Research proves that the development process is further further, and the average cost of discovering and repairing defects has increased by 10 times. Although the repair time of defects has changed large, the average time always follows this law, and is independent of the type of defect.
Methods of discovering and repairing defects. Although there is no way to introduce defects, it is still possible to find and repair defects as soon as possible during the development process. There are several ways to discover defects in procedures, which basically includes the following steps: indicating defect signs; inference of defects from signs; determining errors in the program; decide how to repair defects; solved this problem.
There are a variety of tools and auxiliary means to help complete these steps. The most common tools of engineers are compilers, which can represent most of the grammar defects. However, the most basic task of the compiler is to generate the target code and may generate a code in the case where the source program is defective. Therefore, all spelling, punctuation, or other defects that do not conform to grammar cannot be checked. Generally, the compiler provides only a signs of defects, you must position your own position and determine what is the problem, usually can be able to do this, but occasionally take longer
Another common method is the test above. The quality of the test is determined by the test case to overwrite all program functions. Test can be used to verify almost all functions, but have their own shortcomings: You can only meet the first steps of defects as compilers, you still have to find out the root of the problem from defects, and then fix it; The expansion of the scale of the project will cost a lot of time and is almost impossible to perform a complete test.
The most effective way to discover and repair defects is a list of personal review sources. This approach is negatively difficult to completely clear the defects in the program, but it turns out that this is the fastest and most effective way.