Integration Testing: Definition and Approaches
testing

Integration Testing: Definition and Approaches

Kin

To ensure that the software product is error-free before it is released, it is necessary for the product to go through a testing process. The necessary tests for such software are all encapsulated in the name of Integration test. However, do you understand what Integration testing is?

1. What is Integration testing?

1.1 Definition of Integration Testing

Integration Testing is also known as integration and testing (abbreviated to I&T). Integration Testing can be considered as a type of testing in which the application modules are appropriately integrated and tested as a group.

Integration Testing is executed right after Unit Testing is finished and before System Testing is executed.

1.2 Why is Integration Testing necessary?

Integration Testing is one of very important procedures in software testing.

Although software modules were tested in Unit Testing to find and discover defects, you can not skip Integration Testing. Integration Testing tests whether modules are appropriately integrated, make sure the software project does not have any unexpected errors.

1.3 Reasons of Integration Testing:

1. Because each module is developed by many different developers, Integration Testing is necessary to make sure consistency of software.

2. The customers usually require sudden changes at the time module development. In many cases, those changes may be not tested and fixed in previous unit testing.

3. After integrating modules with each other, there can be a case that is not compatible with general configuration of system. At that time, it is necessary to test and solve.

1.4 Examples of Integration Testing

There are 3 modules” Login. Mailbox and Delete Mail

Below are integration testing cases:

Case ID

Purpose of testing

Description

Expected result

1

Testing interfaces connection between Login and Mailbox module

Input login information and click “Log in” button

Login mail will be sent to Mailbox

2

Testing interfaces connection between Mail and Delete Mail module

From Mailbox, select a mail and click “Delete” button

Selected mail will be Deleted /Trash folder

2. Approaches of Integration Testing

2.1 Big bang approach

According to this approach, all modules are combined and tested at the same time.

2.1.1 Advantages:

There is no problem for small system.

2.1.2 Disadvantages:

- Some interface connections which is necessary to be tested are skipped easily

- Because Integration Testing can only begin after all of modules are designed, the testing team will have less execution time during the testing phase

- Since all of modules are tested at the same time, high risk critical modules are not prioritized and tested separately

2.2 Incremental Integration Testing approach

In this approach, testing is performed by combining two or more logic related modules. Then other related modules are added and tested for proper functionality. The process continues until all modules are successfully joined and tested.

This process is done by using dummy programs called Stubs and Drivers.

2.2.1 What is Stub and Driver?

Stub: When you need to test method A, but method A needs data from method B, and method B has not been developed. In this case, we can simulate a method B to get data to help us test method A, then simulation method B will be called Stub. Stub is known as called module.

Driver: in contrast to Stub, when we need to test Module B or method B but need to go through Module A or method A to test B, then we can simulate Module A or method A in order that we have can test B, then simulation method A is called Driver. Driver is known as calling module.

2.2.2 Bottom-up approach

In the Bottom-up approach, each module in the lower levels is tested before. These tested modules are then used to be conditions for testing the higher modules until all modules are tested. At this point, it will need Driver's support in testing.

2.2.2.1 Advantages:

- It is early to discover bugs in each module

- Have not waste time for waiting for all modules are developed (different from Big bang approach)

2.2.2.2 Disadvantages:

- Since critical modules (the highest levels) are tested last and can be error-prone

- Building a prototype from scratch is impossible

2.2.3 Top-Down approach

In the Top-down approach, testing takes place from top to bottom according to the control flow of the software system. At this time, you will need Stubs' support in testing.

2.2.3.1 Advantages:

- It is easier to discover bugs in each module

- Building a prototype from scratch is possible

- The critical modules are test first, major bugs can be found and fix in advance

2.2.3.2 Disadvantages:

- Need more stubs

- Lower modules are not tested fully

2.2.4 Sandwich approach

It is also known as hybrid approach and is combination of Bottom up and Top-down approach. Top modules are tested with lower modules and lower modules are integrated with top modules and tested. In this approach, you will need both stubs and drivers.

Advantages of the sandwich approach is combination of the advantages of both Bottom-up and Top-down approach.

3. Conclusion

Integration testing is a very important step during the testing process. Is the software quality assured or not? Whether the system operates according to the user's requirements or not? All will be checked through this step.