Testing Strategies
- Software testing is a process which involves a set of activities that can be planned in advance and conducted systematically.
- Testing is required in order to show that the software does what it is intended to do and to discover defects in the software if any, before it is put into use.
- Software testing accomplishes the following in the process of developing good quality software:
- Checks whether the software being developed meets the requirements specified by the user
- Establishes the confidence on software in order to ensure that the software is good enough for its intended use
- Verification is a kind of test that answers the question: Are we building the product right?
- It verifies that the software being developed meets the stated functional and non-functional requirements specified in the Requirements Specification Document.
- This checking process begins as soon as the requirements are identified and documented and continues throughout all stages of the development process.
- Validation is a more generic term in software testing.
- It helps in answering the question! "Have we developed the right product?"
- It ensures that the software has met all the requirements (expectations) of the customer.
- It goes beyond checking conformance with the specification to demonstrate that the software performs what the customer expects it to do.
- System Requirements
- Design Models
- Source Code and
- Proposed Test Results
- Testing begins at the component level and works "outward" toward the integration of the entire system.
- Testing is conducted by the developer of the software and (for large projects) an independent test group.
- A strategy for testing gives guidance for the practitioner and managers as follows:
- Testing has to be done at two different levels: low-level and high-level. Low-level tests verity that the small unit of software (called modules) are functioning properly and high-level tests validate the entire system and its functionality against customer requirements.
- Different techniques are available for testing (different) software built using different models of software engineering. choosing the appropriate (right) technique for testing at different point in time needs planning.
- Testing and Debugging are different activities, but debugging must be accommodated in any testing strategy.
- To perform effective testing, effective technical reviews are to be conducted. By doing this, many errors will be eliminated before testing commences.
- Verification and Validation (V&V) are two different tasks involved in testing. Verification ensures that software being developed correctly Implements a specific function. Whereas, validation ensures that the software has been built is traceable to customer requirements.
- Quality is incorporated into software throughout the process of software engineering. But the quality is tested during the testing phase of software development. Proper application of methods and tools, effective technical reviews, and solid management and measurement all lead to quality that is confirmed during testing.
The key elements of a strategic testing approach include:
-
Define Testing Objectives:
Clearly state what the testing aims to achieve — such as detecting defects, ensuring performance, or verifying compliance with requirements. -
Develop a Test Plan:
Outline the scope, resources, schedule, tools, and responsibilities for testing activities. -
Select the Appropriate Testing Levels:
Include different levels of testing such as:- Unit Testing: Testing individual components.
- Integration Testing: Checking interaction between modules.
- System Testing: Evaluating the complete system’s functionality.
- Acceptance Testing: Ensuring the product meets user needs.
-
Choose Testing Types and Techniques:
Apply suitable testing methods (functional, performance, security, usability, etc.) and techniques (black-box, white-box, or gray-box). -
Define Entry and Exit Criteria:
Specify the conditions that must be met before starting and finishing testing phases. -
Automate Where Possible:
Use automation tools to improve efficiency, especially for regression and performance tests. -
Measure and Monitor:
Track metrics like defect density, test coverage, and test execution rate to evaluate progress and quality. -
Continuous Improvement:
Review results, identify weaknesses, and refine testing processes for future projects.
In short, a strategic approach ensures testing is proactive, structured, and quality-focused, leading to a reliable and maintainable software product.
Test Strategies for Conventional Software:
Test strategies for conventional software (developed using traditional models like the Waterfall or V-Model) focus on structured, phase-wise testing that aligns with the software development life cycle.
These strategies ensure systematic defect detection and quality assurance.
The main test strategies include:
-
Unit Testing:
- Conducted by developers.
- Tests individual components or modules for correctness.
- Uses techniques like white-box testing.
-
Integration Testing:
- Tests the interfaces and interaction between integrated modules.
- Common approaches:
- Top-Down Integration
- Bottom-Up Integration
- Big-Bang Integration
-
System Testing:
- Performed after all modules are integrated.
- Verifies that the complete system meets the specified requirements.
- Includes functional and non-functional testing (performance, reliability, etc.).
-
Acceptance Testing:
- Conducted by end users or clients.
- Ensures the system satisfies business needs and is ready for deployment.
- Types: Alpha testing (in-house) and Beta testing (user environment).
-
Regression Testing:
- Re-execution of previously passed tests after changes are made.
- Ensures that new code has not introduced defects in existing functionality.
-
Validation and Verification Testing:
- Verification: “Are we building the product right?” — focuses on design and development correctness.
- Validation: “Are we building the right product?” — ensures final software meets user needs.
-
Performance and Stress Testing:
- Evaluates the system’s behavior under load, stress, or high-traffic conditions.
In summary, a conventional software test strategy follows a structured, sequential approach, ensuring each phase of development is thoroughly tested before moving to the next — maintaining stability, reliability, and quality in the final product.
Black-Box and White-Box testing:
Black-Box Testing and White-Box Testing are two fundamental approaches of software testing that differ mainly in their focus and knowledge of the system’s internal structure.
Black-Box Testing:
Definition:
Black-box testing is a testing technique where the tester does not know the internal workings of the software. The focus is on checking whether the software behaves as expected based on input and output.
Key Points:
- Tests the functionality of the software.
- Testers do not look at the code or internal logic.
- Inputs are given and outputs are verified against expected results.
Techniques Used:
- Equivalence Partitioning
- Boundary Value Analysis
- Decision Table Testing
- State Transition Testing
Advantages:
- Tester’s view is similar to the end-user’s perspective.
- Useful for validation testing (does the system meet requirements?).
- No programming knowledge required.
Disadvantages:
- Cannot find hidden errors in the code structure.
- Limited coverage since internal paths are not tested.
Example:
If you enter a username and password in a login page, the tester checks if correct inputs allow access and wrong ones don’t — without looking at how authentication is coded.
White-Box Testing:
Definition:
White-box testing (also known as Structural or Glass-box testing) examines the internal structure and logic of the code. The tester knows how the system works and designs tests based on the code.
Key Points:
- Tests the internal logic, loops, and conditions in the code.
- Requires programming knowledge.
- Focuses on code coverage (statement, branch, path coverage).
Techniques Used:
- Statement Coverage
- Branch Coverage
- Path Coverage
- Condition Coverage
Advantages:
- Helps find hidden errors in logic or code structure.
- Enables optimization of code paths.
- Ensures complete coverage of possible execution paths.
Disadvantages:
- Time-consuming and requires technical expertise.
- Not practical for large systems with complex code.
Example:
A tester examines the source code of a login function to ensure all branches (correct login, wrong password, blank input) are properly handled.
Comparison Summary:
| Aspect | Black-Box Testing | White-Box Testing |
|---|---|---|
| Focus | Functionality | Code structure |
| Tester’s Knowledge | No knowledge of code | Full knowledge of code |
| Type | Functional testing | Structural testing |
| Techniques | Equivalence partitioning, boundary value analysis | Statement, branch, path coverage |
| Used In | Validation testing | Verification testing |
| Example | Testing login form with inputs | Testing logic inside login code |
Validation Testing:
Validation Testing is the process of checking whether the developed software meets the user’s needs and requirements.
It answers the question: “Have we built the right product?”
Purpose:
The goal of validation testing is to ensure that the final software system satisfies the intended use and performs as expected in the real-world environment.
Key Features:
- Focuses on external behavior of the system.
- Ensures the software conforms to business requirements.
- Conducted after verification activities.
- Usually performed at the end of the development cycle or during acceptance testing.
Techniques Used in Validation Testing:
- Functional Testing – Checks if the system’s functions work as specified.
- System Testing – Tests the complete integrated system as a whole.
- Acceptance Testing – Conducted by the client or end-users to confirm the software meets their expectations.
- User Interface (UI) Testing – Ensures that the software is user-friendly and behaves as expected.
Steps in Validation Testing:
- Review Requirements – Understand what the user expects.
- Prepare Test Cases – Based on functional specifications.
- Execute Tests – Run the software in real or simulated environments.
- Compare Results – Check if actual results match expected outcomes.
- Report Issues – Log any deviations or defects found.
Example for Validation Testing:
If the requirement states that “The system should allow users to reset their password via email,”
then validation testing will:
- Test if the “Forgot Password” feature exists,
- Check if an email with a reset link is sent,
- Confirm the link correctly allows password change.
Difference Between Verification and Validation:
| Aspect | Verification | Validation |
|---|---|---|
| Focus | Ensures the product is built correctly | Ensures the right product is built |
| Question Answered | “Are we building the product right?” | “Have we built the right product?” |
| Based On | Design and specifications | User needs and requirements |
| Performed By | Developers and testers | End-users or QA team |
| Examples | Reviews, walkthroughs, inspections | System testing, acceptance testing |
Alpha Vs. Beta Testing:
Alpha Testing:
- Alpha Testing is an internal type of user acceptance testing, performed by internal staff in a controlled lab environment before the product is released to external testers.
- It's done to identify bugs and issues early in the development cycle.
Beta Testing:
- Beta Testing is an external type of user acceptance testing where a select group of real users or customers test the product in their own environment.
- Beta Testing is typically the final testing phase before the product is shipped to the public
Following are the differences between Alpha and Beta Testing:
Alpha Testing | Beta Testing |
|---|---|
| Alpha testing involves both white box and black box testing. | Beta testing commonly uses black-box testing. |
| Alpha testing is performed by testers who are usually internal employees of the organization. | Beta testing is performed by clients who are not part of the organization. |
| Alpha testing is performed at the developer’s site. | Beta testing is performed at the end-user, the of the product. |
| Reliability and security testing are not checked in alpha testing. | Reliability, security, and robustness are checked during beta testing. |
| Alpha testing ensures the quality of the product before forwarding it to beta testing. | Beta testing also concentrates on the quality of the product but collects the user's time-long input on the product and ensures that the product is ready for real-time users. |
| Alpha testing requires a testing environment or a lab. | Beta testing doesn’t require a testing environment or lab. |
| Alpha testing may require a real-time long execution cycle. | Beta testing requires only a few weeks of execution. |
| Developers can immediately address the critical issues or fixes in alpha testing. | Most of the issues or feedback collected from the beta testing will be implemented in future versions of the product |
Acceptance Testing:
- Acceptance Test refers to the broad category of tests that include Alpha and Beta testing.
- The primary goal of acceptance testing is done by getting feedback and approval from potential users to determine if the software is ready for deployment
- Alpha and Beta testing are forms of acceptance testing, a type of user acceptance testing (UAT) that helps validate if a product meets user requirements before its final release.
- Alpha testing is conducted internally, while beta testing is performed by external end-users
The Debugging Process:
- Debugging is the process of identifying and resolving errors, or bugs, in a software system.
- It is an important aspect of software engineering because bugs can cause a software system to malfunction, and can lead to poor performance or incorrect results.
- Debugging can be a time-consuming and complex task, but it is essential for ensuring that a software system is functioning correctly.
