Black-Box — test without knowing internals. White-Box — test with knowledge of internals.
Black-Box Testing:
Black-Box:
Input: username="john", password="123"
Output: login success or failure
(Don't know internal logic)
White-Box Testing:
White-Box:
Test all branches
Check code coverage
Know internal validation logic
(See internal structure)
Key differences: