liveBook · Manning

Black-box testing

As explained in Test Driven: Practical TDD and Acceptance TDD for Java Developers

Black-box testing checks a system through its externally visible behavior without relying on knowledge of its internal implementation.

Black-box testing checks an application through its visible interface without relying on its internals. In a GUI, a test can find a component by name and type, send it an event, and inspect its state. section 11.3.4

Testing a GUI component

A test might click a button and check whether it is enabled, or ask a text field for its current value. This keeps the test outside the application’s internals, but can make tests harder to implement when they need access beyond the UI. section 11.3.4

Acceptance tests can range from going through the UI to exercising application internals directly. UI-only access can be limiting, especially when tests need to run throughout development or check behavior that the interface cannot expose. Hooks can provide access to UI components, application logic, and state. section 11.3.4 section 11.5

How Test Driven: Practical TDD and Acceptance TDD for Java Developers covers it

How deep it goes
Defines UI interaction and state checks, then contrasts them with hooks and direct internal access without detailing a complete test.
Examples
Uses GUI component lookup, button clicks, and checks of text-field values or enabled state.
What you can do after
Evaluate acceptance-test strategies by weighing UI-only access against access to application internals.
How it connects
Connects acceptance testing with GUI testing, white-box testing, and application test hooks.

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 Test Driven: Practical TDD and Acceptance TDD for Java Developers. The section links point to the parts of the book it draws on.