Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active March 18, 2021 22:05
Show Gist options
  • Save Integralist/7750250 to your computer and use it in GitHub Desktop.
Save Integralist/7750250 to your computer and use it in GitHub Desktop.
[Cucumber Gherkin Template Feature File] #gherkin #cucumber #userstory #story #feature #scenario
Feature: <title>
In order to <do something>
As a <user>
I want to <achieve some goal>
Scenario: <title>
<additional description>
Given <some state>
When <some action>
Then <some expectation> with <some_name> # where <some_name> is actual Gherkin syntax for a table lookup!
Examples:
| some_name |
| A |
| B |
| C |
| ...etc |
Tasks: # non-standard syntax, but useful for most 'project planning' purposes
- What: ...
Why: ...
Impact: ...
Feature: Resilience
In order to provide content to our users
As an organisation
We want our websites/apps and their dependencies to be available
Scenario: Fastly Unavailable
Fastly is our CDN provider, and is effectively the 'front door' to the
majority of our publicly consumed content.
Given Fastly is unavailable
When a user requests a public buzzfeed resource (e.g. www.buzzfeed.com)
Then we expect the resource to be provided
Tasks:
- What: Investigation of 'stale rendering' vs 'multi-region infrastructure'
Why: Understand the risk/cost implications of each approach.
Impact: We'll be able to proceed with the approach which provides the most value.
- What: Migration of CDN logic to Perimeter.
Why: We want to reduce the amount of unfamilar code.
Impact: Will make migrating to an alternative CDN provider easier as there is less logic coupling.
Feature: Restaurant
Scenario Outline: eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
@mattbrunetti
Copy link

@Integralist - What's the difference between "doing something" and "achieving some goal"? 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment