Integration testing is a critical step in software development that verifies individual modules, often coded by many different programmers, function together efficiently as a complete system. Integration testing paves the way for successful user acceptance testing, helps ensure that business requirements are met, and increases the likelihood that the customer will be satisfied with your product. In this article, we will explore in more detail what integration testing is, when it is performed, and how it is performed.
What is integration testing?
Integration testing, or as it is sometimes known, integration and testing (I&T), is one of five phases in software testing where individual software modules are combined and tested as a group. It is intended to evaluate the compliance of a system or component with specified functional requirements.
When is integration testing performed?
Integration is the third step in software testing, just after unit testing and prior to regression testing.
(1) Requirements Testing
In requirements testing, business, functional or technical requirements are defined, and it is proved that adequate test cases can be written to validate those requirements. This ensures that the definitions are clear and unambiguous and will ultimately result in first-class code, avoiding costs in rework, possible system outages, and damage to your company’s reputation.
(2) Unit Testing
The word unit may define any number of things. Usually, however, unit means a function, a procedure, or an individual program. A benefit of this phase is that it can be run every time a piece of code is changed, allowing immediate resolution of issues. Unit testing can be done manually but is frequently automated in Agile and DevOps projects. Unit testing helps ensure that each unit is precise and fully functional. Once each unit or component is verified, they are integrated into an application.
(3) Integration Testing
In system or system integration testing, individual software modules are combined and tested as a group. This testing verifies the proper execution of software components and proper interfacing between components within the solution. This phase is critical, as it determines if and how efficiently the individually tested units are working together. No matter how efficient the individual units may be, the system’s efficiency will nonetheless depend on how the individual units work as a team. Both manual and automated tests can be used, but you will have to choose the method that best corresponds to how the units are defined and delivered.
The major differences between unit and integration testing are as follows:
- In unit testing, the tester reviews each module of the software individually, while in integration testing all modules of the software are tested together.
- In unit testing, the tester knows the internal design of the software while in integration testing, she does not.
- Unit testing is a white-box testing process, while integration testing is a black-box testing process.
(4) Regression Testing
Regression testing verifies that previously developed software performs correctly after the update that will include the system changes proven in integration testing, and increases the chances of detecting bugs caused by changes to a software or application. This testing is performed after software enhancements, for compliance, bug fixes, and other changes, and verifies that changes to an application have not caused components that originally worked to now fail. Regression testing can be performed manually, but in most cases repeating a set of tests each time the software is updated is too time-consuming and complicated, so automated testing is preferred.
(5) User Acceptance Testing
Acceptance testing (or User Acceptance Testing UAT), is conducted to determine whether the system is ready for release. UAT marks the last step of the implementation process and is conducted to ensure that system requirements meet business needs. UAT allows issues to be fixed before the system goes live. Business requirements and the standard operating procedure (SOP) are verified as part of the validation. UAT is a critical phase of the software development life cycle because business requirements can sometimes be misinterpreted in a way that does not meet the needs of the end-user. During this final phase, the end-user will test the system to confirm that the application meets her business’ needs. As soon as the software receives the greenlight, the application is delivered to production.
What are the various methods of integration testing?
There are many approaches to integration testing. The most common are: big-bang, bottom-up, top-down, and mixed (sandwich). Before exploring these methods, let’s review some important testing lingo. Stubs and drivers are the dummy programs in Integration testing “used to facilitate the software testing activity.” These programs are substitutes for modules not ready to be integrated. Rather than make use of the whole programming logic, they simulate data communication with the calling module while testing. A stub is called by the module under testing. A driver calls the module to be tested.
Big Bang Method
In the big-bang method, the vast majority of the developed modules (in other words, small parts of a larger program) come together, thus making a complete software system, or at least a large part of one. This method can significantly reduce the time spent conducting the integration testing process. However, if the tester fails to record the results sufficiently, the process may become needlessly complex, thus keeping the testing team from achieving a fully executed integration test. This method is convenient for small systems. However, in larger systems, it becomes impracticable because testing must wait until most or sometimes all of the modules are available. Furthermore, it does not isolate and prioritize high-risk critical modules because all modules are tested at once.
In bottom-up integration testing, the lowest level components are tested first, then used to facilitate the testing of higher-level components. The tester will need to repeat this process until every component from the bottom of the hierarchy to the very top has been tested. All the low-level modules, procedures, or functions are integrated and then tested. After integration testing of lower-level integrated modules, the next level of modules will be formed and tested. This method helps to determine the levels of developed software and ensures that gauging testing progress is straightforward. However, bottom-up testing is helpful only when all or most of the modules of the same development level are ready. The principal advantage of bottom-up testing is that several disjoint subsystems can be tested simultaneously. In this method, there is no need for stubs, but driver modules must be produced. Furthermore, in systems that are composed of a large number of small subsystems, integration testing becomes highly complex and time-consuming.
Top-down testing involves testing the topmost integrated modules, as well as the branch of the module, from beginning to end. A form of integrated testing, the top-down method requires simulation of the behavior of lower-level modules that have not yet been integrated. The primary advantages are (1) the opportunity to separately debug modules, (2) there is little or no need for drivers, and (3) it is more stable and accurate at the aggregate level. The down-side is that this method requires many stubs, and modules at the lower levels tend to be tested inadequately.
Mixed (Sandwich) Integration Testing
Mixed or ‘sandwich’ integration testing follows a combination of top-down and bottom-up testing approaches. In the top-down approach, testing can start only after the top-level modules have been coded and unit tested. In the bottom-up approach, testing can start only after the bottom level modules are ready. The mixed integration testing method avoids these delays by starting testing of the bottommost level and topmost level simultaneously and meeting in the middle. The mixed testing method is useful for very large projects having several sub-projects. However, this method tends to be more expensive due to the increased initial testing burden, and it is not recommended for smaller systems where modules are highly interdependent.
Conclusion: What Does Integration Testing Test?
As you can see, integration testing is an absolutely essential step in the software development life cycle. It ensures that individual modules function efficiently together as a system, that business requirements are met, that user acceptance testing is successful and that the customer is satisfied with your product. If all of these criteria are not met, then the system will not function as intended.