Step definition
A step definition is executable code that maps a human-readable behavior-specification step to code that performs or verifies the corresponding behavior.
BDD in Action, Second Edition
A step definition is an executable mapping that connects a human-readable behavior-specification step to code that performs or verifies the corresponding application interaction.
- How it is used
- Connects Gherkin scenario steps to code that performs application actions or verifies expected outcomes.
- How deep it goes
- Works through matching methods and parameter extraction, then separates step glue from reusable tasks and system interactions.
- Examples
- Uses frequent-flyer membership and flight scenarios, plus a sign-up step mapped to Screenplay tasks.
- What you can do after
- Build it from scratch: match scenario wording, pass captured values into code, and delegate actions to reusable tasks.
Read how BDD in Action, Second Edition explains step definition →
Build Financial Software with Generative AI (From Scratch)
An executable binding that maps a human-readable behavior-driven development step to test code.
- How it is used
- Connects readable BDD scenarios to executable checks for payment parsing and API behavior.
- How deep it goes
- Demonstrates decorators, parsed parameters, fixtures, and assertions, while deferring further explanation of fixtures.
- Examples
- Uses ACH batch-header record types, a /files status-code check, and ACH entry application values.
- What you can do after
- Apply it via pytest-bdd to bind scenarios to parameterized actions and assertions.
Read how Build Financial Software with Generative AI (From Scratch) explains step definition →
Effective Behavior-Driven Development
Automation code associated with a behavior-specification step that performs or checks the step’s behavior.
- How it is used
- Connects scenario wording to automation actions or checks that can be composed into executable tests.
- How deep it goes
- Explains registration and matching, including expression complexity, custom parameter types, and undefined or ambiguous matches.
- Examples
- Uses customer authentication and image color changes to illustrate step definitions and parameter matching.
- What you can do after
- Diagnose undefined or ambiguous steps and simplify expressions that make matching difficult to debug.
Read how Effective Behavior-Driven Development explains step definition →
Related concepts
- glue codepart of · Glue code is integration code that connects otherwise separate software components, tools, or systems so they can work together.
- scenario automation toolused by · A software tool that converts behavioral scenarios into executable tests by invoking automation code for their steps.
Questions about step definition
What is step definition?
A step definition is executable code that maps a human-readable behavior-specification step to code that performs or verifies the corresponding behavior.
Which Manning books explain step definition?
BDD in Action, Second Edition, Build Financial Software with Generative AI (From Scratch) and Effective Behavior-Driven Development.
What is step definition part of?
Step definition is part of automation code. Code that automates interactions with a system and supports the execution of behavioral scenarios.
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.


