Chapter 7 - Software Testing and Maintenance
Chapter 7 - Software Testing and Maintenance
Maintenance
A test component is a part of the system that can be isolated for testing. A
A fault, also called bug or defect, is a design or coding mistake that may cause
during the execution of the system. An erroneous state is caused by one or more
failure is triggered by one or more erroneous states. Not all erroneous states
trigger a failure.
A test case is a set of inputs and expected results that exercises a test
component with the purpose of causing failures and detecting faults.
Overview. The author of the component briefly presents the purpose and scope of the
component and the goals of the inspection.
Preparation. The reviewers become familiar with the implementation of the component.
Inspection meeting. A reader paraphrases the source code of the component, and the
inspection team raises issues with the component. A moderator keeps the meeting on track.
Follow-up. The moderator checks the quality of the rework and may determine the
component that needs to be re-inspected.
Usability Testing
Usability testing tests the user’s understanding of the system.
Instead, it focuses on finding differences between the system and the users’
expectation of what it should do.
Scenario test. During this test, one or more users are presented with a visionary
scenario of the system.
Prototype test. During this type of test, the end users are presented with a piece of
software that implements key aspects of the system.
Product test. This test is similar to the prototype test except that a functional
version of the system is used in place of the prototype.
In all three types of tests, the basic elements of usability
testing include:
subsystems.
First:-
Unit testing reduces the complexity of overall test activities, allowing us to focus on
Second:-
Unit testing makes it easier to pinpoint and correct faults, given that few components are
Third:-
Unit testing allows parallelism in the testing activities; that is, each component can be
Below, we describe the most important ones: equivalence testing, boundary testing, path testing,
and state-based testing.
Equivalence testing:- This blackbox testing technique minimizes the number of test cases. The
possible inputs are partitioned into equivalence classes, and a test case is selected for each class.
Equivalence testing consists of two steps: identification of the equivalence classes and selection
of the test inputs.
This special case of equivalence testing focuses on the conditions at the boundary of the
equivalence classes.
Rather than selecting any element in the equivalence class, boundary testing requires
that the elements be selected from the “edges” of the equivalence class.
Path testing
This whitebox testing technique identifies faults in the implementation of the
component.
The assumption behind path testing is that, by exercising all possible paths through the
code at least once, most faults will trigger failures.
The identification of paths requires knowledge of the source code and data structures.
Polymorphism testing
Polymorphism introduces a new challenge in testing because it enables
messages to be bound to different methods based on the class of the target.
Although this enables developers to reuse code across a larger number of
classes, it also introduces more cases to test.
Integration testing
It detects faults that have not been detected during unit testing by
focusing on small groups of components.
Two or more components are integrated and tested, and when no new
faults are revealed, additional components are added to the group.
If two components are tested together, it is call this a double test.
Horizontal integration testing strategies
Bing bang testing
Sandwich testing
Vertical integration testing strategies
Bottom- up testing
Top-down testing
System Testing
Functional testing. Test of functional requirements (from RAD)
Planning Testing
Developers can reduce the cost of testing and the elapsed time necessary for its
completion through careful planning.
Two key elements are to start the selection of test cases early and to parallelize tests.
Documenting Testing
Testing activities are documented in four types of documents, the Test Plan, the
Test Case Specifications, the Test Incident Reports, and the Test Summary.
The Test Plan focuses on the managerial aspects of testing. It documents the
scope, approach, resources, and schedule of testing activities.
Each test is documented by a Test Case Specification. This document
contains the inputs, drivers, stubs, and expected outputs of the tests, as
well as the tasks to be performed.
The Test Report Summary document lists all the failures discovered
during the tests that need to be investigated. From the Test Report
Summary, the developers analyse and prioritize each failure and plan
for changes in the system and in the models. These changes in turn
can trigger new test cases and new test executions.
Assigning Responsibilities
Testing requires developers to find faults in components
of the system.
This is best done when the testing is performed by a
developer who was not involved in the development of
the component under test, one who is less reticent to
break the component being tested and who is more
likely to find ambiguities in the component
specification.
Definition of Maintenance
16
Software Maintenance
Objectives
17
Software Maintenance
Objectives
Corrective,
Adaptive,
Perfective,
Inspection.
18
Types of Maintenance
Corrective:
19
Types of Maintenance
Adaptive:
20
Types of Maintenance
Perfective:
21
Types of Maintenance
Inspection:
22