Skip to content
BENIBIX Learn

Black-Box Testing

Development🧪 Testing & QualityTest Practices

Also known as Black Box Testing, Black-Box Test, Behavioral Testing

Testing what a program does. You do not look at its code.

Think of it like

Think of it like testing a snack machine. You put in a coin, press a button and check what drops out.

Example

Lucy tests a login form. She tries a right password, a wrong one and an empty one, and checks each answer.

Why it matters

It tests the app the way users meet it, and it does not break when the code inside changes.

Definition

Black-box testing checks what a program does without looking at its code. The tester gives it inputs and checks the outputs. They compare the results with what the spec says should happen. They do not need to know how it works inside. Most acceptance tests and manual tests work this way.
Black box: put inputs in, check what comes out.

Common mistake

Thinking black-box tests reach every line. Paths a tester never thinks to try stay unchecked.

Key takeaways

  1. 1
    Code hidden. Only inputs and outputs count.
  2. 2
    Check the spec. Compare to what should happen.
  3. 3
    User's view. Tests it as users meet it.

Compare