7 Levels & Integration Testin
7 Levels & Integration Testin
1
Overview
• To enhance the quality of software testing, and
to produce a more unified testing methodology
applicable across several projects, the testing
process could be abstracted to different levels.
Requirements Acceptance
Customer test
Developer
Architectural System test
s
t e st
Design
Wri
Run
Integration test
te te
Detailed
Design Functional
st s
(BB)
Module Structural
Unit test (WB)
implementation
3
Forms of Integration Testing
• Integration testing can take many different forms. These
include:
“Big-bang” integration
Bottom-up integration
Top-down integration
Sandwich integration
• The units at the leaves of the tree are those that have no
calls to other procedures or functions.
5
Forms of Integration Testing
• A partial functional decomposition of the simple
automated teller machine system can be found below.
• We start with the main system and check the possible function
calls from the system. These are calls to the Terminal I/O,
Manage Sessions and Conduct Transaction functions. The
decomposition goes on with each node till a leaf node is
reached.
• A partial functional decomposition of the SATM
6
Integration Testing Strategy
• The entire system is viewed as a collection of
subsystems (sets of classes) determined during the
system and object design.
A
Layer I
B C D Layer II
E F G Layer III
Integration Testing: Big-Bang Approach
Unit Test
A
Don’t try this!
Unit Test
B
Unit Test
C
System Test
Unit Test
D
Unit Test
E
Unit Test
F
B C D Layer II
Test E E F G
Layer III
Test B, E, F
Test F
Test
Test C
A, B, C, D,
E, F, G
Test D,G
Test G
B C D Layer II
E F G
Layer III
Test
Test A Test A, B, C, D A, B, C, D,
E, F, G
Layer I
Layer I + II
All Layers
B C D Layer II
E F G
Test E Layer III
up
Bottom Test B, E, F
Test F
Layer
Tests Test
A, B, C, D,
Test D,G E, F, G
Test G
Test A,B,C, D
21
A Closer Look at the SATM System
22
A Closer Look at the SATM System
• The decomposition tree is the basis for the usual view
of Integration testing.
25
Pair-Wise Integration Testing
26
27
Neighborhood Integration
Testing
• We define the neighborhood of a node in a graph to
be the set of nodes that are one edge away from
the given node
30
Path Based Integration Testing
34
MM-Path Example
35
Ref: “Software Testing A Craftsman's Approach” 2nd edition, Paul C. Jorgensen
MM-Path Example
1 C Figure 1
1
A 1 B
2
2 3
2
3 4
3 4
5
4 5
6
37
MM-Path Graph
• Given a set of units,
their MM-Path graph is the directed graph in which
nodes are module execution paths and, edges
correspond to messages and returns from one unit
to another
MEP(B,1)
MEP(A,1) MEP(C,1)
Figure 2
MEP(B,2)
MEP(C,2)
MEP(A,3)
40
Alternative Life Cycle Models
• It is sometimes drawn as a V to emphasize how
the basic levels of testing reflect the early
waterfall phases as V-Model.
41
Alternative Life Cycle Models
42
Alternative Life Cycle Models
43
Alternative Life Cycle Models
44
Alternative Life Cycle Models
45
The SATM system
46
The SATM system
47
The SATM system
• The SATM system is described here with a
traditional, structured analysis approach.