Integration Testing

Software Testing Part 8

Integration Testing

What is Integration Testing?

  • A system is made up of multiple components or modules comprising hardware and software.
  • Integration is defined as the set of interactions among components.
  • Testing the interaction between the modules and interaction with other systems externally is called integration testing.
  • Integration testing is done to make sure that the different components fit together.
  • The final round of integration involving all components is called Final Integration Testing (FIT), also known as System Integration.
  • Integration is both a phase and a type of testing.
  • 4 orders of integration testing : Top-down integration, Bottom-up integration, Bi-directional integration, System integration.

Top-Down Integration

Step Interfaces tested

  1. 1-2
  2. 1-3
  3. 1-4
  4. 1-2-5
  5. 1-3-6
  6. 1-3-6-(3-7)
  7. (1-2-5)-(1-3-6-(3-7))
  8. 1-4-8
  9. (1-2-5)-(1-3-6-(3-7))-(1-4-8)

  10. The integration starts with testing the interface between component 1 and component 2, then component 1 and 3 and so on.

  11. To optimize the number of steps in integration testing, steps 6 and 7 can be combined and executed as a single step.
  12. Similarly, steps 8 and 9 also can be combined and tested in a single step.

Bottom-Up Integration

Step Interfaces tested

  1. 1-5
  2. 2-6, 3-6
  3. 2-6-(3-6)
  4. 4-7
  5. 1-5-8
  6. 2-6-(3-6)-8
  7. 4-7-8
  8. (1-5-8)-(2-6-(3-6)-8)-(4-7-8)

  9. Bottom-up integration is just the opposite of top-down integration, where the components for a new product development become available in reverse order, starting from the bottom.

Bi-Directional Integration

Step Interfaces tested

  1. 6-2
  2. 7-3-4
  3. 8-5
  4. (1-6-2)-(1-7-3-4)-(1-8-5)

  5. Bi-directional integration is a combination of the top-down and bottom-up integration together to derive integration steps.

  6. Comes handy when migrating from a two-tier to a three-tier environment.

System Integration

System integration means that all the components of the system are integrated and tested as a single unit.

Integration testing, which is testing of interfaces, can be divided into two types:

  1. Components or sub-system integration
  2. Final integration testing or system integration

Instead of integrating component by component and testing, this approach waits till all components arrive and one round of integration testing is done.

This approach is also called big-bang integration. It reduces testing effort and removes duplication in testing.

Big bang integration is ideal for a product where the interfaces are stable with less number of defects.

While this approach saves time and effort, it is also not without disadvantages:

  1. When a failure or defect is encountered during system integration, it is very difficult to locate the problem, to find out in which interface the defect exists. The debug cycle may involve focusing on specific interfaces and testing them again.
  2. The ownership for correcting the root cause of the defect may be a difficult issue to pinpoint.
  3. When integration testing happens in the end, the pressure from the approaching release date is very high. This pressure on the engineers may cause them to compromise on the quality of the product.
  4. A certain component may take an excessive amount of time to be ready. This precludes testing other interfaces and wastes time till the end.

Choosing Integration Method

FactorsSuggested Integrated Method
Clear requirements and design.Top-down
Dynamically changing requirements, design, architecture.Bottom-up
Changing architecture, stable design.Bi-directional
Limited changes to existing architecture with less impact.Big bang

Integration Testing as a Phase of Testing

  • Starts from the point where two components can be tested together, to the point where all the components work together as a complete system, delivering the product functionality.
  • It tests how different components work in isolation and also when they are connected to each other.
  • Focuses predominantly on defects that arise due to combing various components.
  • Focuses on interfaces as well as usage flow.
  • When the functionality of different components are combined and tested together for a sequence of related operations, they are called scenarios.

Scenario Testing

  • Scenario testing is a planned activity to explore different usage patterns and combine them into test cases called scenario test cases.
  • Scenario testing is defined as a “set of realistic user activities that are used for evaluating the product.”
  • It is also defined as the testing involving customer scenarios.
  • Two methods to create scenarios : System Scenarios & Use-case/Role-based Scenarios

System Scenarios

System scenario is a method whereby the set of activities used for scenario testing covers several components in the system. Follow these approaches :

  1. Story line - Develop a story line that combines various activities of the product that may be executed by an end user.
  2. Life cycle/state transition - Consider an object, derive the different transitions/modifications that happen to the object, and derive scenarios to cover them.
  3. Deployment/implementation stories from customer - Develop a scenario from a known customer deployment/implementation details and create a set of activities by various users in that implementation.
  4. Business verticals - Visualize how a product/software will be applied to different verticals and create a set of activities as scenarios to address specific vertical businesses.
  5. Battle ground - Create some scenarios to justify that “the product works” and some scenarios to “try and break the system” to justify “the product doesn't work.”
  6. These approaches have to be used in combination, not in isolation

Use Case Scenarios

A use case scenario is a stepwise procedure on how a user intends to use a system, with different user roles and associated parameters.

Defect Bash

  1. Defect bash is an ad hoc testing where people performing different roles in an organization test the product together at the same time.
  2. Ad hoc testing means that the testing is unplanned.
  3. The testing by all the participants during defect bash is not based on written test cases.
  4. What is to be tested is left to an individual's decision and creativity.

Good Practices Encouraged By Defect Bash

  1. Enabling people cross boundaries and test beyond assigned areas.
  2. Bringing different people performing different roles together in the organization for testing. Testing isn't for testers alone.
  3. Letting everyone in the organization use the product before delivery.
  4. Bringing fresh pairs of eyes to uncover new defects.
  5. Bringing in people who have different levels of product understanding to test the product together randomly.
  6. Let testing doesn't wait for lack of/time taken for documentation.
  7. Enabling people to say “system works” as well as enabling them to “break the system”.

All the activities in the defect bash are planned activities, except for what to be tested. It involves several steps:

  1. Choosing the frequency and duration of defect bash.
  2. Selecting the right product build.
  3. Communicating the objective of each defect bash to everyone.
  4. Setting up and monitoring the lab for defect bash.
  5. Taking actions and fixing issues.
  6. Optimizing the effort involved in defect bash.

Conclusion

You can read other articles written by me through these links.

Software Testing Series
1. Fundamental Principles of Software Testing
2. Software Development Life Cycle Models
3. Quality Assurance vs Quality Control
4. Testing Verification vs Testing Validation
5. Process & Life Cycle Models For Testing Phases
6. White Box Testing
7. Black Box Testing
8. Integration Testing
9. System Testing
10. Regression Testing
11. Performance Testing
12. Ad Hoc Testing
13. Checklist & Template For Test Plan & Management
14. Software Test Automation

Operating System Series
1. Introduction & Types of OS
2. Process States & Lifecycle
3. System Calls
4. User Mode vs Kernel Mode
5. CPU Process Scheduling
6. Process Synchronization
7. Deadlocks
8. Memory Management
9. Disk Management & Scheduling
10. File System in OS
11. Protection & Security

System Design Series
Introduction To Parallel Computing
Deep Dive Into Virtualization
Insights Into Distributed Computing

Cloud Computing Series
1. Cloud Service Models
2. Cloud Deployment Models
3. Cloud Security
4. Cloud Architecture
5. Cloud Storage
6. Networking In The Cloud
7. Cloud Cost Management
8. DevOps In Cloud & CI/CD
9. Serverless Computing
10. Container Orchestration
11. Cloud Migration
12. Cloud Monitoring & Management
13. Edge Computing In Cloud
14. Machine Learning In Cloud

Computer Networking Series
1. Computer Networking Fundamentals
2. OSI Model
3. TCP/IP Model : Application Layer
4. TCP/IP Model : Transport Layer
5. TCP/IP Model : Network Layer
6. TCP/IP Model : Data Link Layer

Version Control Series
1. Complete Guide to Git Commands
2. Create & Merge Pull Requests
3. Making Open Source Contributions

Linux
Complete Guide to Linux Commands

Thanks For Reading! 💙
Garvit Singh