You are on page 1of 15

Top-down Testing

Group-(1)
Meet our group members

Wai Phyo Linn Kaung Thiha

Aung Kaung Myat Shwe Yee Shoon Lei Khaing


Table of contents

Testing
Strategies 01 03 How it works

Top-down
testing 02 04 Advantages and
disadvantages
Testing Strategies
• A testing strategy is general
approach to the testing process
rather than a method of devising
particular system or component
tests.

• Different testing strategies may


be adopted depending on the type
of system to be tested and the
development process used.
Testing strategies are-

(1)Top-down testing
(2)Bottom-up testing
(3)Thread testing
(4)Stress testing
(5)Back-to-back testing
What is top-down testing?
Top-down testing is a type of incremental integration testing approach .

Testing is done by integrating or joining two or more modules by moving from top to
bottom through control flow of architecture structure.

In these, high-level modules are tested first and then low-level modules are tested.
Finally, integration is done to ensure that system is working properly.
Stubs and Drivers

Stubs and Drivers are the dummy programs in Integration testing


used to facilitate the software testing activity. They act as a
substitutes for the missing models in the testing. They do not
implement the entire programming logic of the software module but
they simulate data communication with the calling module while
testing.

Stub: Is called by the Module under Test.


Driver: Calls the Module to be tested.
• Stubs are mainly used in top-down integration testing.
• On the other hand, drivers are mainly used in bottom-up integration
testing individually and designed the enhance the testing process.
How it works?
It starts with testing the overall functionality of the system and gradually moves
forwards testing the individual modules or components.

The testing process begins with the top-most module, usually the main module
or the module that is closest to the user interface.

The lower-level modules or components are simulated or stubbed out to create a


test environment.

The main steps involved in the top-down testing process are as follows:

1.Start with the main module


2.Simulate lower-level modules
3.Test the main module
4.Gradually move to lower-level modules
Top-Down Testing Strategy in Action

Top-down testing is a strategy used when developing a mobile app.


Testing starts at the highest level, testing the user interface and overall
functionality. Once this is done, testing proceeds to smaller parts like
features and functions, allowing for early issue detection and ensuring
everything works together.

Testing a new website is also an example of top-down strategy where the


overall design and functionality are tested first. After these components
are tested and functional, the testing progresses to lower levels like
individual pages and links. This helps detect major issues early and
ensures user-friendly and easy-to-navigate website.
Here's an example of top-down testing for a
simple web application:

• Start with testing the main module, such as the homepage of the website.

• Use stubs to simulate lower-level modules, like the user authentication


and database modules.

• Test the integrated components by replacing the stubs with the actual
implementations of the user authentication and database modules.

• Continue testing other high-level modules, such as different sections of


the website (e.g., product listing, shopping cart).

• Gradually replace stubs with real implementations of lower-level modules,


ensuring smooth integration and functionality at each level.
Program System
Module A

Module A.1 Module A.2

Module A.1.1 Module A.1.2 Module A.2.1 Module A.2.2


Advantages Disadvantages

 Early verification of system  Dependency on stubs


architecture
 Delayed detection of lower-level
 Error identified at an early defects
stage
 Test output may be difficult to
 Prioritizing critical functionality observe

 Facilitates test planning  Testing is not appropriate for


object-oriented systems.
Any questions?

You might also like