Gherkin Syntax

Scenario-Oriented Acceptance Criteria

Gherkin Syntax

Write scenarios in the following format:

Feature: Account Holder withdraws cash

Scenario: Account has sufficient funds
     Given The account balance is $100
    And the card is valid
     And the machine contains enough money
     When the Account Holder requests $20
     Then the ATM should dispense $20
    And the account balance should be $80
    And the card should be returned

Rules

There should only ever be one When clause

You can have multiple Given and Then clauses

Keep technical details out of the language