What is Integration Testing (I&T) || Challenges, Types, Examples

What is Integration Testing?

Integration Testing can be defined as a type of testing in which different modules, units, or components of a software application are tested as a combined entity. Integration Testing, also known as String Testing or sometimes Thread Testing, is done to test the modules which are working fine individually and doesn’t result in issues when integrated. Integration Testing is done after Unit testing and is the most basic form of testing. This type of testing is mainly done at the end of Software development life cycle (SDLC) when modules are ready to be integrated.

Why to implement Integration Testing?

Apart from ensuring that the modules are working properly, Integration Testing can be used to understand the logic of other programmers. This is done because a module is designed by different software developers, so it becomes necessary to check that the modules working individually are error free when integrated together. Integration Testing is a crucial concept of software testing and is a second level of the software testing process following unit testing.

Example:

Unit testing involves checking the most minor functioning parts of code separately, whereas Integrated Testing involves looking for errors when different units are integrated. To take an example of a Delivery application that consists of four modules, Login/Signup page, Profile Page, Delivery Address, and Payment Page. After the features are individually tested using Unit Analysis Testing.     

Reasons to Implement Integration Testing:  

  • Requirements Adjustment – To adjust the change of requirements done by the client. In real-time scenarios, requirements do and often change. During module development, new changes can be required by the client, which may not be a part of unit testing, which makes it necessary to implement Integration Testing.
  • Remove Errors- To ensure no errors exist between different interfaces of different modules. It detects errors related to the interface. Integration testing is done to check the overall functionality of the software application.
  • Can be started once modules are available-  Integration Testing can be implemented once the modules that are to be tested are available and does not require the other modules to be completed. Simultaneous testing of modules is possible. 
  • Bugs Detection-  Another advantage is that it helps the testers to detect defects, bugs, and security issues. Also, some modules interact with third-party APIs or tools, so for this purpose, there is a need to perform Integration Testing.

Challenges for Integration Testing:

Along with the above mentioned advantages, Integration Testing has some issues that need to be overcome as well. Listed below are some of the challenges involving String Testing:
  • The primary challenge faced by Integration Testing is that as it includes different modules designed and developed by different programmers, there could be an issue regarding how the modules and components will interact with each other and whether the responses generated are the ones required or not.
  • Integration Testing becomes complex as different components and factors like platform environment and database are involved.
  • A significant issue is the integration of new and legacy systems, as it may involve potential changes and testing efforts.
  • Another complexity is that integration testing not only involves integration links but also involves the testing of the environment itself, which could be an issue.  

Types of Integration Testing:

IT professionals do know that code can be tricky no matter how perfectly it is written, so there is a need for continuously testing the application, Although integration checks can happen at any stage of the software development life cycle. Different approaches are present for this type of testing, but in general, we talk about five types of integrated testing which are as follows:
  • Big Bang Integration Testing
  • Incremental Testing
  • Top-Down Integration Testing 
  • Bottom-Up Integration Testing
Hybrid/Sandwich Integration Testing
What is Integration Testing (I&T) || Challenges, Types, Examples

Big Bang Integration Testing

Big Bang Integration is a testing approach where all modules are tested as a single unit after integration. This approach is mostly used when a deadline is near for the software application and is in contrast to incremental integration testing. This approach is mostly used when it is impractical to test all the components and modules of a system together incrementally. 

Pros:

  • Help save time by finding errors quickly so errors can be correctified before the system is deployed.
  • For testing the complex interaction between modules. 
  • No component is left untested as all components are integrated together. This ensures the testing of every compound.
  • Suitable for small systems. 
  • Uses drivers and stubs to simulate the behavior of lower-level components. 
  • This type of approach is easy to manage, and few resources are required for this. It also allows flexibility to the developers. 

Cons:

  • Not suitable for ongoing and long projects 
  • Manual testing is required as it is difficult to automate all modules at once. 
  • As all modules are integrated together, it could be challenging to find the source of the defect.
  • High risk and uncertainty are involved in this approach, as all modules need to be working correctly for the system to work properly.
  • It’s a time-consuming approach, especially if numerous units are involved.

Incremental Testing

Incremental Testing is an approach of integration testing in which modules are integrated by the developers one by one using stubs or drivers. This is done till the whole system has been tested by the tester. Each module is tested in the unit phase and is combined incrementally till all the modules have been added instead of the integration of the whole system as done in the Big Bang approach. A complete checkup and testing process is done on the modules.

Pros:

  • Number of mistakes can be reduced as it is easy to find defects at the start.
  • This approach involves a step-by-step examination of modules which makes it easy to find the source of error.
  • Time efficient approach as modules can be prioritized.
  • It is reliable and improves test coverage. 

Cons:

  • Creating stubs can be time-consuming, and in case there is an issue in stubs, additional testing is required.
  • Difficult to implement and perform as compared to other approaches. 
  • A time-consuming approach as it requires the testing of all connected modules.

Top-Down Integration Testing 

Top-to-Bottom approach starts from the top modules and moves downwards. In this approach, stubs are used if some modules or units have not been completed yet. Stubs are units that act as temporary replacements and give the same output that is required. This is done so that the code can still be used for testing, even when some components are missing. Top Down testing is also known as Trickle down approach. The modules at the top of the hierarchy are tested first, followed by the modules present below. Top Down testing is done when the lower modules are not ready for testing.

Pros:

  • Stubs are used, and as compared to drivers, they are simpler and easy to write and also give similar results.  
  • The tested product is relatively consistent as testing is done in an environment similar to reality. 
  • Early prototypes can be obtained, and it is easy to detect errors and malfunctions in the system. 
  • Less time is required for testing. Also, crucial units are checked first, and then we move down to the lower modules. 

Cons:

  • Many stubs are required for this approach, and the use of stubs becomes mandatory.
  • There will be an issue if the core code is in the lower modules, as they can’t be tested unless the examination of higher modules is finished.  
  • Basic functionality is tested at the end. 

Bottom-Up Integration Testing

Bottom to start approach starts at the lowest level and then moves upwards to the higher-level modules for the software or application that is under test. This approach is applied when all the modules involved for the examination are ready to be tested. 

Pros:

  • Can be applied at early stages.
  • Minimum time required for troubleshooting and identification
  • No need to wait for all of the modules to be developed to start testing

Cons:

  • Testing takes time as the product can’t be released until it passes the entire testing phase 
  • Top modules are tested in the later stages. The modules might not get adequately tested and can have errors or bugs.
  • A working model can not be represented as far as several modules have been built.

Hybrid/Sandwich Integration Testing

The combination of Top-Down and Bottom-Up integration testing is known as Hybrid/Sandwich Integration Testing. This type of testing uses the advantages of both approaches (Top-Down, Bottom-Up) and uses drivers and stubs to replace the missing components of modules. In Hybrid Testing, upper modules are tested separately, whereas lower modules are examined after integration with upper modules. 

Pros:

  • Primarily used for ongoing or long-lasting projects, consisting of sub-projects as well.
  • It can be used to test modules having complex structures and algorithms.
  • Hybrid Testing is an effective way to test the performance as well as the functionality of software.
  • Parallel testing can be done. 

Cons:

  • Hybrid Testing is costly and expensive as there is a need to simultaneously check units on different levels. Maintaining the necessary infrastructure can be challenging.
  • It can’t be used for systems having a lot of interdependencies between modules.
  • The Need of stubs and drivers for Hybrid Testing is high.

Conclusion

To sum up everything stated so far; Integration Testing is done to check that modules, when integrated together, are working properly as an entity. The purpose is to detect any errors between modules when integrated together, along with the flow of information and data. Primary goal of Integration Testing is to increase data consistency and productivity. This type of testing is done after Unit testing when all modules have been created and then integrated together. Unit Testing is the initial stage of the QA process, which prepares the modules for integration testing. The reason is to test the interfaces between units and modules. To clarify, Integration Testing can be defined as a type of testing in which the modules are integrated in a logical way and tested as a group. Integration Testing involves different techniques, which have their own advantages and disadvantages, as explained above. In short, Integration Testing is necessary to remove the chances of bugs and errors that may arise while the integration of different types of modules.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x