1.
Black Box Testing Techniques
(Tests functionality without knowing internal code — focuses on inputs/outputs)
(a) Equivalence Partitioning
• Definition: Divide input data into valid and invalid partitions, and test one from each partition.
• Example: For a form that accepts age 18–60:
o Valid partition → 25, 40
o Invalid partition → 10, 70
(b) Boundary Value Analysis (BVA)
• Definition: Errors often occur at boundaries. Test values at edges.
• Example: For age 18–60: test 17, 18, 60, 61.
(c) Decision Table Testing
• Definition: Use a table of rules/conditions vs actions.
• Example: Login system:
o Condition1: Correct Username
o Condition2: Correct Password
o Actions: Login Success/Failure
(d) State Transition Testing
• Definition: Test system’s behavior for state changes.
• Example: ATM card:
o Insert card → Enter PIN → Withdraw cash → Eject card.
(e) Use Case Testing
• Definition: Derive test cases from use cases (real user scenarios).
• Example: In an e-commerce site: "Search item → Add to cart → Checkout → Payment."
2. White Box Testing Techniques
(Tests internal structure, code, logic)
(a) Statement Coverage
• Definition: Ensure every statement in the code runs at least once.
• Example: If code has 10 lines, tests must execute all 10.
(b) Branch Coverage (Decision Coverage)
• Definition: Ensure each decision (if, else) takes both true and false paths.
• Example:
if (x > 0)
printf("Positive");
else
printf("Non-positive");
Test with x=5 (true branch) and x=-3 (false branch).
(c) Path Coverage
• Definition: Ensure all possible paths in code are executed.
• Example: In nested if statements, test all combinations of conditions.
(d) Loop Testing
• Definition: Specifically tests loops (0, 1, multiple, max iterations).
• Example: For for(i=0;i<n;i++): test with n=0, n=1, n=5.
3. Grey Box Testing Techniques
(Mix of both black & white box – tester knows partial internal details)
(a) Matrix Testing
• Definition: Check requirements traceability (test cases mapped to requirements).
• Example: Ensure each functional requirement in SRS has at least one test case.
(b) Regression Testing
• Definition: Re-run old test cases after code change to ensure no side effects.
• Example: After fixing a bug in the "Add to Cart" feature, re-run cart + checkout tests.
(c) Pattern Testing
• Definition: Use historical defect patterns to design test cases.
• Example: If past login failures often happened due to invalid characters in username, design new tests
for special characters.
(d) Orthogonal Array Testing
• Definition: Test combinations of inputs efficiently using mathematical arrays.
• Example: Testing a mobile app across OS (Android/iOS), Browsers (Chrome/Safari), Network
(WiFi/4G) with minimal cases but max coverage.
✅ Summary Table
Testing Type Technique Example
Black Box Equivalence Partitioning Age 18–60 → test 25, 10, 70
Boundary Value Analysis Test 17, 18, 60, 61
Decision Table Username/Password login rules
State Transition ATM card states
Use Case Testing E-commerce checkout flow
White Box Statement Coverage Execute all code lines
Branch Coverage if/else with true & false
Path Coverage Nested if combinations
Loop Testing For loop with n=0,1,5
Grey Box Matrix Testing Requirement ↔ Test case mapping
Regression Testing Re-test cart after bug fix
Pattern Testing Login special characters
Orthogonal Array Test OS, browser, network combos