31 Oct 2019
Integration Testing Overview
Integration testing primarily focuses on verifying data communication among different modules of the software project. Integration tests determine the effectiveness and performance of different software modules when they are connected to each other. It rather determines whether a system of multiple modules work together as per the requirements specified. Individual units are culminated together and tested as one unit to validate the performance, functionalities, and reliability of the software. The formal software testing process involves testing different modules initially with unit testing and then moved further for integration testing.
Why Integration Testing is Essential within the SDLC?
The software has changing requirements and new patches of code are developed frequently. When these patches are grouped together to form one software, integration testing should be taken up. Usually, when complex software is built, it is classified into different modules and separately coded. It is essential that all these modules require integration testing to know how they perfume when combined. Usually, integration testing is done after unit testing to ensure all the units work in harmony with each other. Integration testing is also done when support libraries are used along with the code.
How to initiate Integration Testing?
– Get a complete understanding of the application under test
– Identify the work-flow of different modules
– Get an overview of what each Module does
– Take a stance of the way data is transferred from one module to another
– Get the view of exact data entry and data exit of the application
– Segregate the application to match the testing pattern
– Identify and create test conditions based on data flow
– Draft the test cases with deep analysis of conditions
– Start integration testing of modules
Critical aspects to watch out before initiating Integration Testing
1. Ensure that a detailed design document with listing of various interactions between modules is listed
2. A proper configuration management system should be kept in place to track the right version of each unit
3. Ensure that initially unit testing is taken up before Integration testing is started
4. As regression testing is essential each time a unit is integrated, automate tests based on a top-down or bottom-up approach to ensure effective results
What are the advantages of Integration Testing?
– It provides a systematic technique for assembling a software system while conducting tests to uncover defects associated with interfacing
– Ensures the integrated modules and components work properly
– As software development involves changes in requirements, testing of modules at different levels is vital for which integration testing proves to be effective
What are the different methods of Integration Testing?
Integration testing ensures effective functioning across modules when combined. A more in-depth look at the different types of Integration testing gives a broader perspective of it.
Big Bang Approach:
It is one type of Integration testing wherein all modules are tested in one go. It verifies whether the system works as expected. The only disadvantage with this type of testing is, if there is an issue detected within the modules, it becomes challenging to find out which module has caused it. It is supposed to be the right approach for testing small systems while it is a more time-consuming process.
This type of progressive approach is used to test two or more modules that are logically aligned and tested in a single batch. Additional and related modules are tested to make sure that all modules are merged and tested with each other effectively. This Incremental approach can either be a Bottom-up or Top-down approach.
This process involves the testing of high level or the parent modules at first level, and then testing of the lower level or child modules, and then integrated together. Stubs, which are a small segment of the code are used to simulate the data response of lower modules until they are completely tested and integrated.
It is the reverse of top-down approach wherein first lower-level modules are tested before they are actually integrated with their parent modules. Drivers which simulate the data response of a connecting higher level or parent module is used instead of stub.
This is a hybrid method that combines both bottom-up and top-down methods into single sandwich method. It allows testing top modules with lower modules and vice versa at the same time. This type of testing ensures better and faster results.
For any iterative development or upon any issue resolution, testing needs to be taken up to ensure the change did not inadvertently break or change expected results elsewhere in the application. Hence, it should be taken up to ensure other areas of the application are functioning as per the design objectives. It should be done with every release, and as it is very repetitive, hence test automation can simplify this process.
System Integration Testing:
It involves the testing of a collection of modules and interfaces to check if the application meets the specification requirements. It is both Black box and white box testing hence the knowledge of modules and interfaces is required. The process involves the functional testing wherein testing is performed to check whether the modules when combined ensure the correct outcome and are performed by developers and test engineers. Moreover, in system testing, test cases are developed to simulate the interaction between modules. It also involves the testing of systems and packages especially testing interfaces to external entities.
What are the best practices to follow for Integration Testing?
– Perform Integration Testing only after Unit Testing
– Any core business logic should not be tested with Integration testing
– Testing suites should be maintained separately such that developers can run unit tests during development and before committing code
– Integration tests might span several modules and log extensively, and if these tests fail, it becomes challenging to identify the cause
– It is important not to stop at integration testing and go beyond it as it is essential to run system tests that accurately simulate the production environment
Integration testing should be taken up to ensure that different modules work effectively when integrated. Enterprises following agile and DevOps should take up integration testing to ensure modules function effectively when grouped.