What is Integration Testing?
Integration testing tests interfaces between components or functions which are integrated to form a system. It is performed by the testing team. It basically checks the proper functioning of the modules when they are integrated and should not expose bugs. It is the most common functional testing type and performed as automated testing. In the Integration test, data flows between two modules so they act as an integrated system rather than individual modules.
Types of Integration Testing
Two types of integration testing performed are
Component integration testing – component integration testing tests the interactions between software components and is done after unit testing
System integration testing – system integration testing tests the interactions between different systems and is done after system testing.
Objectives of Integration Testing
- Verify whether the functional and non-functional behaviors of the interfaces are designed as per the specification.
- To build confidence in the quality of the interfaces.
- To find defects in the components, system, or in the interfaces.
- To ensure modules or programs work when integrated with each other.
- Prevents defects from escaping to higher test levels of testing
Approaches for integration testing
In big bang testing, all the modules or components are combined together to form a complete system that is further tested for bugs. The advantage of this type of testing is everything is tested at one shot. But it is time-consuming, and it is difficult to trace the cause of failures.
This approach is helpful only for very small systems. If an error is found during the integration testing, then it is very difficult to locate the error as it could belong to any of the modules being integrated. So, debugging errors reported during big bang integration testing is very expensive to fix.
Advantages of Big-Bang Testing
- It is convenient only for small size software systems.
Disadvantages of Big-Bang Testing
- Identification of defects is difficult
- Testing starts very late as it needed to wait for all the modules to be integrated.
- High-risk critical modules are not tested on priority since all modules are tested at once.
- There is a huge probability to miss to test some of the interfaces.
In incremental testing, modules are integrated one by one, and a test is carried out after each step. The number of integration steps depends on high-risk interfaces which would be also integrated at early stages. Thus, the defects are found early in a smaller assembly when it is relatively easy to detect the cause. It is categorized as:
Testing takes place from top to bottom i.e. top-level modules are first tested followed by submodules and then the control flow or architectural structure. Major design flaws can be detected and fixed early because critical modules tested first. It takes the help of Stubs for testing
Advantages of the Top-down approach
- The identification of defects is easy.
- Design flaws are identified at an early stage.
Disadvantages of Top-down approach
- Need to be tested with a high number of stubs, thus makes it complicated.
- Lower level modules are tested inefficiently.
Testing takes place from the bottom top to bottom i.e. lowermost module is first tested, and the top module is tested at last step. It takes the help of Drivers to pass appropriate data to the lower level modules.
Advantages of the Bottom-up approach
- The identification of defects is easy.
- several decouple subsystems can be tested simultaneously.
- Testing started at an early phase as it is not required to wait for the development of all the modules
Disadvantages of Bottom-up approach
- Critical modules are tested last due to which the defects can occur.
- Complexity increases when the system is made up of a large number of small subsystems
Functional incremental Testing
Integration and testing take place on the basis of the functions or functionality, as documented in the functional specification.
Advantages of Functional incremental approach
- Critical features are tested first
- Complete testing of all modules is possible
Disadvantages of Functional incremental approach
- Time-consuming process