Section 6.
4
Integration Testing
1. Overview
2. Horizontal integration
3. Vertical integration
4. Continuous integration
1
6.4.1 Integration Testing Overview
● Focus of integration testing
➢ small groups of components that are already unit tested
● Approach
➢ unit testing verifies individual components
➢ tested components can be grouped and tested together
➢ more complex parts can be tested incrementally
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 2
Integration Testing Overview (cont.)
● Ordering of component testing can optimize the process
➢ horizontal integration testing strategies
▪ components are integrated according to layers
➢ vertical integration testing strategies
▪ components are integrated according to functionality
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 3
6.4.2 Horizontal Integration
● Horizontal integration testing strategies
➢ big bang testing
➢ bottom-up testing
➢ top-down testing
➢ sandwich testing
➢ modified sandwich testing
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 4
Big Bang Testing
● Approach
➢ unit test each component
➢ throw everything together
● Disadvantage
➢ difficult to determine:
▪ where the faults occur
▪ which components fail
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 5
Bottom-Up Testing
● Approach
➢ unit test all the bottom layer components
➢ integrate with the next layer up
➢ repeat
● Characteristics of bottom-up testing
➢ requires that test drivers be implemented
➢ requires no test stubs
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 6
Bottom-Up Testing (cont.)
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 7
Top-Down Testing
● Approach
➢ unit test all the top layer components
➢ integrate with the next layer down
➢ repeat
● Characteristics of top-down testing
➢ requires that test stubs be implemented
➢ requires no test drivers
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 8
Top-Down Testing (cont.)
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 9
Bottom-Up vs. Top-Down Testing
● Bottom-up testing
➢ advantage: finds interface faults more easily
➢ disadvantage: UI subsystems are tested last
● Top-down testing
➢ advantage: starts with UI testing
➢ disadvantage: large number of test stubs must be developed
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 10
Sandwich Testing
● Approach
➢ combines top-down and bottom-up
➢ system is divided into:
▪ target layer
▪ layer above target layer
▪ layer below target layer
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 11
Sandwich Testing (cont.)
● Approach (cont.)
➢ top-down and bottom-up testing conducted in parallel
➢ top-down:
▪ top layer is tested incrementally with target components
➢ bottom-up:
▪ bottom layer is tested incrementally with target components
● Characteristics
➢ requires no test drivers and no test stubs
➢ disadvantage: target components are not unit tested
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 12
Sandwich Testing (cont.)
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 13
Modified Sandwich Testing
● Approach
➢ similar to sandwich testing
➢ test the three layers individually before testing together
➢ first step: individual layer tests
▪ top layer tested, with stubs for target layer
▪ target layer tested, with drivers for top layer and stubs for bottom
▪ bottom layer tested, with drivers for target layer
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 14
Modified Sandwich Testing (cont.)
● Approach (cont.)
➢ second step: combined layer tests
▪ top layer accesses target layer
● replace the test drivers with top layer components
▪ bottom layer is accessed by target layer
● replace the test stubs with bottom layer components
● Characteristics
➢ advantage: parallelism
➢ disadvantage: requires additional test drivers and stubs
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 15
Modified Sandwich Testing (cont.)
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 16
6.4.3 Vertical Integration
● Vertical vs. horizontal integration testing strategies
➢ in horizontal integration:
▪ components are integrated in layers, based on subsystem decomposition
➢ in vertical integration:
▪ all components for a given use case are fully implemented
▪ these components are tested together
▪ similar to prototyping, but prototypes are not releasable
▪ disadvantages:
● system evolves more incrementally
● design is more subject to change
©2025 Christine Laurendeau, based on Bruegge and Dutoit, Object-Oriented Software Engineering, 3rd ed., 2010 17
6.4.4 Continuous Integration
● Approach
➢ merge components into evolving software increment every day
➢ this is common practice in agile development
● Smoke testing integration
➢ new code is integrated into a separate build and tested together
▪ a build includes all the code compiled and linked into an executable
➢ that build is integrated (top-down or bottom-up) with other builds
➢ the entire product is smoke tested daily
©2025 Christine Laurendeau, based on Pressman and Maxim, Software Engineering: A Practitioner’s Approach, 9th ed., 2020 18
Continuous Integration (cont.)
● Advantages of smoke testing
➢ integration risk is minimized because smoke tests are run daily
➢ architectural issues are uncovered early
➢ error diagnosis and correction are simplified
▪ we know they are caused by the new build
➢ progress is easier to assess
● Smoke testing is similar to regression testing
➢ it ensures that new components do not break existing ones
©2025 Christine Laurendeau, based on Pressman and Maxim, Software Engineering: A Practitioner’s Approach, 9th ed., 2020 19