Integration Testing Approaches: Big Bang , Top down & Bottom up
- Main traditional strategies can be classified as top-down integration, bottom-up integration, big-bang integration.
- We reconsider these strategies in an object-oriented environment.
- Various factors like cost, complexity of the application etc determine which approach is selected.
This article will present you with a complete idea about integration testing approaches/strategies, advantages, disadvantages etc.
We will learn below topics in this article:
Strategies for integration:
- Top Down integration Testing
- Bottom Up integration Testing
- Big Bang integration Testing
Big Bang Integration Testing:
Big Bang testing is a type of testing where all the components are integrated together at once and then tested as a whole.
- Individual modules are not integrated until and unless all the modules are ready.
- All the modules are integrated without performing any integration testing and then it’s executed to know whether all the integrated modules are working fine or not.
Advantages of Big Bang Integration Testing:
- Consists of completed and checked modules
- It is extremely suitable for small systems.
- The main advantage is that everything is finished before integration testing starts.
Disadvantages of Big Bang Testing:
- There is a high chance of missing some critical defects, which might pop up in the production environment.
- It is very difficult to cover all the cases for integration testing.
- Causes delay as tester needs to wait till all modules are integrated.
Stubs and Driver
Stubs and driver both are dummy modules and are only created for test purposes.
Driver are the ones, which are the “calling” programs
- A component, that calls the unit under test
- Drivers are used in bottom up testing approach.
- Controls the test cases
- Drivers are dummy code, which is used when the sub modules are ready but the main module is still not ready.
A component, the unit under test depends on Partial implementation
- Dummy modules that always used to simulate the low level modules.
- Stubs are used when sub programs are under construction.
- Stubs are used in top down testing approach, when you have the major module ready to test, but the sub modules are still not ready yet
Difference Between Stubs and Drivers:
|1.||Stubs are used in the Top down integration testing.||Drivers are used in the Bottom up integration testing.|
|2.||Stubs are also known as " called programs”||Drivers are also known as “calling program”|
|3.||Stubs are usually used in the unavailability of low-level modules.||Drivers are mainly used in place of high-level modules|
|4.||Stubs are used when lower-level of modules are missing and we need to test the main module.||Drivers are used when higher-level of modules are missing and we need to test the lower module.|
|5.||The test stub is a dummy program that integrates with an application to complete its functionality. It is relevant for testing that uses the top-down approach.||The test driver is a section of code that calls a software component under test. It is useful in testing that follows the bottom-up approach.|
Top down Integration Testing
First Test the top layer or the controlling subsystem or Start with the ‘‘root’’ and one or more called modules.
- Then combine all the subsystems that are called by the tested subsystems and test the resulting collection of subsystems
- Do this until all subsystems are incorporated into the test
- Stubs are needed to do the testing.
Advantages of Top down integration
- Test cases can be defined in terms of the functionality of the system.
- No drivers required
Disadvantages of Top Down Integration
- Writing stubs is difficult: Stubs must allow all possible conditions to be tested.
- Large number of stubs may be required, especially if the lowest level of the system contains many methods.
- Some interfaces are not tested separately.
Bottom Up Integration Testing
The subsystems in the lowest layer of the call hierarchy are tested individually.
- Then the next subsystems are tested that call the previously tested subsystems
- This is repeated until all subsystems are included
- Drivers are needed.
Advantages of Bottom Up integration testing
- No stubs needed
- Useful for integration testing of the following systems
- Real-time systems
- Systems with strict performance requirements.
Disadvantages of Bottom Up integration testing
- Tests the most important subsystem i.e. UI last
- Drivers required