Integration testing is a part of software testing in which individual units are combined together and then tested as a group. It is usually done after unit testing. Integration testing is usually done to rectify the faults that occurred in interfaces and integrated units. Test drivers and test stubs can be used to assist in integration testing.
What is Integration Testing?
Integration testing is a software testing type to test the logically integrated software modules as a complete group. When software is developed it consists of various independent software modules that might be developed by different developers.
These modules might work well without any defect as an independent unit. But when they are integrated there are changes that bugs can arise while they interact with each other.
In short, their integration with one another may lead to new bugs that were otherwise not present in independent units. To detect such bugs integration testing is conducted.
The process focuses on the communication of data among different modules and is also known as ‘String Testing’, ‘I & T’ (Integration and Testing), or ‘Thread Testing’.
Examples of Integration Test Case
Integration test cases focus on interfaces & flow of data between the test modules. The focus here is integration links testing than testing module functionalities.
Let us take a website with ‘Login Page’, ‘Mailbox’ and ‘Delete emails’. Considering its testing the independent units here are integrated logically.
Let’s not focus on individual module testing rather will focus on the integration of each module with one and another.
Test Case ID | Test Case Objective | Test Case Description | Expected Result |
1 | Validate Login and Mailbox module interface link | Enter the required login credentials and click the Login button | Control transferred to Mail Box |
2 | Validate Mailbox and Delete Mails Module interface link | Select an email from the mailbox and click on delete | Chosen email sent to Deleted/Trash folder |
How to do Integration testing?
We have already read about different integration testing strategies, here is how to execute integration:
- Make a Tests Plan for your integration testing
- Prepare Test Scenarios, Cases, and Scripts.
- Execute the test Cases
- Prepare a report and tell the defects to the developers.
- Track and retest the defects.
- Repeat steps 3 and 4 till Integration testing is successful.
Brief Description of Integration Test Plans:
The integration test plan should include:
- Scopes and Out of Scopes Items.
- Roles and Responsibilities of the team.
- Pre-requisites if any.
- Testing environment.
- Risk and Mitigation Plans.
Entry and Exit Criteria of Integration Testing
Entry and exit criteria are very important
Here are they
Entry Criteria:
- Unit Tested Modules
- High prioritized bugs fixed and closed
- complete coding and integration of all modules successfully.
- Documentation of integration tests Plan, test case, scenarios.
- Test Environment
Exit Criteria:
- Successful execution of integration Testing
- Document of executed Test Cases
- High prioritized bugs fixed and closed
- Technical documents
- Release note
Method of Integration Testing:
Black box testing, white box testing and gray box testing methods can be used for integration testing.
- Black box testing is also known as behavioral testing. In this design, the internal structure and implementation of the item being tested are not known to the tester. Such tests can be functional or non-functional. Functional testing is the most used one.
- White box testing is also known as transparent box testing, code-based testing, structural testing, open box testing, clear box testing or glass box testing. In this method, design, internal structure and implementation of the item being tested are known to the tester.
- Gray box testing is a type of software testing which is a combination of black-box testing and white box testing.
Read Also: Popular Software Testing Misconceptions
Approaches in Integration Testing Services:
-
Big Bang Approach
In this approach, all the units are combined together and tested at one go. It is usually done when the testing team receives the software as a bundle. Big Bang integration testing tests only the faults in interaction between the units.
It is usually done when the testing team receives the software as a bundle. Big Bang integration testing tests only the faults in interaction between the units.
Advantages:
- More convenient for small systems
Disadvantages:
- It is difficult for fault localization
- Some interface link can be easily neglected
- The testing team will get only less time for execution
- As all modules are tested together, there will be no separate priority given for highly risky critical modules and peripheral modules
2. Incremental Approaches
Logically related two or more modules are joined together and tested.
An incremental approach can be done in two methods:
a. top-down
b. bottom-up
a. Top-Down Approach
In this approach, top-level units are tested first and then lower-level units are tested step by step. In order to stimulate lower-level units test stubs can be added. Test stubs may not be available during the initial phases.
Advantage:
- Easier fault localization
- The prototype can be obtained early
- Design flaws of critical modules can be found and fixed
Disadvantage:
- Need for several stubs
- Lower level modules are tested badly
b. Bottom-up approach
Here bottom levels are tested first and then top levels are tested step by step. Here testers stimulate higher-level units which may not be available during the initial phases.
Advantage:
- Easier fault localization
- No time wasted for unnecessary testing of all modules
Disadvantage:
- Higher probability for defect as they test critical modules at the very last moment
- No possibility for an early prototype
3. Sandwich or Hybrid Approach
This approach is an integration of bottom-up and top-down approaches. Hence the advantages of top-down and bottom-up approaches can be applied here also.
You May also Like: 6 Automation Tools for iOS App Testing
Procedures to be followed for integration testing:
a. Develop the integration test plan
b. Cases, scripts and test scenarios are to be designed
c. Test cases are executed and reporting the defects
d. Defects are tracked and re-tested
e. Repeat step 3 and step 4 after the successful completion of integration testing services
Best practices for integration testing services:
-
Determine an acceptable integration test strategy and develop test cases and accordingly test data
-
Analyze the application’s architecture design and identify the critical module.
-
Interface design can be obtained from the architectural team and you can create test cases to verify all of the interfaces. Interface to external hardware, software application and interface to application must be tested thoroughly.
-
After completing the test case, the next task is to test data
-
While executing test cases, it is advisable not to select test data
Integration testing is one of the easiest types of software testing and is one of the crucial steps in the software development life cycle.