liveBook · Manning

Test name

A test name is a human-readable identifier that communicates the behavior an automated test verifies and, when relevant, its expected outcome.

How 2 Manning books explain it

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.

Read how The Art of Unit Testing 3e explains test name →

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

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.