Beginner’s Guide on Integration Testing
Integration testing is the testing of software applications by combining two or more modules or units as a group to ensure that no issues are left before moving to the system testing/validation testing (testing the system as a whole). It comes after the unit testing (testing individual modules or units) and before the system testing. Integration testing is usually abbreviated as I&T (Integrate and Test).
Why Integration testing?
The purpose of integration testing is to find out the issues related to the functions and performance of the software application when the individual modules are integrated. This is to mainly test the links between the modules.
Take a simple example of emails, integration testing is done by testing the interactions between the login page and the email page. On signing in to the email account, it should take the users to the page where the emails are listed.
A single unit or module may perform well in terms of functional and performance requirement but when they are combined/integrated there may be a lot of issues in it. So we need to integrate modules and test to avoid such issues which may have a serious effect on the project performance and quality.
Integration testing is also necessary in case of changing requirements which cannot be tested in unit testing.
How the Integration testing is done?
To perform a detailed integration testing we have different types of testing approach which are explained below:
Top Down Approach
- This is an incremental approach where the testing is done from the top to the bottom following the control flow of the software system.
- It is easy to find the defects in this approach since it is an incremental method. Major issues (as per the priority) could be identified and fixed at the earliest.
- This method uses dummy programs called ‘stubs’ and ‘drivers’ which simulate the data communication with the calling module.
- In this approach there is a possibility for inadequate testing of the lower level modules.
- Early prediction of the system prototype is possible since the flow is from the top.
- In this approach, it is easier to find a missing branch link.
- Bottom Up Approach
- This is also an incremental approach in which the testing starts from the bottom level modules.
- There are chances for missing out some critical issues since the critical modules which are at the top are tested last.
- Prototype of the system cannot be predicted earlier in this approach since the bottom level modules are tested first.
- We can easily identify bugs with this approach.
Therefore, integration testing focuses on testing multiple modules that are working together.
To be Noted:
- Ensure unit testing of each module before integrating those.
- Should have a proper detailed design document which explains the interactions between the individual units/modules before starting integration test.
- Perform regression testing with automation tool since manual regression may be time-consuming for top down and bottom up.
- Sandwich(Hybrid) Testing Approach
- This type of approach combines the features of both top down and bottom up approach.
- This approach is useful in major projects which contains huge programs like operating systems.
- In this both the top down and bottom up method testing are started simultaneously.
- Integration testing starts from the middle and moves parallelly up/down as per the two above approaches.
- Risky – hardset Approach
- In this approach the integration testing starts with the risky module first.
- This is useful in reducing the defect fixing costs since the risky modules which would affect the project in large scale are given priority and are tested in the early stage.
- Perform regression testing with automation tool since manual regression may be time-consuming for top down and bottom up.
I hope that this blog gives you an idea about which method is good for a particular project type. Think about a good one that suits for your project and have fun testing….