Se PDF
Se PDF
1. Unit Testing
2. Integration Testing
3. System Testing
4. Black Box Testing
5. White Box Testing
• Ensures Software Quality: Validates the software meets quality standards
and functions as expected.
• Detects Bugs Early: Identifies defects early, reducing cost and effort in
fixing them.
• Ensures Proper Functionality: Verifies that features work as intended.
• Enhances Security: Detects vulnerabilities and ensures data protection.
• Maintains Compatibility: Confirms software works across different
environments (OS, browsers, devices).
• Ensures Performance: Validates the system's behavior under various
conditions.
• Reduces Failure Risk: Mitigates the chance of system crashes or major
defects.
• Ensures Requirement Compliance: Verifies software meets user/client
requirements.
• Facilitates Future Enhancements: Easier maintenance and improvements.
• Provides Confidence for Release: Assures readiness for production
deployment.
Integration Testing is the phase of software testing where
individual modules are combined and tested as a group. The
primary goal is to verify the functional correctness and
interoperability of the integrated units/modules.
Testing Approach:
• Step 1: Begin testing the UI module, simulating user actions like product search, selection, and adding to
the cart.
• Step 2: Use a stub for the business logic that provides basic responses, like adding items to the cart
successfully, without actually processing them.
• Step 3: Once the business logic is developed, integrate it and re-test the entire interaction between the UI
and business logic (e.g., order processing).
• Step 4: Replace the stub for the database module with actual database calls, ensuring that the correct
data is fetched, updated, and maintained for each transaction.
Bottom-Up Testing is a testing approach in software engineering
where testing begins from the lower or foundational levels of the
software system and progresses upwards toward the higher-level
components. In this method, individual modules or components
are tested first, and once they are verified, the integration of these
modules is tested. This approach is commonly used when the
lower-level components are more critical to the system's
functionality.
Testing Approach:
• Step 1: Begin testing the Data Access Layer, ensuring it correctly performs CRUD operations on the
database.
• Step 2: Create a driver for the Business Logic Layer that simulates user interactions, providing inputs like
book ID and user details.
• Step 3: Test the Business Logic Layer using the driver, verifying that it integrates correctly with the Data
Access Layer.
• Step 4: Once the Business Logic Layer is validated, replace the driver with the actual UI and test the entire
flow of borrowing a book.
• Step 5: Conduct system tests to ensure all integrated components function harmoniously.
Aspect Top-Down Testing Bottom-Up Testing
Definition Testing starts from the high-level components and progresses Testing begins from the lower-level components and progresses upwards
downwards to lower-level components. to higher-level components.
Test Focus Focuses on verifying the high-level control logic and decision- Focuses on validating low-level functionalities and components first.
making early.
Use of Stubs/Drivers Stubs are used to simulate lower-level modules that are not yet Drivers are used to simulate higher-level modules that are not yet
developed. developed.
System Integration Integration happens from top to bottom, ensuring that high-level Integration occurs from bottom to top, ensuring that low-level modules
components work before integrating lower-level modules. work before integrating higher-level components.
Detection of Integration Early detection of issues in the control logic and high-level Early detection of issues in the low-level functionalities and basic
Issues functionalities. modules.
Test Development Time Requires less time to start, as the top-level control modules are Requires more time to set up, as testing begins with low-level modules,
tested early, but stubs are needed. but drivers are needed.
Complexity Handling Suitable for systems where high-level control logic is complex and Suitable for systems where low-level components are critical and require
needs to be validated first. rigorous testing.
System-Level Perspective Provides a high-level, system-oriented view early in the testing Provides a detailed, module-level view initially, focusing on building up a
process, focusing on control and flow. working system from lower components.
Error Detection Errors in low-level modules may be detected late in the process Errors in high-level logic may be detected late, after integrating the
when lower-level components are integrated. control flow with other components.
When to Use When the system's control logic and overall architecture are When the system is built from the ground up with critical low-level
complex and need to be validated early. components that need to be thoroughly tested.
Advantages - Early discovery of major design and interface issues. - Early detection of foundational issues in critical low-level components.
- High-level decision-making and control flow can be tested. - Useful for parallel module development.
- Stubs help in isolating lower-level modules. - Tested low-level components can be reused across the system.
Disadvantages - Stubs might be time-consuming to implement. - Drivers may be complex to develop.
- Lower-level functionality may not be tested until later stages. - Higher-level issues may remain undiscovered until later.
Hybrid Testing, also known as Sandwich Testing, is a combination of
both Top-Down and Bottom-Up Testing approaches. In this testing
method, testing is carried out from both directions simultaneously —
top-down for high-level modules and bottom-up for lower-level
components. The middle-level modules are typically tested last when
both top-down and bottom-up tests meet. This allows for early
detection of issues in both control logic and lower-level functionality.
Testing Approach:
• Step 1: Define the Testing Scope, i.e., Determine the areas of the application that will benefit from manual
testing versus automated testing.
• Step 2: Select the Appropriate Testing Tools, i.e., Choose suitable automation tools for repetitive tasks
and decide on manual testing techniques for exploratory scenarios.
• Step 3: Develop Test Cases, i.e., Create a combination of manual and automated test cases based on the
defined scope.
• Step 4: Execute Testing, i.e., Conduct automated tests to verify critical functionalities, followed by manual
testing for scenarios that require human judgment. Maintain an iterative approach, refining both sets of
tests based on outcomes.
• Step 5: Review and Analyze Results, i.e., Analyze the results from both testing methodologies. Identify any
defects and areas for improvement, then address them in the subsequent testing cycles.