Gherkin Syntax and Features
Learn to define features, scenarios, Given-When-Then steps using the human-readable Gherkin syntax.
Gherkin: Plain Language Tests
Gherkin is a plain-language parser used by Behavior-Driven Development (BDD) tools like Cucumber. It helps describe software behavior in a human-readable format.
This makes it easier for everyone—developers, testers, and business stakeholders—to understand and agree on what the software should do. Gherkin uses a specific set of keywords to structure these descriptions.
Defining a Feature
The Feature keyword is the starting point of any Gherkin document. It describes a high-level capability or a specific area of the application.
- Think of it as the main goal or business requirement you are testing.
- It should have a clear, concise title.
- An optional description can follow, providing more context.
- Each
.featurefile typically contains oneFeature.
All lessons in this course
- Introduction to BDD
- Gherkin Syntax and Features
- Implementing Step Definitions
- Scenario Outlines and Data Tables