Each line that isn’t a blank line has to start with a Gherkin keyword, followed by any text you like. The only exceptions are the free-form descriptions placed underneath Example/Scenario, Background, Scenario Outline and Rule lines.
The primary keywords are:
Feature Rule (as of Gherkin 6) Example (or Scenario) Given, When, Then, And, But for steps (or *) Background Scenario Outline (or Scenario Template) Examples (or Scenarios) There are a few secondary keywords as well:
Feature: Multiple site support Only blog owners can post to a blog, except administrators, who can post to all blogs.
Background: Given a global administrator named "Greg" And a blog named "Greg's anti-tax rants" And a customer named "Dr. Bill" And a blog named "Expensive Therapy" owned by "Dr. Bill"
Scenario: Dr. Bill posts to his own blog Given I am logged in as Dr. Bill When I try to post to "Expensive Therapy" Then I should see "Your article was published."
Scenario: Dr. Bill tries to post to somebody else's blog, and fails Given I am logged in as Dr. Bill When I try to post to "Greg's anti-tax rants" Then I should see "Hey! That's not your blog!"
Scenario: Greg posts to a client's blog Given I am logged in as Greg When I try to post to "Expensive Therapy" Then I should see "Your article was published."
ScenarioOutline: eating Given there are <start> cucumbers When I eat <eat> cucumbers Then I should have <left> cucumbers