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
Identifies the tested unit, scenario, and expectation so failures are understandable from a test runner’s output.
How deep it goes
Defines a three-part naming pattern and compares formats and omissions, without prescribing one naming syntax.
Examples
Uses a password-rule test and a return-value-plus-callback function to contrast focused and generic names.
What you can do after
Practice/perform naming a test by stating its unit, scenario, and expected behavior, splitting tests when distinct concerns defeat a clear name.

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 →

What to know first

Related concepts

Questions about test name

What is test name?

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

Which Manning books explain test name?

The Art of Unit Testing 3e and Unit Testing Principles, Practices, and Patterns.

What should I know before learning test name?

Manning books that teach test name usually introduce function and code readability first.

What is the difference between test name and implementation detail?

A test name is a human-readable identifier that communicates the behavior an automated test verifies and, when relevant, its expected outcome. An implementation detail is an internal design, representation, or mechanism describing how software realizes behavior, rather than part of its externally observable behavior or contract.

What is test name part of?

Test name is part of behavior. Behavior is the observable actions, responses, outputs, or effects of a system or object under specified conditions or interactions.

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.