Integration Testing

IT1_Final

Integration testing is a level of software testing where individual units are combined and the connectivity or data transfer between these units are tested. The main aim of this testing is to recognize the interface between the modules.

Problems Before Integration Testing:

In software testing, although each level of unit testing is done still it shows errors at different levels. For example, a module in general is usually designed by an individual developer who can face issues such as different programming logic, change in user requirements, database issues, inadequate exception handling, etc., at such time unit test stuck at levels developed by developers at different levels.

These types of issues cannot be handled at unit testing level. Hence testers have to perform integration testing. Similarly, user may have external hardware failure issues as well, even after performing each level of unit testing for each module where users face problems. Solution to this is integration testing.

This level test how the unit test work together. Individual modules are combined and tested as a group. Integration testing helps to determine and ensures that applications run properly. It identifies interface issues between modules.

Different Approaches to Integration Testing:

There are three approaches to integration testing.

  1. Top-down Approach (TDA):

In TDA testing takes place from top to bottom following the control flow or architectural structure. High level modules are tested first then low-level modules and finally getting into the low level to high level. The diagrammatic flow will show you the top-down approach.

IT2

Fig: Top-down Approach

Advantages:

Extremely consistent.

Less time required.

Fault localization is easier.

Detects major flaws.

Disadvantages:

Requires several stubs.

Poor support for early release.

Basic functionality is tested late.

  1. Bottom-up Approach (BUA):

This method of testing takes place from the bottom of the control flow upwards.

IT3

Fig: Bottom-up Approach

Advantages:

Efficient application.

Less time requirements.

Test conditions are easier to create.

Disadvantages:

Requires several drivers.

Data flow is tested late.

Poor support for early release.

Key interface defects are detected late.

  1. Big-Bang Approach (BBA):

In this approach, all components or modules are integrated simultaneously after which everything is tested as a whole.

IT4

Fig: Big-Bang Approach

Advantages:

All components tested at once.

Convenient for small systems.

Saves testing time.

Disadvantages:

Lots of delay before testing.

Difficult to trace cause of failures.

Possibility of few missing interface links.

Critical modules are not prioritized.

Sandwich Integration Approach:

To overcome the limitations and exploit the advantages of these top-down, bottom-up and big-bang approaches, we have something called Sandwich integration approach. It is a mixture of top-down and bottom-up approach.

In this approach, the system is viewed as 3 layers consisting of the main target layer in the middle, another layer above the target and last below the target layer.

Below diagram will clearly demonstrate the sandwich integration approach.

IT5

Fig: Sandwich Integration Approach

Sandwich integration approach is very useful for large enterprises for huge projects that have several sub-projects. When developers use spiral model for large projects, at that time one can also use sandwich integration approach.

Advantages:

Both layers can be tested in parallel.

Disadvantages:

High cost, big skill set, extensive testing is not done.

How to do integration testing?

First a tester must prepare a test plan, then design test cases, test scenarios according to the plan. Execute the test cases followed by reporting of defects. Now, track and  read these defects as soon as they arise. Then follow the entire process again and again until the entire system is tested. So, this is how one can perform integration testing.

The below diagram will show you clearly how to perform integration testing.

IT6

Fig: Steps to perform Integration Testing

Example of Integration Testing:

Consider an application with three modules. Login page, mailbox and delete emails. All these modules are integrated logically by programmers.

Priority here is given to the integrated links instead of unit functions that are tested in advanced. So you do not have to focus on testing the login page as it is already done at unit testing. User should focus on its interface links in the mailbox page. Similarly, check the interface links of mailbox with the delete email module.

IT7

Fig: Example of Integration testing

Challenges of Integration Testing:

Integration testing also has challenges that user might come across. For example;

  1. Difficult test data management.
  2. Multiple ways for testing.
  3. Issues when integrated with legacy system.
  4. Challenging test cases.
  5. Time constraints.

Steps to Kick of Integration Testing:

  1. Focus on architecture of application.
  2. Identify each module.
  3. Check how data is communicated.
  4. Understand the user requirements.
  5. Create multiple test conditions.
  6. Focus on one test conditions at a time.

Advantages of Integration Testing:

  1. Integration testing makes ensures modules work together properly.
  2. Helps to uncover errors that lie in interfaces.
  3. Ensures that newly added components are not affected.

Summary!

Integration testing is an important part of testing cycle that makes it easy to find defects when two or more units are integrated.

Leave a Reply