Master test design techniques for ISTQB Certified Tester Foundation Level (CTFL)
4.1 Identifying Test Conditions and Designing Test Cases
Test conditions are specific aspects of a system to be tested (e.g., a feature or requirement). Designing test cases involves creating detailed steps, inputs, and expected outcomes to verify these conditions.
Key Steps:
Identify test conditions from requirements or specifications.
Design test cases with clear objectives, inputs, and expected results.
Ensure traceability to requirements for coverage.
4.2 Categories of Test Design Techniques
Test design techniques are categorized into three main types:
Specification-Based (Black-Box): Focuses on inputs and outputs without knowledge of internal structure.
Structure-Based (White-Box): Uses the system’s internal structure or code to design tests.
Experience-Based: Relies on tester’s knowledge, intuition, or past experience.
Note: Each category suits different testing needs and contexts.
4.3 Specification-Based or Black-Box Techniques
Black-box techniques design tests based on the system’s external behavior, using specifications or requirements. Common techniques include:
Equivalence Partitioning: Divides input data into partitions expected to exhibit similar behavior.
Boundary Value Analysis: Tests boundaries or edge cases of input ranges.
Decision Table Testing: Uses tables to represent combinations of inputs and expected outcomes.
State Transition Testing: Tests system behavior across different states.
Use Case Testing: Tests based on user scenarios or use cases.
Key Point: Black-box techniques are effective for functional testing without code knowledge.
4.4 Structure-Based or White-Box Techniques
White-box techniques design tests based on the system’s internal structure or code. Common techniques include:
Statement Coverage: Ensures every line of code is executed.
Decision Coverage: Ensures every decision point (e.g., if-else) is tested for all outcomes.
Branch Coverage: Tests all possible paths in the code.
Note: White-box techniques require knowledge of the code and are often used in component testing.
4.5 Experience-Based Techniques
Experience-based techniques rely on the tester’s skills, intuition, and knowledge of similar systems. Common techniques include:
Error Guessing: Testers predict likely defects based on experience.
Exploratory Testing: Simultaneous test design and execution to explore the system.
Key Point: These techniques are useful when specifications are incomplete or time is limited.
4.6 Choosing a Test Technique
Selecting the appropriate test technique depends on several factors:
Context: Project type, risks, and objectives.
Resources: Tester skills, tools, and time available.
Requirements: Level of coverage needed (e.g., regulatory compliance).
System Type: Functional, structural, or exploratory needs.
Note: Combining techniques often provides the best coverage.
Chapter Review
This chapter covers test design techniques for the ISTQB CTFL syllabus, including identifying test conditions, categorizing techniques, and understanding black-box, white-box, and experience-based approaches. Choosing the right technique enhances testing effectiveness.
Sample Exam Questions
Test your knowledge with these sample questions:
What is the difference between a test condition and a test case?
Name two black-box test design techniques.
What does decision coverage measure in white-box testing?
When is exploratory testing most useful?
Answers:
A test condition is an aspect to be tested; a test case is a detailed set of steps to verify it.
Equivalence Partitioning and Boundary Value Analysis.
Decision coverage measures whether all decision points in the code are tested for all outcomes.
Exploratory testing is useful when specifications are incomplete or time is limited.
Exercises: Test Design Techniques
Exercise 1: For a login system accepting passwords of 6–12 characters, design test cases using Boundary Value Analysis.
Exercise 2: Describe a scenario where error guessing would be an effective testing technique.
Solutions:
Exercise 1: Test cases for password length using Boundary Value Analysis:
5 characters (just below minimum, should fail)
6 characters (minimum, should pass)
7 characters (just above minimum, should pass)
11 characters (just below maximum, should pass)
12 characters (maximum, should pass)
13 characters (just above maximum, should fail)
Exercise 2: Error guessing is effective in a payment processing system where testers, based on experience, predict defects like incorrect handling of expired credit cards or invalid CVV codes.