Integration Testing – Big Bang, Top Down, Bottom Up & Hybrid Integration
Every software application contains multiple modules that converse with each other through an interface. Integrating these individual software modules and testing them together is known as Software Integration Testing. It is an extension to Unit testing. In this tutorial, we are going to see the following.
What is Integration Testing?
Integration Testing is the process of testing the connectivity or data transfer between the couple of unit tested modules. It is AKA I&T (Integration & Testing) or String Testing
It is sub divided into Big Bang Approach, Top Down Approach, Bottom Up Approach and Sandwich or Hybrid Integration Approach (Combination of Top Down and Bottom Up). This process is carried out by using dummy programs called Stubs and Drivers. Stubs and Drivers do not implement the entire programming logic of the software module but just simulate data communication with the calling module.
It is done after Unit testing. Each and every module involved in integration testing should be unit testing prior to integration testing. By doing unit testing prior to integration testing gives confidence in performing software integration testing.
It is done as per Test plan. By following the test plan before doing integration testing mitigate the chaos and gives a clear path in performing integration testing effectively.
Check below video to know about “Integration testing in SDLC”
Objectives of System Integration Testing
Objectives of integration testing include:
- To reduce risk
- To verify whether the functional and non-functional behaviors of the interfaces are as designed and specified
- To build confidence in the quality of the interfaces
- To find defects (which may be in the interfaces themselves or within the components or systems)
- To prevent defects from escaping to higher test levels
How To Write Integration Test Cases?
Assume there are 3 modules in an application such as ‘Login Page’, ‘Inbox’ and ‘Delete Mails’
While writing integration test cases, we don’t focus on functionality of the individual modules because individual modules should have been covered during Unit Testing. Here we have to focus mainly on the communication between the modules. As per our above assumption, we have to focus on “How Login Page is linked to the Inbox Page” and “How Inbox Page is linked to the Delete Mails module”.
What is Big Bang Approach?
Combining all the modules once and verifying the functionality after completion of individual module testing. In Big Bang Integration Testing, the individual modules are not integrated until all the modules are ready. Then they will run to check whether it is performing well. In this type of testing, some disadvantages might occur like, defects can be found at the later stage. It would be difficult to find out whether the defect arouse in interface or in module.
What is Top-Down Approach?
In Top Down Integration Testing, testing takes place from top to bottom. High-level modules are tested first and then low-level modules and finally integrating the low-level modules to a high level to ensure the system is working as intended.
In this type of testing, Stubs are used as temporary module if a module is not ready for integration testing.
What is Bottom-Up Approach?
It is a reciprocate of the Top-Down Approach. In Bottom Up Integration Testing, testing takes place from bottom to up. Lowest level modules are tested first and then high-level modules and finally integrating the high-level modules to a low level to ensure the system is working as intended. Drivers are used as a temporary module for integration testing.
What is the difference between Stubs and Drivers in Software Testing?
Stubs and drivers are used at component level testing. Check the below image
Assume we have two modules in an application say ‘Module A’ & ‘Module B’. Application developers have developed just ‘Module A’. Before they finish developing ‘Module B’, we (testers) received a requirement to test ‘Module A’. Here we can test ‘Module A’ if there is no dependency with ‘Module B’. Assume ‘Module A’ is dependent on ‘Module B’. Here what you do. In order to test ‘Module A’ in this case. Developers create a dummy module say Stub to replace ‘Module B’. Same way if ‘Module B’ is dependent on ‘Module A’ but ‘Module A’ is not ready yet. Here in this case we use Driver to replace ‘Module A’.
What is a Stub?
Is called by the Module under Test.
What is a Driver?
Calls the Module to be tested.
These terms (stub & driver) come into the picture while doing Integration Testing. While working on integration, sometimes we face a situation where some of the functionalities are still under development. So the functionalities which are under development will be replaced with some dummy programs. These dummy programs are named as Stubs or Drivers.
Imagine, we have two pages i.e., Login page and Admin page.
You have to test Login page (assume, Admin page is under development). The login page will call the Admin page after login but the Admin page is not ready yet. To overcome this situation developers write a dummy program which acts as Admin page. This dummy program is AKA Stub.
Stubs are ‘Called programs’. If a ‘Called program’ is incomplete, it is replaced with Stub. (This happens in Top down approach)
Coming to Drivers. In the above example, the Login page is ready but not the Admin page. this time assume that the Admin page is ready to test but the Login page is not ready yet. To overcome this situation developers write a dummy program which acts like Login page. This dummy program is AKA Driver. Drivers are ‘Calling programs’. If a ‘Calling program’ is incomplete, it is replaced with Driver. (This happens in bottom up approach)
STUBS | DRIVERS |
---|---|
Stubs used in Top Down Integration Testing | Drivers used in Bottom Up Integration Testing |
Stubs are used when sub programs are under development | Drivers are used when main programs are under development |
Top most module is tested first | Lowest module is tested first |
It can simulate the behavior of lower level modules that are not integrated | It can simulate the behavior of upper level modules that are not integrated |
Stubs are called programs | Drivers are the calling programs |
What is Hybrid Integration Testing?
Hybrid integration testing is also known as Sandwich integration testing. It is the combination of both Top-down and Bottom-up integration testing.
What is the difference between Unit Testing and Integration Testing?
UNIT TESTING | INTEGRATION TESTING |
---|---|
Unit testing is the first level of testing in the Software Testing | Integration Testing is the second level of testing in Software Testing |
Considers each component, as a single system | Integrated components are seen as a single system |
Purpose is to test working of individual unit | Purpose is to test the integration of multiple unit modules |
It evaluates the each component or unit of the software product | It examines the proper working, interface and reliability, after the integration of the modules, and along with the external interfaces and system |
Scope of Unit testing is limited to a particular unit under test | Scope of Unit testing is wider in comparison to Unit testing. It covers two or more modules |
It has no further types | It is divided into following approaches • Bottom up integration approach • Top down integration approach • Big Bang approach • Hybrid approach |
It is also known as Component Testing | It is also known as I&T or String Testing |
It is performed at the code level | It is performed at the communication level |
It is carried out with the help of reusable test cases | It is carried out with the help of stubs and drivers |
It comes under White Box Testing | It comes under both Black Box and White Box Testing |
It is performed by developers | It is performed by either testers or developers |
What is the difference between Integration Testing and System Testing?
INTEGRATION TESTING | SYSTEM TESTING |
---|---|
It is a low level testing | It is a high level testing |
It is followed by System Testing | It is followed by Acceptance Testing |
It is performed after unit testing | It is performed after integration testing |
Different types of integration testing are: • Top bottom integration testing • Bottom top integration testing • Big bang integration testing • Sandwich integration testing | Different types of system testing are: • Regression testing • Sanity testing • Usability testing • Retesting • Load testing • Performance testing • Maintenance testing |
Testers perform functional testing to validate the interaction of two modules | Testers perform both functional as well as non-functional testing to evaluate the functionality, usability, performance testing etc., |
Performed to test whether two different modules interact effectively with each other or not | Performed to test whether the product is performing as per user expectations and the required specifications |
It can be performed by both testers and developers | It is performed by testers |
Testing takes place on the interface of two individual modules | Testing takes place on complete software application |
Here, we validate the interace between the individual modules. | Here, we validate the finished product. |
Testers need to understand the interlinked modules and their interaction. | Testers need to understand the internal structure and programming language. |
It covers only functional testing. | It covers both functional and non-functional testing. |
Integration Testing Tools
Some of the integration testing tools are as follows:
This is all about Integration Testing. If you like this post, please share with your friends.
Related Posted:
- Test Plan with detailed explanation
- Test Strategy – complete guide
- Software Development Life Cycle
- Software Testing Life Cycle
- Bug Life Cycle
- Severity Vs Priority
- PDCA in Software Testing