Format and Syntax
Gherkin files use the feature file extension. They’re saved as plain text, meaning they can be read and edited with simple tools. In this respect, Gherkin is very similar to file formats like Markdown, Textile, and YAML.
Keywords
A Gherkin file is given its structure and meaning using a set of special keywords. There’s an equivalent set of these keywords in each of the supported spoken languages, but for now let’s take a look at the English ones:
-
Feature
-
Background
-
Scenario
-
Given
-
When
-
Then
-
And
-
But
-
*
-
Scenario Outline
-
Examples
We’ll spend the rest of this chapter exploring how to use the most common of these keywords, which will be enough to get you started writing your own Cucumber features. We’ll come back to look at the remaining ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access