Test name
A test name is a human-readable identifier that communicates the behavior an automated test verifies and, when relevant, its expected outcome.
The Art of Unit Testing 3e
The textual name assigned to a test to communicate the tested unit, scenario, and expected behavior or exit point.
- How it is used
- Makes failing test results useful for debugging and documents what each test is intended to verify.
- How deep it goes
- Defines a three-part naming pattern and compares full names, nested labels, and names missing required information.
- Examples
- Demonstrates verifyPassword with a failing rule and trigger tests split between a callback and return value.
- What you can do after
- Evaluate/understand whether a test name identifies its unit, scenario, and expected behavior without requiring code inspection.
Unit Testing Principles, Practices, and Patterns
A test name is the human-readable identifier assigned to an automated test to indicate the behavior it verifies.
- How it is used
- Guides test naming toward readable statements of observable behavior and business meaning.
- How deep it goes
- Contrasts rigid and plain-English conventions and refactors concrete names, but stops short of a complete naming standard.
- Examples
- Uses calculator and delivery examples to compare rigid identifiers with plain-English behavior descriptions.
- What you can do after
- Apply plain-English names that reveal verified behavior without encoding unnecessary implementation details.
Read how Unit Testing Principles, Practices, and Patterns explains test name →
Related concepts
- testconfigures · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
- behaviorpart of · Behavior is the externally observable actions, responses, outputs, or effects of a system or object under specified conditions or interactions.
- scenariopart of · A scenario is a concrete description of a situation or conditions, often including actions and expected or possible outcomes, for analysis or evaluation.
- naming standardconfigured by · A naming standard is an established set of rules or patterns for assigning names consistently to software elements, resources, or other artifacts.
- deployment pipelineused by · A sequence of automated or manual stages that builds, tests or validates, packages, and delivers software or models toward deployment.
- implementation detailcontrasts with · An implementation detail is an internal design choice, representation, or mechanism that is not part of a software component’s externally observable behavior or contract.
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.

