Test Design Techniques
- In ISTQB, Test Design Techniques refer to systematic methods for designing effective test cases to ensure thorough coverage of the software under test. These techniques help testers derive test cases that reveal defects, validate functionality, and evaluate non-functional requirements. Test design techniques are categorized based on whether they rely on the external behavior of the system (black-box), the internal structure (white-box), or the tester's experience (experience-based).
Black-Box Test Design Techniques
- Black-box test design techniques focus on testing the software without knowledge of its internal code or structure. Test cases are derived from the functional or non-functional specifications of the software.
Equivalence Partitioning (EP)
- Definition
- Objective
- Example
- Divides input data into different partitions, or classes, where the system is expected to behave similarly. The idea is to test just one representative value from each partition.
- To reduce the number of test cases while maintaining effective coverage.
- If a field accepts values between 1 and 100, valid partitions might be 1-50 and 51-100, and invalid partitions might include values like 0 or 101.
Boundary Value Analysis (BVA)
- Definition
- Objective
- Example
- Focuses on testing at the boundaries between equivalence partitions, where defects are more likely to occur.
- To catch edge-case defects that occur at the boundaries of valid and invalid input ranges.
- If a field accepts values between 1 and 100, boundary values to test might be 0, 1, 100, and 101.
Decision Table Testing
- Definition
- Objective
- Example
- A technique that uses a decision table to represent combinations of inputs and the resulting actions. Each row in the decision table corresponds to a unique combination of inputs and the expected output.
- To systematically test combinations of input conditions.
- Testing a loan approval system where the decision to approve or deny a loan depends on factors like income, credit score, and loan amount.
State Transition Testing
- Definition
- Objective
- Example
- Tests how the system transitions from one state to another based on different events or inputs. It’s especially useful for systems that have distinct states. ie: User Login States.
- To verify the system’s behavior as it moves between different states.
- Testing a user account where possible states include "Logged out," "Logged in," and "Locked after multiple failed login attempts."
Use Case Testing
- Definition
- Objective
- Example
- Tests the system’s behavior based on use cases, which describe user interactions with the system. Each use case is a sequence of actions or events.
- To ensure the system performs correctly from the end-user perspective.
- Testing a shopping cart application by simulating the process of adding items, checking out, and making a payment.
White-Box Test Design Techniques
- White-box test design techniques or tructural techniques rely on knowledge of the internal code and logic of the system. These techniques ensure that the internal paths, conditions, and logic of the system are adequately tested.
Statement Coverage
- Definition
- Objective
- Example
- Measures whether each line of code (statement) has been executed at least once.
- To ensure that every line of code is covered by test cases.
- Writing test cases that execute each line of code in a function to confirm it has been tested.
Decision Coverage (Branch Coverage)
- Definition
- Objective
- Example
- Ensures that all branches have been executed. ie: The true and false outcomes of if else conditions.
- To verify that all decision points in the code have been tested.
- Testing both outcomes of an if (x > 0) condition by passing in values of x = 1 (true branch) and x = -1 (false branch).
Condition Coverage
- Definition
- Objective
- Example
- Ensures that each individual condition within a decision has been tested for true and false values. ie: Each clause in a compound logical condition.
- To verify that all conditions in the code are fully exercised.
- Testing both outcomes of the conditions in a statement like if (x > 0 && y < 5) by varying x and y.
Multiple Condition Coverage
- Definition
- Objective
- Example
- Extends condition coverage by testing all possible combinations of conditions.
- To ensure that every possible combination of conditions is tested.
- Testing all combinations of true / false outcomes for the expression if (x > 0 && y < 5 && z == 10).
Path Coverage
- Definition
- Objective
- Example
- Ensures that all possible paths through the code are tested.
- To identify all possible execution paths and test each one.
- In a function with nested loops or decision structures, testing every path the execution can take.
Experience-Based Test Design Techniques
- Experience-based techniques leverage the tester’s experience, intuition, and knowledge of the software to design test cases. These techniques are less structured but valuable for finding defects that formal techniques may miss.
Error Guessing
- Definition
- Objective
- Example
- A technique where the tester uses their knowledge and experience to guess the kinds of defects that are likely to be present.
- To uncover defects based on past experiences or common issues in similar systems.
- If a tester knows that a particular type of software often fails when handling special characters, they might test this specifically.
Exploratory Testing
- Definition
- Objective
- Example
- An approach where testers explore the software without predefined test cases, learning about the system as they test and creating new tests dynamically.
- To find unexpected defects through a free-form exploration of the application.
- Navigating through different features of an application to discover defects that might not be identified by scripted tests.
Checklist-Based Testing
- Definition
- Objective
- Example
- Testers use a checklist of items to guide their testing. ie: Key Features, Functionality, and Common Defect Types.
- To ensure that important areas are covered without being overly formalized.
- Using a checklist to verify that all critical functions of a banking application (login, transfers, bill payments) are tested.
Fault Attack
- Definition
- Objective
- Example
- Based on knowledge of typical defects, testers create test cases targeting specific types of defects.
- To identify and expose known patterns of defects.
- If an application often has problems with memory management, the tester may focus on testing this area in depth.
Module Review
Click to start the definition to term matching quiz
Drag the defintion to the correct term.
Test type item not available at this time.
Click to start the multiple choice quiz
Choose from the listed options below.
Test type item not available at this time.