Lecture 11-Software-Testing-Strategies
Lecture 11-Software-Testing-Strategies
Documentation
3
Overview
This chapter describes several approaches to testing software. Software
testing must be planned carefully to avoid wasting development time and
resources.
Testing begins "in the small" and progresses "to the large". Initially
individual components are tested using white box and black box
techniques.
After the individual components have been tested and added to the system,
integration testing takes place.
Once the full software product is completed, system testing is performed.
The Test Specification document should be reviewed like all other software
engineering work products.
A sample Test Specification document should be submitted in this
semester.
4
11.1 Strategic Approach to software Testing
Testing begins at the component level and works toward the integration of
the entire computer-based system.
Different testing techniques are appropriate at different points in time.
The developer of the software conducts testing and may be assisted by
independent test groups for large projects.
The role of the independent tester is to remove the conflict of interest
inherent when the builder is testing his or her own product.
Testing and debugging are different activities.
Debugging must be accommodated in any testing strategy.
Make a distinction between verification (are we building the product right?)
and validation (are we building the right product?)
5
Testing Strategy
system validation
test test
6
11.2 Strategic Issues
7
11.3 Unit Testing
8
Unit Testing
module
to be
tested
results
software
engineer test cases
9
Unit Testing
module
to be
tested
interface
local data structures
boundary conditions
independent paths
error handling paths
test cases
10
Unit Test Environment
driver
interface
local data structures
stub stub
test cases
RESULTS
11
11.4 Integration Testing
Options:
• the “big bang” approach
• an incremental construction strategy
12
Top-down Integration Testing
13
Top Down Integration
A
top module is tested with
stubs
B F G
14
Bottom-up Integration Testing
15
Bottom-Up Integration
A
B F G
cluster
16
Let’s conclude some difference
between Stubs and Driver:
17
Regression Testing(check for defects propagated to other modules by
changes made to existing program
18
Smoke Testing
19
Sandwich Testing
A
Top modules are
tested with stubs
B F G
cluster
20
10.5 Validation Testing
21
Acceptance Testing
22
10.6 System Testing
Debugging
1. Brute force (memory dumps and run-time traces are examined for clues to
error causes)
2. Backtracking (source code is examined by looking backwards from
symptom to potential causes of errors)
3. Cause elimination (uses binary partitioning to reduce the number of
locations potential where errors can exist)
24
Debugging: A Diagnostic Process
25
The Debugging Process
test cases
26
Debugging Effort
time required
to diagnose the
time required symptom and
to correct the error determine the
and conduct cause
regression tests
27
Symptoms & Causes
symptom and cause may be
geographically separated
28
Consequences of Bugs
infectious
damage
catastrophic
extreme
serious
disturbing
annoying
mild
Bug Type
Bug Categories: function-related bugs, system-related bugs, data
coding bugs, design
bugs,bugs, documentation bugs, standards violations,
etc.
29
Debugging Techniques
backtracking
induction
deduction
30
Bug Removal Considerations
31
Debugging vs. testing
The purpose of testing is to identify what
happens when there is a mistake in a program's
source code.
The purpose of debugging is to locate and fix the
mistake.
Thanks for coming !