liveBook · Manning

Black-box testing

As explained in Functional Design and Architecture: Examples in Haskell

Black-box testing evaluates software through externally observable behavior without relying on knowledge of its internal implementation.

Black-box testing treats software as an opaque component: tests use public interfaces, observe produced results, and avoid relying on internal implementation knowledge. Its purpose is to reduce project risk, not to guarantee bug-free code. section 15.1 section 15.3

Use the boundary to distinguish black-box testing from related approaches:

  • Black-box tests remain unaware of implementation details; grey-box and white-box tests use partial or complete implementation knowledge. section 15.1
  • Functional tests may be black-box or grey-box, while integration tests exercise connected application parts and subsystem boundaries. section 15.1
  • Black-box testing alone cannot compensate for an architecture with many external services and uncontrolled side effects. section 15.2

Testing through an interface

A test calls a component through its public interface, supplies an input, and checks the returned result or externally visible behavior. The test remains valid without knowing how the component computes that result. section 15.1

How Functional Design and Architecture: Examples in Haskell covers it

How deep it goes
Defines the interface boundary and contrasts testing modes, but stops short of prescribing implementation-aware cases or detailed test design.
Examples
Uses public interfaces, observable results, functional requirements, nonfunctional requirements, and integrated application parts as testing targets.
What you can do after
Evaluate functional and nonfunctional requirements through public interfaces and recognize when architecture or additional testing is needed.
How it connects
Connects to functional testing, integration testing, grey-box testing, white-box testing, property-based testing, regression testing, and mocking.

Also explained in

Compare how 7 books explain black-box testing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Functional Design and Architecture: Examples in Haskell. The section links point to the parts of the book it draws on.