In this article, you will learn what is integration testing, the types of integration testing, and some best integration testing practices. Let’s start with the integration testing definition:
Integration testing is a software testing methodology where two already unit tested individual components are integrated, and the interface between them is tested for defaults. This technique is done after unit testing.
Why is integration testing done?
The objective is to combine unit tested components and build a program structure that has been designed in the first place and test whether it’s working in the required manner.
Types of integration testing:
We will now learn more about different integration testing approaches.
1. Top-Down Approach
Top-down integration testing is an incremental approach to the construction of software architecture.
Modules are integrated by moving downward through the control hierarchy, beginning with the main control module. Modules subordinate to the main control module are incorporated into the structure in either a depth-first or breadth-first manner.
Depth-first integration integrates all components on a primary control path of the program structures.
2. Bottom-up Approach
Bottom-up integration testing, as its name implies, begins construction and testing with atomic modules.
Because components are integrated from the bottom up, processing required for components subordinate to a given level is always available, and the need for stubs is eliminated.
A bottom-up integration strategy may be implemented with the following steps:
- Low -level components are combined into clusters that perform a specific software sub-function.
- A driver is written to coordinate test case input and output.
- The cluster is tested
- Drivers are removed, and clusters are combined moving upward in the program structure.
3. Sandwich / Hybrid Testing
In this top-down and bottom-up approach is combined, and testing is done. Thus, Sandwich testing has advantages of both the top-down testing as well as the bottom up.
4. Big Bang
This non-incremental integration approach is called a big band approach for integration testing. Sometimes there is a tendency to attempt non-incremental integration in which all the components are combined in advance, and the entire program is tested.
Why is non-incremental integration not good?
In these when a set of errors are encountered, correction becomes quite difficult as isolation of all components causes complications due to the vast expanse of the entire program.
Even when the errors are corrected, new ones appear, and the process continues in an endless loop.
Why is the incremental integration approach better?
In incremental integration the program is constructed and tested in small increments, while errors are easier to isolate and correct; the interface is more likely to be tested completely, and a systematic test approach may be applied.
An example of Integration Testing:
- A Media player where all the modules like audio, video, and various formats are combined and tested if the software is working correctly or not.
- A bike assembling where all components are integrated one by one or by big bang method and then tested if they are working in a required manner.
Some Integration Testing Tools:
- Citrus Integration Testing
- PeopleSoft PeopleTools 8.53
Want to know More? Start with the basics of testing: