liveBook · Manning

Given/When/Then format

Also called given-when-then structure

The Given/When/Then format structures a behavioral scenario as an initial context, a triggering action or event, and an expected outcome.

How 2 Manning books explain it

BDD in Action, Second Edition

Given-When-Then notation is a structured scenario format for expressing preconditions, an action or event, and the expected outcome.

How it is used
Turns stakeholder examples into shared scenarios for clarifying requirements and expressing expected behavior.
How deep it goes
Explains each clause, relevant preconditions, and focused extensions; defers automation and implementation.
Examples
Uses account transfers, revised train departures, flight points, and booking changes to make scenarios concrete.
What you can do after
Practice/perform writing concise, business-readable scenarios that can become executable acceptance tests.

Read how BDD in Action, Second Edition explains Given/When/Then format →

Shipping Go: Develop, deliver, discuss, design, and go again

A behavioral-specification format that expresses a scenario as an initial context, an action or event, and an expected outcome.

How it is used
Structures business behavior as readable scenarios for unit tests, integration tests, and shared development requirements.
How deep it goes
Explains context, action, and outcome through translation examples, then connects the format to Gherkin and automated validation.
Examples
Uses translation requirements for English, capitalization, whitespace, unsupported languages, and a Gherkin hello-to-German scenario.
What you can do after
Apply it via Gherkin and a Go runner to turn readable requirements into validation criteria and automated tests.

Read how Shipping Go: Develop, deliver, discuss, design, and go again explains Given/When/Then format →

Also covered in

What to know first

Related concepts

Questions about Given/When/Then format

What is Given/When/Then format?

The Given/When/Then format structures a behavioral scenario as an initial context, a triggering action or event, and an expected outcome.

Which Manning books explain Given/When/Then format?

BDD in Action, Second Edition and Shipping Go: Develop, deliver, discuss, design, and go again.

What should I know before learning Given/When/Then format?

Manning books that teach Given/When/Then format usually introduce requirements first.

What is Given/When/Then format part of?

Given/When/Then format is part of scenario. A scenario is a specified or described situation, sequence of events, or set of conditions used to represent or examine behavior, processes, or possible outcomes.

What are the parts of Given/When/Then format?

Given/When/Then format includes given step, test convention, then statement and When.

What is Given/When/Then format also called?

Given/When/Then format is also called given-when-then structure.

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.