Tactic 17 Capturing Business Rules
Our services are conditioned by the business and legislative rules that determine how we can design something. The ‘gherkin syntax’ provides a common way of capturing these in a simple format.
The structure of a Gherkin syntax is:
- Feature
- Scenario
- Given, When, Then, And, But (Steps)
- Background
- Scenario outline
- Examples
This is an example from a cash machine
- 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
Written on February 10, 2017
Rate It: