Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

top to bottom
topdown
testing

What is the top to bottom approach in testing?

Arslan Tariq

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

In testing, the top to bottom approach refers to carrying out testing from top to bottom, according to the control flow of the system. We test the higher-level modules first, and then the lower-level modules.

Let’s understand the top to bottom approach through the following illustration.

%0 node_1 Main Module node_2 Sub-Module node_1->node_2 node_3 Sub-Module node_1->node_3 node_1643028901748 Sub-Module node_2->node_1643028901748 node_1643029000116 Sub-Module node_3->node_1643029000116 node_1643028930479 Sub-Module node_3->node_1643028930479
Main module is divided into sub-modules

Let’s suppose we want to test a system as shown in the above illustration. The main module is divided into sub-modules. In top to bottom approach, the main modules will be tested first, and then the sub-module, following the flow from top to bottom.

Advantages:

  • It’s easy to locate mistakes.
  • Test high-priority modules first.
  • There’s a possibility to obtain early prototypes.
  • Major design flaws can be detected and corrected.

Disadvantages:

  • A lot of stubs are required.
  • Lower-level modules are under-tested.

RELATED TAGS

top to bottom
topdown
testing

CONTRIBUTOR

Arslan Tariq
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring