Defects
Defects
Defects have detrimental affects on software users, and software engineers work
very hard to produce high quality software with a low numbers of defects. The
origins of defects are given below:
1. Education: The software engineer did not have the proper educational
background to prepare the software artifacts. They did not understand how to
do something. For example, a software engineer who did not understand the
precedence order of operators in a particular programming language could
inject a defect in an equation that uses the operators for calculation.
2. Communication:- The software engineer was not informed abut something
by a colleague. For example , if engineer 1 and engineer2 working on
interfacing modules, and engineer 1 doesn’t inform engineer2 that no error
checking code will appear in the interfacing module he is developing, engineer 2
might have an incorrect assumption relating to the presence /absence of an error
check and defects will result.
3. Oversight :- The software engineer omitted to do something .For example
a software engineer might omit an initialization statement
4. Transcription:- The software engineer knows what to do, but makes a
mistake in doing it. A simple example is a variable name being misspelled when
entering the code.
5. Process:- The process used by the software engineer misdirected the action.
For example, a development process that did not allow sufficient time for a
detailed specification to be developed and reviewed could lead to specification
defects.
A successful test is a one that reveals the presence of defect.
A successful text will reveal the problem and the doctor can begin the treatment.
Completing the analogy of doctor and ill patient, one could view defective
software as the ill patient.
Testers as doctors need to have knowledge about possible defects (illness) in
order tom develop defect hypotheses. They use the hypotheses to:-
Design Test cases;
Design Test procedures;
Assemble test sets;
Select the testing levels(unit, integration,etc) appropriate for the tests;
Evaluate the result of the tests;
DEFECT CLASSES:-
The beginning of software life cycle is critical for ensuring high quality in the
software being developed.
Defects injects in early phases can persist and be very difficult to remove in later
phases.
Since many requirements are written using natural language representation,
there are very often occurrences of ambiguous, contradictory, unclear,
redundant, and imprecise requirements.
1. Functional Description Defects:-
The overall description of what the product does, and how it should behave
(Input/Output), is incorrect, ambiguous, and /or incomplete.
2. Feature Defects
Features may be described as distinguishing characteristics of a software
component or system. Features refers to functional aspects of software that map
to functional requirement described by the user and the client, it also maps
quality such as performance and reliability. Feature defects are mainly due to
features description that are missing, incorrect, incomplete or superfluous.
3. Feature Interaction Defects:-
These defects are due to incorrect description of how the features should
interact. For ex:- suppose one feature of a software system supports adding a
new customer to a customer database.
This feature interacts with another feature that categorizes the new customer.
Classification feature impacts on where the storage algorithm places the new
customer in the database, and also affects another feature that periodically
support sending advertising information to customers in a specific category.
4. Interface Description Defects:-
These are defects that occur in the description of how the target software is
to interface with external software, hardware and users.
For detecting many functional description defects, black box testing
techniques, which are based on functional specification of the software, offer
the best approach. Black Box testing techniques such as equivalence class
partitioning, boundary value analysis, state transition testing, and cause and
effect graphing are useful for detecting functional type of defects.
BlackBox based tests can be planned at the unit, integration, system and
acceptance levels to detect requirements/specification defects.
DESIGN DEFECTS:-
Design defects occur when system components, interactions between system
components, interaction between the components and outside software
/hardware, or users are incorrectly designed.
When describing these defects we assume that the detailed design description
for the software modules is the pseudo code level with processing steps
1. Algorithmic and Processing Defects:-
These occur when the processing steps in the algorithm as described by the
pseudo code are incorrect.
Eg:- the pseudo code may contain a calculation that is incorrectly specified,
or the processing steps in the algorithm written in pseudo code language may
not be in the correct order.
2. Control, Logic and Sequence Defects:-
Control defect occur when logic flow in the pseudo code is not correct.
Other examples in this subclasses are unreachable pseudo code elements, improper
nesting, improper procedure or function calls.
For example, the design may not properly describe the correct functionality of
a module.
5. External Interface Description Defects:-
These are derived from incorrect design description for interfaces with COTS
components, external software systems, databases and hardware devices(eg:-
I/O devices).
Other example are user interface description defects where there are missing
or improper commands, improper sequence of commands, lack of proper
message, and/or lack of feedback message for the users.
CODING DEFECTS:-
For example, the programmer may omit a filed in a record, an incorrect type
or access is assigned to a file, an array may not be allocated the proper
number of elements.
7. Module Interface Defects:-
As in the case of module design elements, interface defects in the code may
be due to using incorrect or inconsistent parameter types, an incorrect number
of parameters, or improper ordering of the parameters, improper design,
programmer may implement an incorrect sequence of calls or calls to non
existent modules
8. External Hardware, Software Interface Defects:-
These defects arise from problems related to system calls, links to databases,
input/output sequences, memory usage, resource usage, interrupts and
exception handling, data exchange with hardware, protocols formats,
interface with build files, and timing sequences
TESTING DEFECTS:
Test plans, test cases, test harnesses, and test procedures can also contain defects.
Defects in test plans are best detected using review techniques.
1.Test Harness Defect:-
In order to test software, especially at the unit and integration levels, auxiliary
code must be developed.
Test harness code should be carefully designed, implements and tested since it
is a work product and much of this code can be reused when the new release
of the software are developed.
2. Test Case Design and Test Procedure Defects:-
These would encompass incorrect, incomplete, missing, inappropriate test
cases, and test procedures.
Sometimes, Defects are revealed during the testing process itself by means of
a careful analysis of test conditions and test results.