Test Case Design Techniques
What is are Test Case Design Techniques?
1. Specification-based (Black-Box) Techniques
-
Equivalence Partitioning (EP)
Divide inputs into classes where behavior is expected to be the same(valid and invalid). Test one representative value from each class to reduce redundancy.
Example: For an age field accepting 18–60:Valid class: 18–60 (e.g., test with 35)
-
Invalid classes: below 18 (e.g., 17), above 60 (e.g., 61), non-numeric (e.g., "abc")
-
Boundary Value Analysis (BVA)
Focus on values at or around the edges of each valid range .
Example: For ages 18–60, test: 17, 18, 19, 59, 60, 61.
-
Decision Table Testing
Use tables to map combinations of inputs to expected outcomes i.e.. involves designing test cases based on decision tables formulated using different combinations of inputs and their corresponding outputs based on various conditions and scenarios sticking to other business rules
-
State Transition Testing
Suitable for systems with defined states and transitions (e.g., user login flows or checkout states). -
Use Case Testing
Test real user flows or business scenarios from start to finish (e.g., “student enrolling in a course”).
2. Structure-based (White-Box) Techniques
-
Statement Coverage: Ensure every line of code is executed.
-
Decision/Branch Coverage: Test every decision outcome (e.g., both true and false branches).
-
Condition/Multiple Condition Testing: Validate compound condition logic.
3. Experience-based Techniques
-
Error Guessing: Use tester intuition and past experience to anticipate where bugs may surface.
Exploratory Testing: Investigate the software dynamically to discover unexpected behavior.
How These Techniques Work Together
The video emphasizes that no single technique is sufficient. Effective testing often involves:
-
Combining black-box and white-box methods to cover both functional behavior and internal logic.
-
Enhancing structured approaches with experience-based exploration to catch edge-case or unforeseen issues.
Real-World Example
-
Equivalence Partitioning + BVA: For an input accepting 1–100, test values like 0, 1, 2, 99, 100, 101.
-
Decision Table: For a discount system:
If loyal customer AND purchase > $100 → apply discount.
-
Use a table to ensure all combinations are tested.
-
State Transition: An e-commerce flow:
States: Logged Out → Logged In → Cart → Checkout.
-
Transition tests might include logging in, adding/removing items, or checking out.
Comments
Post a Comment