Professional Documents
Culture Documents
Chapter 13
Integration Testing
INT–2
Functional Decomposition
Functional Decomposition
Create a functional hierarchy for the software
Problem is broken up into independent task units, or
functions
Units can be run either
Sequentially and in a synchronous call-reply manner
INT–3
Example functional decomposition
Functional Decomposition of the SATM System
A 10 B C
D E 11 12 13 14 15 16 17 F 22
2 3 4 5 6 7 8 9 18 19 20 21 23 24 25 26 27
Table 1: SATM Units and Abbreviated Names Unit Level Unit Nam
Unit Level Unit Name B! 1.3! Terminal Sense & Control
1! 1! SATM System 14! 1.3.1! Screen Driver
A! 1.1! Device Sense & Control 15! 1.3.2! Key Sensor
D! 1.1.1! Door Sense & Control C! 1.4! Manage Session
2! 1.1.1.1 ! Get Door Status 16! 1.4.1 ! Validate Card
3! 1.1.1.2 ! Control Door 17! 1.4.2! Validate PIN
4! 1.1.1.3 ! Dispense Cash 18! 1.4.2.1 ! GetPIN INT–4
E! 1.1.2! Slot Sense & Control F! 1.4.3 ! Close Session
5! 1.1.2.1 ! WatchCardSlot 19! 1.4.3.1 ! New Transaction Request
6! 1.1.2.2 ! Get Deposit Slot Status
Decomposition-based integration
Four strategies
Top-down
Bottom-up
Sandwich
Big bang
INT–5
Top-Down Integration
INT–6
Top-Down Integration
INT–7
Top-Down integration example
Top-Down Integration
Top Subtree
(Sessions 1-4)
INT–8
Top-Down integration issues
INT–9
Bottom-Up integration
INT–10
Bottom-up integration example
Top Subtree
(Sessions 29-32)
INT–11
Bottom-Up Integration Issues
INT–12
Sandwich Integration
INT–13
Sandwich integration example
INT–14
Integration test metrics
INT–15
Call Graph-Based Integration
INT–16
SATM call graph example
Call Graph of the SATM System
5
1 Look a adjacency
7
matrix p204
20
21 22
9 16
4
10
13
12
11 17 18 19 23
24
26
27 25
6 8 2 3
14 15
INT–17
Call graph integration strategies
INT–18
Pair-Wise Integration
INT–19
Some
Pair-wise Pair-wisesession
integration Integration Sessions
example
5
1
7
20
21 22
9 16
4
10
12 13
11 17 18 19 23
24
26
27 25
6 8 2 3
14 15
INT–20
Neighbourhood integration
INT–21
Neighbourhood integration example
Two Neighborhood Integration Sessions
5
1
Neighbourhoods
7 for nodes 16 & 26
20
21 22
9 16
4
10
13
12
11 17 18 19 23
24
26
27 25
6 8 2 3
14 15
INT–22
Pros and Cons of Call-Graph Integration
INT–23
Pros and Cons of Call-Graph Integration – 2
Redundancy
Nodes can appear in several neighborhoods
Assumes that correct behaviour follows from correct units and
correct interfaces
Not always the case
Call-graph integration is well suited to devising a sequence of
builds with which to implement a system
INT–24
Path-Based Integration
Motivation
Combine structural and behavioral type of testing for
integration testing as we did for unit testing
Basic idea
Focus on interactions among system units
Rather than merely to test interfaces among separately
developed and tested units
Interface-based testing is structural while interaction-based is
behavioral
INT–25
Extended Concepts – 1
Source node
A program statement fragment at which program execution
begins or resumes.
For example the first “begin” statement in a program.
other units.
Sink node
A statement fragment at which program execution
terminates.
The final “end” in a program as well as statements that
INT–26
Extended Concepts – 2
INT–27
MM-Path
INT–28
MM-Path Example
1 A B 1 C
1
2
2 2 3
3 4
3 4
5
4
5
6
MM-path
Source nodes
Sink nodes
MEP(A,1) = <1, 2, 3, 6>
MEP(A,2) = <1, 2, 4>
Module Execution Paths MEP(A,3) = <5, 6>
INT–29
MM-path Graph
INT–30
MM-path graph example
MEP(A,2) MEP(B,1)
MEP(A,3) MEP(B,2)
INT–31
MM-path guidelines
INT–33
Pros and cons of path-based integration
INT–34
MM-path compared to other methods
INT–35