Skip to content

Black Box, White Box, and Grey Box Testing

You test the system by inputs/outputs without knowing internal code.

Examples:

  • UI testing
  • API testing
  • acceptance tests

You test with knowledge of internal implementation.

Examples:

  • unit tests
  • branch/condition coverage
  • code-level edge cases

You have partial knowledge of internals.

Examples:

  • API tests with DB knowledge
  • testing with logs/metrics
diagram Diagram mermaid
  • Black box: verify user-visible behavior
  • White box: verify correctness and edge cases
  • Grey box: efficient end-to-end checks

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading