0% found this document useful (0 votes)
14 views

Top Down Testing

Uploaded by

717823z115
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Top Down Testing

Uploaded by

717823z115
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Top-Down Testing: An Overview

 Top-down testing is a software testing approach that starts with testing higher-level modules
or components before progressively moving down to test lower-level modules.
 It follows the hierarchical structure of the software system, beginning with the main or top-
level module and then integrating and testing subordinate modules until the entire system is
tested.

Methodology

1. Identify Top-Level Modules:

Begin by identifying the top-level modules or components of the software application. These
modules represent the highest level of abstraction in the system architecture.

2. Develop Stubs:

Since lower-level modules are not yet developed, stubs are created to simulate their behavior. Stubs
are simple programs or modules that mimic the functionality of the missing components.

3. Test Top-Level Modules:

Start testing the top-level modules using the stubs for the lower-level modules. This ensures that the
interaction between the top-level modules and the rest of the system is functioning correctly.

4. Gradually Integrate Lower-Level Modules:

As lower-level modules are developed, integrate them into the system one by one, replacing the
stubs. Each integration step is followed by testing to verify the functionality and interactions between
the integrated modules.

5.Repeat Until Complete:

Continue this process of integration and testing until all modules are integrated, and the entire
system is tested comprehensively.

In the Top-Down Testing approach:

1.Test User Interface: Begin testing the User Interface module, simulating the behavior of the
Transaction Processing and Database Operations modules using stubs.

2. Integrate Transaction Processing: Once the User Interface is tested, integrate the Transaction
Processing module and test its functionality in conjunction with the User Interface.

3. Integrate Database Operations: Finally, integrate the Database Operations module and test the
entire system to ensure seamless interaction between all modules.
Consider the development of an e-commerce website. In top-down testing:

- The shopping cart management module, a higher-level module, is tested first to ensure that it
interacts correctly with other modules such as user authentication and payment processing.

- The product catalog module, a lower-level module, is tested later, ensuring that it integrates
seamlessly with the shopping cart management module and provides accurate product information.

This approach allows testers to identify interface issues between modules early in the testing
process and ensure the overall functionality and integration of the e-commerce website.

Example:
Applications of Top-Down Testing:

1. Early Identification of Major Flaws: Top-down testing allows testers to identify major flaws or
issues in the overall system architecture early in the testing process. By focusing on testing higher-
level modules first, testers can detect fundamental design or integration problems before lower-level
modules are developed.

2. Interface Testing: This approach facilitates interface testing between modules by ensuring that
higher-level modules are tested with stubs or simulated versions of lower-level modules. It allows for
early identification of interface discrepancies or mismatches.

3. Progressive Integration: Top-down testing supports progressive integration of modules, where


higher-level modules are integrated first and then progressively integrated with lower-level modules.
Drawbacks of Top-Down Testing:

1. Dependency on Stubs: Top-down testing relies on stubs or simulated versions of lower-level


modules, which may not accurately reflect the behaviour of the actual modules. This
dependency can lead to incomplete or inaccurate testing results.

What is Stubs?

Stubs are temporary, simplified implementations of software components used in top-down


testing to simulate the behaviour of lower-level modules. They enable testing of higher-level
modules before the actual lower-level modules are developed, facilitating early identification of
interface discrepancies and integration issues.

2. Delay in Testing Lower-Level Modules: Testing of lower-level modules is deferred until higher-level
modules are developed and tested, potentially delaying the detection of issues specific to these
modules.

3. Limited Coverage of Lower-Level Functionalities: Since lower-level modules are tested later in the
testing process, there may be limited coverage of functionalities specific to these modules, leading to
gaps in test coverage.

You might also like