White-box testing
White-box testing evaluates software using knowledge of its internal implementation, structure, or execution behavior.
Functional Design and Architecture: Examples in Haskell
White-box unit testing is testing that verifies internal code paths and implementation details in addition to externally observable behavior.
- How it is used
- Uses implementation-aware tests to protect sensitive business logic and exercise IO-bound failure scenarios.
- How deep it goes
- Works through mock interpreters, failure assertions, dispatch, and call tracing; points to a separate treatment of automatic white-box testing.
- Examples
- Uses a game-loading database failure, a mocked random-choice scenario, and an asserted call trace.
- What you can do after
- Practice writing white-box tests with mocked interpreters and checking failure paths and call traces.
Read how Functional Design and Architecture: Examples in Haskell explains white-box testing →
Write Powerful Rust Macros
White-box testing evaluates software with knowledge of and access to its internal implementation, including private code paths.
- How it is used
- Verifies procedural-macro internals and private helper behavior alongside implementation code.
- How deep it goes
- Demonstrates string, exact-stream, and parsed-AST assertions, while noting the maintenance cost of macro-specific fixtures.
- Examples
- Uses a derive-generated builder for `StructWithNoFields` and exercises testing structs with fields and unnamed-field failures.
- What you can do after
- Diagnose/debug with it by directly asserting generated output and parsing it to inspect selected syntax details.
Read how Write Powerful Rust Macros explains white-box testing →
Unit Testing Principles, Practices, and Patterns
A software testing method that verifies internal implementation behavior using knowledge of the application's source code or structure.
- How it is used
- Analyzes tests and implementation choices within a broader unit-testing strategy.
- How deep it goes
- Contrasts definitions, benefits, and brittleness but stops short of prescribing detailed test construction.
- Examples
- Compares tests derived from source code with tests derived from requirements and specifications.
- What you can do after
- Evaluate tests by balancing regression protection against brittleness and resistance to refactoring.
Read how Unit Testing Principles, Practices, and Patterns explains white-box testing →
Test Driven: Practical TDD and Acceptance TDD for Java Developers
White-box testing is a testing approach that uses knowledge of a system's internal structure or implementation.
- How it is used
- Uses access to application internals as an acceptance-testing strategy when testing through the UI is not the chosen route.
- How deep it goes
- Places direct internal testing on a black-box-to-white-box spectrum but gives no step-by-step implementation procedure.
- Examples
- Shows tests embedded in an application and tests accessing domain behavior through a service layer.
- What you can do after
- Evaluate acceptance-testing options by considering internal access, system architecture, and technology constraints.
Also covered in
What to know first
- business logicBusiness logic is the domain-specific rules, computations, and decisions that determine how a software system processes operations and behaves.
- couplingCoupling is the degree of interdependence between software components, including their dependencies on one another’s structure, behavior, or availability.
- refactoringRefactoring is the disciplined restructuring of existing software to improve its internal qualities while preserving its externally observable behavior.
- system under testA system under test is the component or system whose behavior is exercised and evaluated by a test.
Related concepts
- black-box testingcontrasts with · Black-box testing evaluates software by examining its externally observable behavior without relying on knowledge of its internal implementation.
- functional requirementmeasures · A functional requirement specifies a behavior or capability that a system must provide or enable.
- software testingkind of · Software testing is the systematic evaluation of software under specified inputs or conditions to assess its behavior against expected results or requirements and identify defects.
- endpointcontrasts with · An endpoint is an addressable interface of a service through which clients access a resource or invoke an operation, typically via a network request.
- testabilityused by · Testability is the degree to which software behavior or properties can be effectively and reliably evaluated through testing.
Questions about white-box testing
What is white-box testing?
White-box testing evaluates software using knowledge of its internal implementation, structure, or execution behavior.
Which Manning books explain white-box testing?
Functional Design and Architecture: Examples in Haskell, Write Powerful Rust Macros, Unit Testing Principles, Practices, and Patterns and Test Driven: Practical TDD and Acceptance TDD for Java Developers.
What should I know before learning white-box testing?
Manning books that teach white-box testing usually introduce business logic, coupling, refactoring and system under test first.
What is the difference between white-box testing and black-box testing?
White-box testing evaluates software using knowledge of its internal implementation, structure, or execution behavior. Black-box testing evaluates software by examining its externally observable behavior without relying on knowledge of its internal implementation.
What kinds of white-box testing are there?
Kinds of white-box testing include service-level user acceptance test.
What is white-box testing a kind of?
White-box testing is a kind of software testing. Software testing is the systematic evaluation of software under specified inputs or conditions to assess its behavior against expected results or requirements and identify defects.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



