Traditionally, software testing was considered as a way of finding defects once a usable product used to get developed. But with the advancement in the software development process and the requirements of complex software, the testing process was evolved.
Testing was broken down into different levels to improve the test coverage and reliability. In this tutorial, we will first quickly check the different levels of testing and then study in detail Integration testing and its types, advantages, and some of the most common integration testing tools.
Levels of Testing
Software testing types can be broadly classified into Static Testing and Dynamic Testing. In the case of static testing, we do not run the developed software application, instead, we use different techniques like – inspections, walk-throughs, informal and technical reviews to test the application.
In the case of dynamic testing, we actually test the software application by running the code and examining its dynamic behavior that includes the analysis of different parameters like response time, CPU usage, memory usage, etc.
Now, dynamic testing includes different levels of testing that start from unit testing and proceeds to integration, system, and finally acceptance testing.
Unit Testing – It is the first level of testing in which the individual modules or the smaller building blocks of an application are tested in isolation. Its advantage is since we focus on smaller modules only, so it is easier to completely and exhaustively test that module. Also, the bugs found at this level can be fixed quickly and easily with lesser resources.
Integration Testing – It is the second level of testing, that we will be studying in this article. It involves testing the integrated modules as a whole along with their interfacing.
System Testing – The third level of testing in which end to end testing of the complete application is carried out. It helps in validating the requirements before the final testing by the client.
Acceptance Testing – It is the fourth and the final level of testing in which the client or the stakeholders check if the application satisfies its business requirements or not.
Now, that we know about the static and dynamic testing and the different levels of testing, we can proceed to learn about the Integration testing in detail.
What is integration testing?
Integration testing is the second level testing performed after unit testing in which we test the interfacing between the modules along with the end to end testing of the integrated components. It can be performed by using both white box and black box testing techniques.
Why should we do integration testing?
- A module may work perfectly in isolation but can have integration issues while interacting with another module.
- There can be data type or valid data range issues between the modules.
- In large teams where the modules are created by different developers or even teams, it becomes very necessary. As there can be a mismatch in the understanding of the different developers.
Advantages of Integration testing
- As discussed above, it helps in identifying integration issues between the modules.
- It helps in ensuring that the integrated modules work properly before moving to the system testing of the complete application.
- Bugs found at this level are easier to resolve as compared to the one found at later stages of testing – system and acceptance testing.
- It improves test coverage and provides an additional level of reliability.
Integration Testing Types
In big bang integration, all the modules are first required to be completed and then integrated. After integration, testing is carried out on the integrated unit as a whole. It is different from system testing as here we focus testing on the interfacing/communication between the modules.
Advantage – It is suitable for smaller projects where we can have all the modules developer before starting with integration testing.
Disadvantage – It is very difficult to incorporate as it is not practical or advisable to have all the modules prepared before starting integration testing.
Top-down Integration Testing
Top-down integration is an incremental approach of integration testing where the testing flow starts from top-level modules (modules higher in the hierarchy) towards the lower-level modules. As there is very much possible that the lower level modules might not have been developed while beginning with top-level modules. So, in those cases, stubs are used.
Stubs are dummy modules that simulate the functioning of a module by accepting the parameters received by the module and giving an acceptable result. Generally, stubs have hard-coded input and output that helps in testing the other modules integrated with it.
Advantage – We don’t have to wait for all the modules to get developed with the use of stubs. Also, we can prioritize the testing of critical integrated modules first.
Disadvantage – This technique requires the creation of many stubs for the simulating the lower-level modules. Also, the lower-level modules might not get tested adequately.
Bottom-up Integration Testing
Bottom-up integration is also based on an incremental approach and starts from lower-level modules, moving upwards to the higher-level modules. Again the higher-level modules might not have been developed by the time lower modules are tested. So, in those cases, Drivers are used. These drivers simulate the functionality of higher-level modules in order to test lower-level modules.
Advantage – Similar to top-down testing, we don’t have to wait for all the modules to get developed before starting testing.
Disadvantage – The top-level modules that are tested at the later stages, might not get tested adequately and can have bugs.
Hybrid Integration Testing
The hybrid integration approach is also called the Sandwich approach. This approach is a combination of both top-down and bottom-up integration testing. In this approach, the integration starts from the middle layer, and testing is carried out in both the directions – towards higher-level modules(upwards) and towards lower-level modules (downwards). This way includes benefits of both top-down and bottom-up approaches and helps in faster testing of the module’s interfaces.
Advantage – Since we can move both upwards and downwards. So, it is the most time-efficient method with the option to prioritize the modules on the top or bottom level.
Disadvantage – It is difficult to implement this approach as we have integrate and move in both the directions of the module to be tested.
Challenges in Integration testing
- Difficult to perform – It is very difficult to perform as compared to system testing in which we can consider the application as a black box.
- Time-consuming – It is very time-consuming and resource-intensive to test all the interfacing between the different connected modules.
- Additional efforts – It requires the creation of stubs and drivers which if not created correctly can result in inadequate testing.
Integration Testing tools
Let’s talk about the different paid and free integration testing tools in the market that help in greatly reducing the challenges discussed above.
Rational Integration Tester – Rational integration tester is an integration testing tool by IBM. It provides a codeless environment for developing integration tests.
TESSY – Tessy by Razorcat Development GmbH helps in automating the unit and integration testing cycle for the embedded software in C and C++.
LDRA – LDRA tool suite provides unit, integration, and system testing capabilities. It is mostly used for critical software applications like – Aerospace, medical devices, automotive, etc.
Citrus Integration Testing – Citrus is an open-source test framework that helps in developing automated integration tests for HTTP REST, TCP/IP, SOAP, FTP, XML, JSON, etc message protocols and data formats.
Steam – Steam is an open-source test automation framework that provides headless integration testing capability.
With this, we have come to the end of our tutorial on integration testing. I hope all your questions related to this level of testing must have been resolved. For any query, you can let us know in the comments and we will answer at the earliest.
Kuldeep is the founder and lead author of ArtOfTesting. He is skilled in test automation, performance testing, big data, and CI-CD. He brings his decade of experience to his current role where he is dedicated to educating the QA professionals. You can connect with him on LinkedIn.