How do black-box, white-box and experience-based test techniques differ?
Answer
Black-box techniques derive tests from specified behavior without using the implementation structure. White-box techniques derive coverage from code, architecture or control flow. Experience-based techniques use tester knowledge, heuristics and defect history. They are complementary perspectives, not competing labels for the same test.
Strong answer includes
- basis is specification, structure or experience
- gives a technique example for each family
- treats the families as complementary
Practical example
For a discount-code field, a tester uses equivalence partitioning and boundary-value analysis from the spec to check valid, empty and max-length codes (black-box). Then they check branch coverage of the discount-calculation function and notice one conditional branch for stacked coupons is never exercised, so they add a case for it (white-box). Finally, drawing on past bugs in similar systems, they try applying the same code twice in one session, suspecting a re-entrancy issue — and it turns out the discount doubles (experience-based, exploratory).