Unit III
Unit III
The education and training of engineers in each engineering discipline is based on the teaching of related
scientific principles, engineering processes, standards, methods, tools, measurement and best practices as
shown in Figure
This text is based on the philosophy that software development should be viewed and taught as an
engineering discipline and that quality in both the process and the product are of prime importance to
professionals in this field.
Using an engineering approach to software development implies that:
Errors
An error is a mistake, misconception, or misunderstanding on the part of a software
developer.
In the category of developer we include software engineers, programmers,
analysts, and testers.
For example, a developer may misunderstand a design notation, or a programmer
might type a variable name incorrectly.
Faults (Defects)
A fault (defect) is introduced into the software as the result of an error.
It is an anomaly in the software that may cause it to behave incorrectly, and not
according
to its specification. Faults or defects are also called “bugs.”
Failures
A failure is the inability of a software system or component to perform its required
functions within specified performance requirements.
During execution of a software component or system, a tester, developer, or user
observes that it does not produce the expected results.
In some cases a particular type of misbehavior indicates a certain type of fault is
present.
An experienced developer/tester will have a knowledge base of
fault/symptoms/failure cases
stored in memory.
During development failures are usually observed by testers, and faults are located
and repaired by developers.
The input to the software must cause the faulty statement to be executed.
2. The faulty statement must produce a different result than the correct statement.
This event produces an incorrect internal state for the software.
3. The incorrect internal state must propagate to the output, so that the result of
the fault is observable.
Software that easily reveals its’ faults as failures is said to be more testable
Test Cases
A test case in a practical sense is a test-related item which contains the following
information:
1. A set of test inputs: These are data items received from an external source by
the code under test.
The external source can be hardware, software, or human.
2. Execution conditions: These are conditions required for running the test, for
example, a certain state of a database, or a configuration of a hardware device.
3. Expected outputs: These are the specified results to be produced by the code
under test
Test
A test is a group of related test cases, or a group of related test cases and test
procedures (steps needed to carry out a test,)
A group of related tests is sometimes referred to as a test set. A group of related
tests that are associated with a database, and are usually run together, is
sometimes referred to as a Test Suite.
A test oracle is a document, or piece of software that allows testers to determine
whether a test has been passed or failed.
Test Bed
A test bed is an environment that contains all the hardware and software needed to
test a software component or a software system.
Software Quality
1.Quality relates to the degree to which a system, system component, or process
meets specified requirements.
2. Quality relates to the degree to which a system, system component, or process
meets customer or user needs, or expectations.
In order to determine whether a system, system component, or process is of high
quality we use what are called quality attributes. These are characteristics that
reflect quality
Metric:
A metric is a quantitative measure of the degree to which a system, system
component, or process possesses a given attribute . There are product and
process metrics.
A very commonly used example of a software product metric is software size,
usually measured in lines of code (LOC).
Two examples of commonly used process metrics are costs and time required for
a given task
Quality Metric
A quality metric is a quantitative measurement of the degree to which an item possesses
a given quality attribute.
Testers must work with analysts, designers and, developers throughout the
software life system to ensure that testability issues are addressed .
Software Quality Assurance Group
The software quality assurance (SQA) group is a team of people with the necessary
training and skills to ensure that all necessary actions are taken during the
development process so that the resulting software conforms to established
technical requirements.
The software quality assurance (SQA) group in an organization has ties to quality
issues.
They work with project managers and testers to develop quality-related policies
and quality assurance plans for each project. The group is also involved in
measurement collection and analysis, record keeping, and reporting.
Reviews
Defects
1. A fault (defect) is introduced into the software as the result of an error.
2. It is an anomaly in the software that may cause it to behave incorrectly, and
not according
3. to its specification.
4. Faults or defects are also called “bugs.”
5. Defects have detrimental effects on software users, and software engineers
work very hard to produce high-quality software with a low number of defects.
6. But even under the best of development circumstances errors are made,
resulting in defects being injected in the software during the phases of the
software life cycle.
Education:
The software engineer did not have the proper educational background to prepare
the software design. She 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 a calculation.
Communication: The software engineer was not informed about something by a
colleague.
Oversight: The software engineer omitted to do something
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.
Process: The process used by the software engineer misdirected her actions.
When defects are present due to one or more of these circumstances, the software
may fail, and the impact on the user ranges from a minor to major problem.
Testers as doctors need to have knowledge about possible defects (illnesses) in
order to develop defect
hypotheses. They use the hypotheses to:
a. design test cases;
b. design test procedures;
c. assemble test sets;
d . select the testing levels (unit, integration, etc.) appropriate for the tests;
e.evaluate the results of the tests.
A successful testing experiment will prove the hypothesis is true—that is,
the hypothesized defect was present. Then the software can be repaired (treated).
A very useful concept related to defects, testing, and diagnosis is that of a fault
model.
Although software engineers are not concerned with physical defects, and the
relationships between software failures, software defects, fault model concept and
fault lists accumulated in memory from years of experience to design tests and for
diagnosis tasks during fault localization (debugging) activities.
Typographical Defects
These are principally syntax errors, for example, incorrect spelling of a variable name, that are usually
detected by a compiler.
I n i t i a l i z a t i o n Defects
These occur when initialization statements are omitted or are incorrect.
External Hardware, Software Interfaces 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 exchanges with hardware,
protocols, formats.
TestingDefects
Test plans, test cases, test harnesses, and test procedures can also contain defects. Defects in test
plans are best detected using review techniques.