Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

software testing

What is bottom-up testing?

Kainat Asif

Integration testing is used to test two or more modules that are unit tested together as a group. There are four types of integration testing:

  • Big-bang testing
  • Bottom-up testing
  • Top-down testing
  • Sandwich testing

Bottom-up testing

Bottom-up testing is a type of integration testing that integrates modules from the bottom first and then moves upward in the control flow graph until all modules are tested. Bottom-up testing is also called inductive reasoning.

Driver

Driver is a temporary module that is used to call the interface procedures of the module to be tested and report the results. Drivers are used in bottom-up testing to simulate the caller module for a module to be tested.

Advantages of bottom-up testing

  • Disjoint subsystems can be tested simultaneously.

  • Useful for integration testing of object-oriented systems, real-time systems, and systems with strict performance requirements.

  • Lower modules can be tested even if their caller modules are not developed yet using drivers.

Disadvantages of bottom-up testing

  • If a large number of subsystems exist at the same level, bottom-up testing becomes similar to big-bang testing.

  • The whole system integrated together is tested last.

  • Driver modules are needed.

Examples

Example 1

Consider the control flow graph of a system shown below:

Bottom-up testing

The integration testing of the system shown above using the bottom-up approach will be as follows:

  • Session 1: B, Driver(A)
  • Session 2: C, Driver(A)
  • Session 3: A, B, C

Explanation

  • Session 1: Module B will be tested with the driver of module A.
  • Session 2: Module C will be tested with the driver of module A.
  • Session 3: Modules A, B, and C will be tested together.

Example 2

Consider the control flow graph of a system shown below:

Bottom-up testing

The integration testing of the system shown above using the bottom-up approach will be as follows:

  • Session 1: E, Driver(B)
  • Session 2: F, Driver(B)
  • Session 3: E, F, Driver(B)
  • Session 4: G, Driver(D)
  • Session 5: H, Driver(D)
  • Session 6: G, H, Driver(D)
  • Session 7: E, F, B, Driver(A)
  • Session 8: C, Driver(A)
  • Session 9: G, H, D, Driver(A)
  • Session 10: A, B, C, D, E, F, H

Explanation

  • Session 1: Module E will be tested with the driver of module B.
  • Session 2: Module F will be tested with the driver of module B.
  • Session 3: Modules E and F will be tested with the driver of module B.
  • Session 4: Module G will be tested with the driver of module D.
  • Session 5: Module H will be tested with the driver of module D.
  • Session 6: Modules G and H will be tested with the driver of module D.
  • Session 7: Modules E, F, and B will be tested with the driver of module A.
  • Session 8: Module C will be tested with the driver of module A.
  • Session 9: Modules G, H, and D will be tested with the driver of module A.
  • Session 10: All modules will be tested together.

RELATED TAGS

software testing

CONTRIBUTOR

Kainat Asif
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring