Black Box, White Box and Test Design Techniques

Harry · 21 Sep 2026 · 2 views
Log in to track your progress and mark lessons complete.

Black Box Testing

Test behaviour without seeing code: give inputs, check outputs. Techniques below are all black box.

White Box Testing

Test with code knowledge: statement, branch and path coverage. Used in unit testing and code reviews.

Gray Box Testing

Partial knowledge: test APIs and database states while treating UI as a black box. Typical for QA engineers.

Equivalence Partitioning

Divide inputs into valid/invalid groups and test one value per group. Age 18-60: test 25 (valid), 10 and 70 (invalid).

Boundary Value Analysis

Bugs live at edges: for range 18-60 test 17, 18, 19, 59, 60, 61.

Decision Table Testing

Map combinations of conditions to actions. Login with valid/invalid username x valid/invalid password gives 4 rules and expected messages.

State Transition Testing

Test valid and invalid moves between states: order New to Paid to Shipped; Paid back to New must be rejected.

Use Case, Error Guessing, Pairwise

  • Use case testing - walk the actor steps end to end.
  • Error guessing - use experience: empty fields, special characters, huge files.
  • Pairwise - cover all pairs of parameter values with few cases (browser x OS x role).

Boundary value analysis example for age 18 to 60 - test 17, 18, 19, 59, 60, 61

Key Points

  • Black box needs no code; white box needs coverage tools.
  • Boundaries plus partitions catch most input bugs.
  • Combine techniques: partitions select values, tables cover logic.
Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in