Concept of Integration Testing

Concept of Integration Testing

What is concept of integration testing?

Also known as integration and testing (I&T) is a type of software testing in which the different units, modules or components of a software application are tested as a combined entity. However, these modules may be coded by different programmers. The aim of integration testing is to test the interfaces between the modules and expose any defects that may arise when these components are integrated and need to interact with each other.

No alt text provided for this image

Why integration testing is essential?

Integration testing is vital in today's IT and software development landscapes, especially when requirements are dynamic and deadlines are tight. Even when each module of the application is unit-tested, some errors may still exist. To identify these errors and ensure that the modules work well together after integration, integration testing is crucial.

Reasons to conduct integration testing.

  1. Integrating disparate modules into a working application:-When different developers work on different modules, individuals bring their own understanding and logic to the development effort.
  2. Ensuring that changing requirements are incorporated into the application:-In many real-time application scenarios, requirements can and do change often. These new requirements may not be unit-tested every time, which may lead to missed defects or missing product features
  3. Eliminating other common problems:- Integration testing also helps eliminate issues, such as inadequate exception handling, API response generation, data formatting, erroneous external hardware interfaces, incorrect third-party service interfaces and error trapping.

Types of Integration Testing

No alt text provided for this image

 Integration Testing

Since modern-day software is composed of separate components or modules, they need second-level testing to test the synchronicity and compatibility of components with each other. This testing is called integration testing of application modules. You can do it primarily by checking the connectivity and communication issues amongst different software modules.

Incremental Integration Testing:-In Incremental integration testing, the developers integrate the modules one by one using stubs or drivers to uncover the defects. This approach is known as incremental integration testing. To the contrary, big bang is one other integration testing technique, where all the modules are integrated in one shot.

Big-bang testing: The big-bang approach involves integrating all modules at once and testing them all as one unit.

Big-bang testing's advantages include the following:

  • Its suitability for testing small systems.
  • Its ease of identifying errors in such systems, saving time and speeding up application deployment.

However, big-bang testing has disadvantages, for example:

  • Locating the source of defects can be difficult since different modules are integrated as one unit.
  • Big-bang testing is time-consuming for a large system with numerous units.
  • Testers could miss some interface links or bugs.
  • Testers must wait until all modules are available, so they have less time to do the testing and developers have less time to fix any errors.
  • Due to simultaneous testing, high-risk critical modules and peripheral modules dealing with user interfaces are not tested on priority (as they should be).

Top-down testing: The top-down approach is an incremental approach that involves testing from the topmost or highest-level module and gradually proceeding to the lower modules. Each module is tested one by one, and then integrated to check the final software's functionality.

Advantages of top-down testing are as follows:

  • It is easier to identify defects and isolate their sources.
  • Testers check important units first, so they are more likely to find critical design flaws.
  • It is possible to create an early prototype.

However, disadvantages to top-down testing are as follows:

  • The examination of lower-level modules can take a lot of time, so testers may not test them adequately or completely.
  • When too many testing stubs are involved, the testing process can become complicated.

Bottom-up testing: Bottom-up (also known as bottom-to-top) integration testing is the opposite of the top-down approach. It involves testing lower-level modules first, and then gradually progressing incrementally to higher-level modules. This approach is suitable when all units are available for testing.

Advantages of bottom-up testing are as follows:

  • It is easier to find and localize faults.
  • Less time is needed for troubleshooting since testers don't have to wait for all modules to be available for testing.

Meanwhile, disadvantages of this type of testing include the following:

  • Testing all modules can take a lot of time, so there may be delays in releasing the final product.
  • Critical modules are tested only in the final stages, so testers may miss some defects and developers may not have enough time to fix found defects.
  • Testing can be complicated if the software consists of multiple low-level units.
  • It is not possible to create an early prototype.

Sandwich/hybrid testing: Sandwich or hybrid integration testing combines the top-down and bottom-up approaches. It uses both stubs and drivers.

The advantage of sandwich or hybrid testing is that it is:

  • preferable for testing huge programs like operating systems or other long-term applications.

However, this strategy has the following disadvantages:

  • It is complex and costly.

A higher level of precision and skill are required for this approach.

the key steps in integration testing?

  1. Prepare the test plan.
  2. Design test cases, test scenarios, use cases and scripts.
  3. Run tests after unit/module integration.
  4. Detect, report and fix errors.
  5. Retest functionalities after fixing bugs.
  6. Repeat the process until all bugs are found and fixed.

Objectives of Integration Testing

To analyze working of integrated software modules

To ensure smooth integration between modules and third-party tools

To fix exception handling defect

Advantages

  • Independent testing process – You don’t need to wait for all the modules to be available and unit tested. As soon as the relevant modules are available, QA can proceed with the integration testing.
  • High code coverage – It allows a thorough analysis of the entire system. With such a broad scope, the chance of missing out on a crucial connectivity issue is close to zero.
  • Bug detector – You can detect any defect or security issue during the initial phases of the software testing life cycle(STLC) using integration testing. This saves a lot of time and offers developers superior control over the product.

Unit Testing and Integration Testing

No alt text provided for this image

Lets take a Example:-

we have a mail application with modules:

  1. login page 
  2. Mailbox module
  3. Delete mail module

No alt text provided for this image

Challenges of Integration Testing

We’ve told a lot about how integration testing works and what advantages it brings. As usual, benefits come with some challenges. There are several factors that can make integration testing more complicated than you expect. Here are some examples of such situations: 

  • If too many people participate in code writing, and each has a different style, it makes it difficult to understand the logic of units. 
  • A combination of diverse factors (databases, platform, environment, etc.) can complicate the testing. 
  • Integrating two legacy systems is rarely seamless, as well as integrating a new system into the existing one. 
  • If a system meant for integration are developed by different teams, they can be incompatible.
  • Different approaches and testing combinations can make it difficult to choose the most efficient model.

Integration Testing Tips 

  • Always study software architecture and app design to prioritize the units and their combinations correctly. 
  • Always have a clear integration test strategy with test cases and test data outlined in it. The information should be easy to understand to all members of a QA team. 
  • Write test cases to cover all interface features. It should be a precise examination since the interface is the point of user interaction.
  • Don’t select test data on the go. Prepare the mock data before you proceed to actual tests.
  • Keep project documentation handy. Approach developers with questions regarding the functionality if something is not mentioned in the documents or is poorly described.
  • Make sure the development team has checked all the modules properly before handling software for you. 
  • Don’t neglect automation. It can be a real time-saver and deliver more accurate results. 

To view or add a comment, sign in

More articles by Vishwajeet Sharma

  • “A good day is a pay day"

    Employment Consultancy System What is Employment Consultancy System? Employability consultancy system helps freshers to…

    2 Comments

Others also viewed

Explore content categories