Professional Documents
Culture Documents
SOFT3406 Week11
SOFT3406 Week11
Agenda:
- Decomposition Based Integration
- Call Graph Based Integration
- Path Based Integration
Decomposition Based Integration
3
Example: A Calendar Program
4
Functional Decomposition Tree of Calendar
reflects the lexicological inclusion of units, in terms of the order in which they need to be
compiled,
5
Lexicological Inclusion of Calendar Program
Main Calendar
Function isLeap
Procedure weekDay
Procedure getDate
Function isValidDate
Function lastDayOfMonth
Procedure getDigits
Procedure memorialDay
Function isMonday
Procedure friday13th
Function isFriday
Procedure nextDate
Procedure dayNumToDate
Procedure zodiac
6
Top-Down Integration
7
Top-Down Integration
if ……………………. then
return “Taurus”
endif
9
Next Steps
✧ Once the main program has been tested, we replace
one stub at a time, leaving the others as stubs.
✧ Figure below shows the first three steps in the gradual
replacement of stubs by actual code.
✧ The stub replacement process proceeds in a
breadth-first traversal of the decomposition tree until all
the stubs have been replaced.
✧ In all figures, the units below the first level are not
shown, because they are not needed.
✧ The process:
▪ After each level is completed; move down one level
• one stub is replaced at a time with actual code
• any fault must be in the newly integrated unit
✧ Fault isolation is similar to that of Test-Driven
Development.
10
Next three steps in Top-Down integration.
11
Bottom-Up Integration
12
Bottom-Up Integration
The figure shows the first step in bottom-up integration. The gray
units are drivers.
13
Next steps in Bottom-Up integration
14
Sandwich Integration
✧ Sandwich integration is a combination of top-down and bottom-up
integration.
✧ A “sandwich” is one path from the root to a leaf of the functional
decomposition tree.
✧ No stubs nor drivers are needed.
✧ But, the fault isolation capability of the top-down and bottom-up
approaches is sacrificed.
15
Pros and Cons of Decomposition Based
Integration
✧ Advantages:
▪ They are all intuitively clear; build up with tested components.
▪ Whenever a failure is observed, the most recently added unit is
suspected.
▪ Integration testing progress can easily be tracked against the
decomposition tree.
✧ Disadvantage:
▪ The development effort for stubs or drivers is another drawback to
these approaches, and this is compounded by the retesting effort.
16