Gherkin
Gherkin is a structured, human-readable domain-specific language for expressing software behavior as features and scenarios with steps such as Given, When, and Then.
BDD in Action, Second Edition
Gherkin is a human-readable structured language for expressing software behavior specifications as features and scenarios.
- How it is used
- Expresses agreed business requirements as readable scenarios that can become automated acceptance criteria.
- How deep it goes
- Defines feature files and step keywords, works through tables and scenario outlines, and addresses readability; defers detailed automation.
- Examples
- Uses account-transfer outcomes, an interest-calculation Examples table, and frequent-flyer steps to illustrate scenarios and wording choices.
- What you can do after
- Practice/perform writing focused scenarios that stakeholders can review and teams can integrate with BDD tools.
Effective Behavior-Driven Development
A domain-specific language for writing human-readable behavior specifications using constructs such as Given, When, and Then.
- How it is used
- Documents shared understanding as business-readable behavior specifications that can also be automated.
- How deep it goes
- Defines feature, rule, scenario, and step keywords, but leaves automation implementation to compatible tools.
- Examples
- Uses delivery-address change scenarios organized around pickup status and address range.
- What you can do after
- Build from scratch by writing business-readable scenarios with Given, When, and Then steps.
Read how Effective Behavior-Driven Development explains Gherkin →
Also covered in
- AI-Powered Developer: Build software with ChatGPT and Copilot
- Shipping Go: Develop, deliver, discuss, design, and go again
- Spec-Driven DevelopmentIn early access (MEAP)
- Claude at WorkIn early access (MEAP)
- Contract Testing in Action
What to know first
- behavior-driven developmentBehavior-driven development is a collaborative software development practice that specifies and verifies desired behavior through examples expressed in terms understandable to stakeholders.
- business ruleA business rule is a domain-specific constraint, policy, or decision criterion that governs valid data, behavior, decisions, or processes.
- implementationImplementation is the process or concrete realization of a design, specification, or requirement as executable code or operational behavior.
- integration testAn integration test evaluates whether multiple software components, or a component and an external dependency, interact and behave correctly together.
Related concepts
- Cucumberused by · Cucumber is a behavior-driven development tool that executes structured, human-readable specifications as automated tests by connecting their steps to step definitions.
- behavior-driven developmentcontrasts with · Behavior-driven development is a collaborative software development practice that specifies and verifies desired behavior through examples expressed in terms understandable to stakeholders.
- domain-specific languagekind of · A domain-specific language is a language or notation tailored to expressing concepts, operations, or solutions within a particular problem or application domain.
- feature fileuses · A feature file is a human-readable Gherkin document that specifies a software feature and its behavior through scenarios for execution by behavior-driven development tools.
- automated testinguses · Automated testing is the execution and evaluation of software tests by programs or tools rather than by manually performing each test procedure.
Questions about Gherkin
What is Gherkin?
Gherkin is a structured, human-readable domain-specific language for expressing software behavior as features and scenarios with steps such as Given, When, and Then.
Which Manning books explain Gherkin?
BDD in Action, Second Edition and Effective Behavior-Driven Development.
What should I know before learning Gherkin?
Manning books that teach Gherkin usually introduce behavior-driven development, business rule, implementation and integration test first.
What is the difference between Gherkin and behavior-driven development?
Gherkin is a structured, human-readable domain-specific language for expressing software behavior as features and scenarios with steps such as Given, When, and Then. Behavior-driven development is a collaborative software development practice that specifies and verifies desired behavior through examples expressed in terms understandable to stakeholders.
What is Gherkin a kind of?
Gherkin is a kind of domain-specific language. A domain-specific language is a language or notation tailored to expressing concepts, operations, or solutions within a particular problem or application domain.
What are the parts of Gherkin?
Gherkin includes Gherkin keyword.
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.

