🧪White-Box Testing
Also known as White Box Testing, Clear-Box Testing, Glass-Box Testing, Structural Testing
Testing a program while you read its code. Each path gets a test.
Think of it like
Think of it like a car with the hood up. The mechanic can see each part and test it.
Example
Jack sees a discount rule with three branches. He writes three tests, one for each, and coverage shows all three run.
Why it matters
It finds bugs on paths that users rarely reach but still matter.
Definition
Common mistake
Key takeaways
- 1Code open. The tester reads the code.
- 2Every path. One test for each branch.
- 3Coverage helps. See which lines ran.