Sandwich Testing – Software Testing
Sandwich Testing combines the bottom-up and top-down approaches, so it uses the advantage of both the bottom-up and top-down approaches. Initially, it uses the stubs and drivers where stubs simulate the behavior of a missing component. It is also known as Hybrid Integration Testing.
Purpose of Sandwich Testing
- Entire Coverage: Sandwich testing tests a system’s high-level and low-level modules concurrently to give full coverage.
- Early Integration Problem Identification: It assists in identifying integration problems early in the testing process by testing from both ends and coming together in the middle.
- Incremental Testing: It is compatible with the incremental testing methodology, which integrates and tests components one at a time. A large software system’s complexity can be better managed with the help of this steady technique.
- Effective Use of Resources: Sandwich testing uses testing resources more effectively by testing components simultaneously.
- Component Interface Verification: The connections between high-level and low-level components are verified by sandwich testing.
- Testing and Development in Parallel: Testing and development can happen in parallel because of sandwich testing. High-level and low-level modules can be worked on by developers simultaneously and testing can start before all components are finished.
Prerequisite – Software Testing | Basics, Types of Software Testing
Strategy used in Sandwich Testing
- It combines both top-down and bottom-up strategies.
- Sandwich testing is basically viewed as 3 layers:
- Main target layer
- A layer above the target layer
- A layer below the target layer
- In sandwich testing, testing is mainly focused on main target layer. This testing is selected on the basis of system characteristics and structure code.
- It tries to minimize the number of hubs and drivers when there are more than 3 layers.
How to Perform Sandwich Testing?
There are 3 simple steps to perform sandwich testing which are given below:
- Test the user interface in isolation using stubs.
- Test the very lowest-level functions by using drivers.
- When the complete system is integrated only main target (middle) layer remains for final test.
Advantages of Sandwich Testing
- Sandwich Testing approach is used in very large projects having subprojects.
- It allows parallel testing.
- It is a time-saving approach.
- It performs more coverage with same stubs.
- It can be used to test both the functional and non-functional aspects of a system.
- It can be used to test systems with complex dependencies.
- It can be used to test systems with complex data structures.
- It can be used to test systems with complex algorithms.
- It is an effective way to test both the functionality and the performance of an application.
- It is a well-defined process that can be easily repeated and documented.
- It can be used to test applications of all sizes and complexity.
- It is an efficient way to test applications that have a lot of functionality.
Disadvantages of Sandwich Testing
- Sandwich Testing can not be used for such systems which have a lot of interdependence between different modules.
- In sandwich testing the need for stubs and drivers is very high.
- It is expensive to set up and maintain the necessary infrastructure.
- here is a risk that the test environment may not be representative of the production environment, which could lead to inaccurate results.
- There is a potential for human error when manually transferring data between the two environments.
Share your thoughts in the comments
Please Login to comment...